Ownership

Ownership of a file or directory may be changed using the SetOwner method of the ACL object. Changing the ownership of a file requires administrative privileges.

The owner of the C:TempACL1 file is the current user:

PS> Get-Acl C:TempACL1 | Select-Object Owner

Owner
-----
COMPUTERChris

The owner may be changed (in this case, to the Administrator account) using the SetOwner method:

$acl = Get-Acl C:TempACL1
$acl.SetOwner(
[System.Security.Principal.NTAccount]'Administrator'
)
Set-Acl C:TempACL1 -AclObject $acl
This is not taking ownership:
Setting ownership when the current user already has full control is one thing. Very specific privileges are required to take ownership without existing permission:
SeRestorePrivilege, SeBackupPrivilege, and SeTakeOwnershipPrivilege.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.0.145