【发布时间】:2014-09-28 17:51:55
【问题描述】:
我正在执行以下命令以在远程服务器中创建文件夹。我在设置新文件夹(F 盘中的团队)权限时收到访问控制列表的错误消息,您能帮我解决这个问题吗?
$acl=Get-Acl "\\9018\F$\Team Data"$path=md "F:\Team" | set-acl -aclobject $acl
Invoke-Command -ComputerName (Get-Content C:\Server.txt) -ScriptBlock {
param($acl,$path)
} -ArgumentList $acl,$path
错误信息:
set-acl : The security identifier is not allowed to be the owner of this object.
At F:\folder.ps1:2 char:26
+ $path=md "F:\Team" | set-acl -aclobject $acl
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (F:\CDS Team:String) [Set-Acl], InvalidOperationException
+ FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.SetAclCommand
【问题讨论】:
标签: powershell permissions directory