hi Luc,
good morning
if you could suggest on the following error which i got running the below function .
though its not the proper function structure but it will allow users to update powercli online .
Did you already try adding the -Force switch on the Import-Module cmdlet?
Another option could be to first run Uninstall-Module and then replacing the Update-Module with an Install-Module
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Did you already try adding the -Force switch on the Import-Module cmdlet?
Another option could be to first run Uninstall-Module and then replacing the Update-Module with an Install-Module
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
i can see vmware.vimautomation.core from 11.2 and 11.5 .is this the cause of error??
No, you have multiple versions of a module installed.
PowerShell will take the latest version.
I suspect that load error has to do with a module that is already loaded.
Loading a module also includes loading types that come with the module.
The DLLs containing those type definitions might be cached in the GAC.
The best way to fix this is to restart your PowerShell session, but that might be a problem in this situation.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
iam checking this...
i used the force switch as yu suggested and it is working
Hi Luc,
just thought of asking if update-module vmware.powercli will update to 11.5 version from powershell gallery??
Yes, the current latest version from the Gallery.
Currently 11.5
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc,
i have one scenrio below wherein i wan to update powercli .
i have seen in some environments where in version 6.x.x.x coexist with 11.5 .
if i try to update-module vmware.powercli on this system (considering online ) will it be possile to update to 11.5 withput unintalling below modules .
uninstallation is not wotking as its prompting to source file which is not availble .
When PowerCLI moved to the PowerShell Gallery they abandoned the installation EXE.
Installations done with such an EXE (up to 6.5 R1) need to be uninstalled before attempting to install PowerCLI modules from the Gallery.
And yes, to uninstall such an EXE install, the msiexec needs access to the msi files.
PowerCLI 6.5 R1 (and earlier) can NOT coexist with 6.5.1 (and later).
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
tx