Microsoft released a new version of PowerShell in December (WMF 3.0). I installed it and imagine this it can't load the netapp module . Anyone have some ideas on how I could get this to work? Also does anyone know the timeline for NetApp supporting this new version?
Import-Module : Could not load file or assembly
'file:///C:\Windows\system32\WindowsPowerShell\v1.0\Modules\DataONTAP\DataONTAP.dll' or one of its dependencies
Operation is not supported. (Exception from HRESULT: 0x80131515)
At C:\Users\xxxx\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:1 char:1
+ Import-Module DataONTAP
+ CategoryInfo : NotSpecified: ( [Import-Module], FileLoadException
+ FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand
Solved! See The Solution
With one exception (Find-NaController) the current Toolkit 1.6 release has been found to work with PowerShell 3.0 CTP1. A few of our colleagues have switched over completely to PS3 with good results. Have you tried the solution to a similar issue reported here?
As Clinton suggested, the module files are probably "blocked" (include a special blocked data stream flag) after being downloaded with Internet Explorer. You can confirm by looking at the DataONTAP.dll file in explorer, right click on properties and look at the bottom:
You could go through one by one and unblock all of the dlls & ps1xml files in the module, but far easier is to just delete the whole dataontap folder, unblock the DataONTAP.zip file you downloaded, and reinstall/recopy the module.
This solved the problem. I had to navigate to the DataONTAP.dll file and unblock it. After that PowerShell was able to load the module properly. This was interesting I had no idea Windows kept track of the files I downloaded from the internets.