title: Remove Sharepoint permissions with Powershell when folder is created in Sharepoint Library
body: <p>I have a Sharepoint Library, which I have mapped out to my Z:\ drive. </p>
  
  <p>I have a script, that drops user specific files, in folders that I create with the following chunk of Powershell: </p>
  
  <pre><code>#If the output path doesn't exist, make it quietly.
  If(!(Test-Path "z:\$strOwnerName")){$null = New-Item "Z:\$strOwnerName" -ItemType directory}
  </code></pre>
  
  <p>How can I (if at all possible) modify this line to remove/restrict permissions for everyone in Sharepoint, aside from the user for which the folder is being created? The folder name, will always be the users AD name.</p>