PowerShell runtime exception - "could not load file or assembly" PowerShell runtime exception - "could not load file or assembly" powershell powershell

PowerShell runtime exception - "could not load file or assembly"


The file may be blocked from being loaded because of its origin (stored in NTFS streams). Check properties and see if the little unblock button is lit up. Once you unblock it perhaps it will load...


Solution in this case:Remove and download it all again.I even unblocked it on the first file, with no help. Glad this was on an internal machine.


The following worked for me (from Stack Overflow question Add-Type load assembly from network UNC share error 0x80131515).

In files:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe.config C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe.config

<?xml version="1.0" encoding="utf-8" ?><configuration>   <runtime>      <loadFromRemoteSources enabled="true"/>   </runtime></configuration>