title: How do I close all open network files in PowerShell?
body: <p>I'm trying to convert my old BAT script to PowerShell version, 
  but after one hour googling I have no idea how to do it. </p>
  
  <p>I'm looking for a structure very similar to the old one, find open net files, 
  get its PID and close it.</p>
  
  <p>BAT:</p>
  
  <pre class="lang-bat prettyprint-override"><code>for /f "skip=4 tokens=1" %a in ('net files ^| findstr C:\Apps\') do net files %a /close
  </code></pre>
  
  <p>PowerShell?</p>