title: How to execute two commands in Powershell after using Where {(...)}
body: <p>How can I run both 'rename' command and 'hidden' command after I filtered files using Where condition. Each command runs well on its own when placed first, but the second one is neglected.</p>
  <pre><code>Get-ChildItem -Recurse -Force | Where {(
      $_.Extension -ne &quot;.mp3&quot; -and
      $_.Extension -ne &quot;.wmv&quot; )} |
  Set-ItemProperty -Name Attributes -Value &quot;Hidden&quot; -WhatIf |
  Rename-Item -NewName {$_.Name -replace $_.Extension, -join($_.Extension, &quot;.notmusic&quot;)} - 
  WhatIf
  </code></pre>