This seems to be a common problem in PowerShell and Visual Studio, yet cases and solutions seem to vary a lot. Though seeing several similar questions, I didn't find a working solution for my issue yet.
The problem exists in the error message
Could not load file or assembly 'file:///C:\users\jenstmar\Desktop\WinSCP.dll' o r one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
The file location is invalid, as the .dll is supposed to be located in the same folder as the WinSCP installation. This location was changed to check that no rights or lack thereof, restricted me to use it.
The script line that causes the problem looks as following:
# Load WinSCP .NET assembly
[Reflection.Assembly]::LoadFrom("C:\users\jenstmar\Desktop\WinSCP.dll") | Out-Null
This error comes in both PowerShell ISE and PS ISE(x86). I run PowerShell V3.0 in a Windows Enterprise 64 bit environment as local administrator. How can I fix this problem?