title: How to add a user in a folder security tab
body: <p>Hi all I have a shared folder on which i have given the following permissions</p>
  
  <pre><code>net share $NetworkSharePath  '/Grant:Administrators,FULL' '/Grant:IIS_IUSRS,FULL' | out-null
  </code></pre>
  
  <p>but this only creates user on shared permission tab I would like to add IIS user in security tab as well but dont have a clue how to do that</p>
  
  <pre><code>$Networkshare_Name = 'Media'
  $NetworkShare_Path = 'Media=C:\_Projects\mediaFolder'
  net share $NetworkSharePath  '/Grant:Administrators,FULL' '/Grant:IIS_IUSRS,FULL' | out-null
  
  
      $acl = Get-Acl $NetworkSharePath
      $rule = New-Object   
      System.Security.AccessControl.FileSystemAccessRule("IIS_IUSRS","FullControl",   
      "ContainerInherit,ObjectInherit", "None", "Allow")  
  
      $acl.AddAccessRule($rule)
      Set-Acl $NetworkSharePath $acl
  </code></pre>
  
  <p>Still no luck with this</p>
  
  <pre><code>    $folder = "C:\_Projects\mediaFolder"
      $acl = Get-Acl $folder
      $permission = "IIS_IUSRS","FullControl","Allow"
      $rule = New-Object System.Security.AccessControl.FileSystemAccessRule $permission
      $acl.AddAccessRule($rule)
      Set-Acl $folder $acl
  </code></pre>