我无法在Windows 7上使用PowerShell将我的SID转换为友好名称
$RootPath=“K:\FolderName” $Folders=dir$RootPath-recurse |其中{$\ psiscontainer-eq$true} foreach($Folders中的文件夹){$ACLs=get acl$Folder.fullname| ForEach对象{$\.Access}ForEach($ACL中的ACL) { $ACL.InheritanceFlags+“,”+$ACL.PropagationFlags 添加内容-值$OutInfo-路径$OutFile} 错误是我无法在Windows 7上使用PowerShell将我的SID转换为友好名称,powershell,Powershell,$RootPath=“K:\FolderName” $Folders=dir$RootPath-recurse |其中{$\ psiscontainer-eq$true} foreach($Folders中的文件夹){$ACLs=get acl$Folder.fullname| ForEach对象{$\.Access}ForEach($ACL中的ACL) { $ACL.InheritanceFlags+“,”+$ACL.PropagationFlags 添加内容-值$OutInfo-路径$Out
+ $objSID = New-Object <<<< System.Security.Principal.SecurityIdentifier($
ACL.IdentityReference)
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvoca
tionException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.Power
Shell.Commands.NewObjectCommand
Exception calling "Translate" with "1" argument(s): "The trust relationship bet
ween this workstation and the primary domain failed.
+$objSID=New Object您的工作站是否与从中获取这些ACL的计算机连接到同一个域?所有计算机都在同一个域上。
+ $objSID = New-Object <<<< System.Security.Principal.SecurityIdentifier($
ACL.IdentityReference)
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvoca
tionException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.Power
Shell.Commands.NewObjectCommand
Exception calling "Translate" with "1" argument(s): "The trust relationship bet
ween this workstation and the primary domain failed.