1

我试图使用这个 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,它根本不导入。

我曾经让它工作过,但不能再重现了。有任何想法吗?

4

1 回答 1

1

我很久以前遇到过同样的问题,看起来不可思议,但它来自 IE 策略:

尝试:将 unc 路径/服务器/共享添加到您的本地 Intranet 站点。IE >> 工具 >> Internet 选项 >> 安全 >> 本地 Intranet >> 站点 >> 高级 >> file://*.domain.com >> 添加

有关更多详细信息,请尝试谷歌:'Powershell Module UNC Internet explorer Policy'

于 2015-07-20T13:19:02.530 回答