我试图使用这个 powershell 模块以一种可以解释的方式获取 wmi 对象的 ACL。(安全描述符对理解用户的权限没有帮助)我想在多台服务器上使用的脚本中使用它。我不想将模块复制到每个服务器,而是将它放在网络共享上。问题是每次我导入模块(import-module)时都会出现以下错误。
Import-Module : Die Datei oder Assembly "file://\\necron\C$\tests\PowerShellAccessControl\ROE.PowerShellAccessControl.dll" oder eine Abhängigkeit davon wurde nicht gefunden. Der Vorgang wird nicht unterstützt. (Ausnahme von
HRESULT: 0x80131515)
In Zeile:1 Zeichen:1
+ Import-Module '\\necron\C$\tests\PowerShellAccessControl'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-Module], FileLoadException
+ FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
如果需要,对德语部分进行简短说明。(找不到 .dll 文件/程序集或它的依赖项。不支持该过程。HRESULT 异常......)
执行策略处于绕过状态。取消阻止文件无济于事。使用模块的第 3 版,我可以在第二次尝试时将其导入,但是当我尝试使用 get-accesscontrolentry 读取 acl 时,我得到另一个错误。
Get-SecurityDescriptor : Error invoking the WMI method 'GetSecurityDescriptor' on the input object '\\TESTSERVER\ROOT\cimv2:__SystemSecurity=@': Unerwarteter Fehler
In \\necron\C$\tests\PowerShellAccessControl\PowerShellAccessControl.psm1:897 Zeichen:38
+ $CurrentObject | Get-SecurityDescriptor -Audit:($AuditProper ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-SecurityDescriptor
使用预览版 4,它根本不导入。
我曾经让它工作过,但不能再重现了。有任何想法吗?