Set-Acl / takeown权限

时间:2016-12-15 09:14:05

标签: powershell acl rights

我试图让自己在NAS服务器上获得权利:

takeown /s "KVDMTEST1" /f $path 

现在我是这条路的拥有者。

$aclLE = Get-Acl $path

$arLE = New-Object System.Security.AccessControl.FilesystemAccessRule("SYSTEM", "FullControl", 0, 0, "Allow")
$aclLE.SetAccessRule($arLE)

Set-Acl -Path $path -AclObject $aclLE
Set-Acl : Es wurde versucht, einen nicht autorisierten Vorgang auszuführen.
In C:\Users\bongersj\Desktop\Root_Orga anlegen.ps1:162 Zeichen:1
+ Set-Acl -Path $path -AclObject $aclLE
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (\\KVDMTEST1\c$\fs1_KVDMTEST1\WWW:String) [Set-Acl], UnauthorizedAccessException
    + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetAclCommand

我仍然是最后路径的所有者,但我无权改变任何事情。我做错了什么?

0 个答案:

没有答案
相关问题