Import Powershell Module (powershellaccesscontrol) from UNC


Im trying to use this powershell module to get the ACL for a wmi object in a way that can be interpreted. (Security Descriptor isnt rly helpful at understanding the permissions of a user) I want to use this in a script thats used on multiple servers. I dont want to copy the module to every server and instead have it located on a network share. Problem is that every time I import the module (import-module) I get the following error.

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

Short explanation of the german parts if needed. (Can't find the .dll file/assembly or a dependence of it. The process isn't supported. Exception of HRESULT ...)

Execution Policy is on Bypass. Unblocking the file doesnt help. With the Version 3 of the Module I can import it on the second try but when I try using get-accesscontrolentry to read the acl I get another error.

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

With the preview version 4 it doesnt import at all.

I had it working at one point but cant reproduce that anymore. Any Ideas?

asked on Stack Overflow Jul 20, 2015 by alistair macbain • edited Nov 22, 2017 by (unknown user)

1 Answer


I met same problem once a long time ago, it looks incredible, but i t was coming from IE policy :

Try : Add the unc path/server/share to your Local Intranet Sites. IE >> Tools >> Internet Options >> Security >> Local Intranet >> Sites >> Advanced >> file://* >> Add

For more details try to google : 'Powershell Module UNC Internet explorer Policy'

answered on Stack Overflow Jul 20, 2015 by JPBlanc

User contributions licensed under CC BY-SA 3.0