Forum Discussion

Tonje Waasjø's avatar
Tonje Waasjø
Brass Contributor
Jan 23, 2021
Solved

Powershell error: Could not load file or assembly

I'm trying to install a solution from github and I get the error: 

Import-Module : Could not load file or assembly 'file:///C:\Users\...\SharePointPnPPowerShellOnline\SharePointPnP.PowerShell.Online.Commands.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

 

Anyone nows what I'm doing wrong? I have deleted som of the url there, because it has my name and the name of the solution in it. 

  • Tonje Waasjø's avatar
    Tonje Waasjø
    Jan 25, 2021

    The problem is sloved. It was caused by the zip-file being blocked by your operating system. Sloved it by using 7Zip

5 Replies

  • I had the same error for a different DLL though from AWS SDKs. The file was present and I had to go to the file properties and on the general tab at the bottom it showed that the file was blocked because of the source and there was an option to unblock it. I had to do this for multiple files and it was sorted
  • Just to double check, have you installed PnP PowerShell? From the error message, it seems to be that is using the previous version of the module as well - a new version was released last week.