Add-Type : Could not load file or assembly on powershell 3

0

I have an dll(assembly) file on the network share and want to import into powershell.
I try as follow:

PS C:\Windows\system32> Add-Type -Path \\path\Netlogon\Industry\Startup\Startup.dll

and got

Add-Type : Could not load file or assembly 'file://\\path\Netlogon\Industry\Startup\Startup.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
In Zeile:1 Zeichen:1
+ Add-Type -Path \\path\Netlogon\Industry\Startup\Startup.dll
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-Type], FileLoadException
    + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.AddTypeCommand

Powershell version is:

PS C:\Windows\system32> $PSVersionTable

Name                           Value                                                                                                                                                                                                  
----                           -----                                                                                                                                                                                                  
WSManStackVersion              3.0                                                                                                                                                                                                    
PSCompatibleVersions           {1.0, 2.0, 3.0}                                                                                                                                                                                        
SerializationVersion           1.1.0.1                                                                                                                                                                                                
BuildVersion                   6.2.9200.16481                                                                                                                                                                                         
PSVersion                      3.0                                                                                                                                                                                                    
CLRVersion                     4.0.30319.269                                                                                                                                                                                          
PSRemotingProtocolVersion      2.2    

I search in internet about it, but does not found the solution at all.
I want to set:

<runtime>
    <loadfromremotesources enabled="true"/>
</runtime>

in the powershell.exe.config file, but the file does not exist in the powershell 3.
What am I doing wrong?

powershell
asked on Stack Overflow Apr 22, 2016 by softshipper

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0