i am getting below error when i run any commands on PowerCLI /Powershell . Please help me how to resolve this issue .
Note: Internet is blocked in server.
Import-Module : Could not load file or assembly 'file:///C:\Users\Administrator\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.Sdk\1.0.0.5334677\log4net.dll' or one of its
dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
Getting below error when i trying to import the modules.
Import-Module : Could not load file or assembly 'file:///C:\Users\Administrator \Documents\WindowsPowerShell\Modules\VMware.VimAutomation.Sdk\1.0.0.5334677\log 4net.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) At line:1 char:1 + Import-Module + ~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Import-Module], FileLoadE xception + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Co mmands.ImportModuleCommand
Did you follow the instructions in section "Offline Install of PowerCLI to a Computer Without an Internet Connection" in Welcome PowerCLI to the PowerShell Gallery – Install Process Updates?
Also, did you make sure the previous PowerCLI installation (EXE or MSI) was completely removed, before following that section?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi Luc ,
Thanks for your above recommendations . I was loaded the PowerCLI modules in multiple regions which was causing the issue.
I deleted the modules ->uninstalled previous PowerCLI instance followed your above recommendation and it worked perfectly .