seanab
asked on
Change folder perms using powershell
I'm trying to use the Get-Acl and Set-Acl commands to set perms on a folder..
For example I have a folder with where users do not have modify rights:
D:\Program Files (x86)\bogusfolder
I have C:\Program Files (x86)\bogusfolder where users have modify rights so I have run:
Get-Acl -path "C:\Program Files (x86)\bogusfolder" | Set-Acl -path "D:\Program Files (x86)\bogusfolder"
However, I keep getting "The security identifier is not allowed to be the owner of this object"
Google yields quite a few hits on this topic but they are all ancient from PS 1.0 etc.. is there a new and better way of doing this simply without delving into .net etc...
For example I have a folder with where users do not have modify rights:
D:\Program Files (x86)\bogusfolder
I have C:\Program Files (x86)\bogusfolder where users have modify rights so I have run:
Get-Acl -path "C:\Program Files (x86)\bogusfolder" | Set-Acl -path "D:\Program Files (x86)\bogusfolder"
However, I keep getting "The security identifier is not allowed to be the owner of this object"
Google yields quite a few hits on this topic but they are all ancient from PS 1.0 etc.. is there a new and better way of doing this simply without delving into .net etc...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found the solution by using UNC paths instead and that seemed to do the trick.
ASKER
That works in addition to using unc paths as opposed to drive letter paths.
ASKER