VMware Cloud Community
tdubb123
Expert
Expert

cannot find Vmware.* modules 6.5 after upgrading powershell to 5.1

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

0 Kudos
9 Replies
LucD
Leadership
Leadership

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

0 Kudos
tdubb123
Expert
Expert

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

Screen Shot 2018-06-22 at 7.57.12 AM.png

0 Kudos
LucD
Leadership
Leadership

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

0 Kudos
tdubb123
Expert
Expert

Screen Shot 2018-06-25 at 6.40.14 AM.png

0 Kudos
LucD
Leadership
Leadership

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

0 Kudos
tdubb123
Expert
Expert

this is from get-powercliversion

Screen Shot 2018-06-25 at 7.10.38 AM.png

0 Kudos
tdubb123
Expert
Expert

I am in an offline (no internet) environment. I have uninstalled powercli from add/remove programs

here is what I have nowScreen Shot 2018-06-25 at 8.27.23 AM.png

0 Kudos
tdubb123
Expert
Expert

also removed the modules folder from

c:\programs files(x86)\vmware\infrastructure\powercli

0 Kudos
LucD
Leadership
Leadership

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

0 Kudos