Windows Take Ownership Of Folder <PLUS ✓>
$path = "C:\Path\Folder" $acl = Get-Acl $path $acl.SetOwner([System.Security.Principal.NTAccount]"Administrator") Set-Acl -Path $path -AclObject $acl For recursive ownership, additional recursion logic is required. Many registry tweaks add a shell context menu entry that runs: