powershell ISE cannot find the powercli modules after upgrading powershell to 5.1 from 3
any idea?
get-module -listavailable
does not show anything from vmware
also tried running
& 'C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1'
but I am still not seeing the powercli modules in ISE
PowerCLI 6.5, are you still using the MSI file to install PowerCLI?
What is in $env:PSModulePath?
That should contain the folder C:\Program Files (x86)\VMware\Infrastructure\ if you are still using the MSI
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Ok I restarted ISE and its loading the modules now.
however even thought I have powercli 6.5 installed, not sure why I am seeing 10.1.0 version
Is PowerCLI 6.5 still listed in Programs and Features?
Can you uninstall it?
It looks as if you have PowerCLI 10.1.0 installed.
Do
Get-Module VMware* -ListAvailable | Select Name,Version
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Oh my, the 6.0.0.0 in there seems to indicate that have you have some pre-gallery modules left.
Are you sure there is no VMware PowerCLI entry left in Programs and Features?
If there is, uninstall that.
Next start deleting all the files.
Note that these can be in multiple folders.
Do a 'get-module vmware* -ListAvailable', the folders are listed at the top of each block.
When that is done, do a fresh install of PowerCLI with 'Install-Module -Name VMware.PowerCLI'
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
this is from get-powercliversion
I am in an offline (no internet) environment. I have uninstalled powercli from add/remove programs
here is what I have now
also removed the modules folder from
c:\programs files(x86)\vmware\infrastructure\powercli
You also have to remove the PowerCLI modules from the other folders.
You can check all the folders that are listed in $env:PSModulePath.
Do you have a station with Internet connectivity?
On there you can do a Save-MOdule, and then copy the files to the other station.
Have a look at PowerCLI Offline Installation Walkthrough
and
Welcome PowerCLI to the PowerShell Gallery – Install Process Updates
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference