Add-Type in PowerShell not working
I have installed WinSCP v.5.7.7. in
This is a new Windows 2012R2 server. I need this to work as I have to convert all of my VBS scripts that call WinSCP to PowerShell scripts ASAP.
C:\Program Files (x86)\WinSCP\
and unlocked the WinSCPnet.dll
as documented, but when I enter Add-Type -Path "WinSCPnet.dll"
in PowerShell it still fails:
Add-Type : Could not load file or assembly 'file:///C:\Windows\system32\WinSCPnet.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) At line:1 char:1 + Add-Type -Path "WinSCPnet.dll" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Add-Type], FileLoadException + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.AddTypeComma nd