Re: I have found the answer
Thanks for sharing your solution. I'd like to document it. Though, I do not know what does it mean "to never notify". Can you please provide us more details?
%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe WinSCPnet.dll /codebase /tlb
64
. They both say successful.
AddType -Path "WinSCOnet.DLL"
Add-Type : Could not load file or assembly 'file:///C:\allmystuff\Powershell Script\WinSCPnet.DLL' or one of its dependencies. Operation is not supported. (Exception from HRESULT:
0x80131515)
At line:1 char:3
+ Add-Type -Path "WinSCPnet.DLL"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-Type], FileLoadException
+ FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.AddTypeCommand