1

Does anyone know of a way to set a folder's permissions on a remote server using either PowerShell or the command prompt?

In other words, sitting at server01, launch PS or CP, type a command to set \\\server02\c$\folder to read only for user01 and full control for user02.

slm
  • 7,355
  • 16
  • 54
  • 72
Rich701
  • 163
  • 1
  • 1
  • 8

1 Answers1

1

You're looking for set-acl if you'd like to use PowerShell for this task.

MDMarra
  • 100,183
  • 32
  • 195
  • 326
  • Thanks for pointing me in the right direction. for anyone else wondering, this worked for me... $acl = get-acl -path “\\server02\sharedFolder” $new = “DOMAIN\user”,”FullControl”,”ContainerInherit,ObjectInherit”,”None”,”Allow” $accessRule = new-object System.Security.AccessControl.FileSystemAccessRule $new $acl.SetAccessRule($accessRule) $acl | Set-Acl “\\server02\sharedFolder” – Rich701 Sep 26 '13 at 15:27