I would like to change the ACL of the C:
drive. What im trying to do is remove the permission that a user can create a folder directly on the drive. I tested th
You need the SeRestorePrivilege
to set the owner. I used Lee Holmes' script from the URL below to elevate my process with this additional priv and was able to set the owner to someone other than myself.
http://www.leeholmes.com/blog/2010/09/24/adjusting-token-privileges-in-powershell/
I tried the (get-item $path).getaccesscontrol("access")
method but still got the same error since my process didn't have the SeRestorePrivilege
.