VMware Cloud Community
jvm2016
Hot Shot
Hot Shot
Jump to solution

powercliupdate

Hi luc,

i have following scenerio where i see powercli 6.5 in control pannel which seems to be installed by msi

pastedImage_0.png

at the same time i have  11.2 also and i dont see any modules in default directory

pastedImage_1.png

iam willing to upgrade but for some reasons online wont work .do i need to uninstall 6.5 for offline upgrade .

not sure how 11.2 modules come from??

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You should always uninstall any MSI based version, before trying to install from the PSGallery.

If you don't have Internet access on that station, use the Save-Module procedure.

See also Updating PowerCLI through the PowerShell Gallery


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
41 Replies
LucD
Leadership
Leadership
Jump to solution

You should always uninstall any MSI based version, before trying to install from the PSGallery.

If you don't have Internet access on that station, use the Save-Module procedure.

See also Updating PowerCLI through the PowerShell Gallery


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

where does 11.2 come from as i dont see any powercli modules in default module directory.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Did you check all folders in

$env:PSModulePath.Split(';')

Does the following list any PowerCLI modules?

Get-Module -Name VMware* -ListAvailable


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

pastedImage_0.png

pastedImage_1.png

it has both 11.2 and 6.5 .

actually this is online system but gives error regarding nugetprovider.it used to work fine in lab environmet which i tested few months back.

pastedImage_2.png

0 Kudos
LucD
Leadership
Leadership
Jump to solution

The 6.5 version is one installed by the MSI file.

Those folders should go away when you uninstall VMware PowerCLI from the Programs and Features control panel applet.

For the 11.2 version, you can just delete those folders manually.

Did you try the proposed Install-PackageProvider cmdlet to install NuGet?

Did that work?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

pastedImage_0.png

however i cant open webpage though it ping to outside

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Could be the TLS setting.
Try running this before

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Or are you perhaps behind a proxy?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
LucD
Leadership
Leadership
Jump to solution

And you probably have to run PowerShell as Administrator.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

i just see its TTL expired in ping .

i m thinking toput powercli modules which i downloaded in

C:\Windows\system32\WindowsPowerShell\v1.0\Modules

and delete old modules .if it was working earlier it should work now also without uninstalling 6.5Smiley Happy.is this not coorect approach??

0 Kudos
LucD
Leadership
Leadership
Jump to solution

No, since .NET is involved, I'm not sure what the impact under the covers might be.

Just uninstall the MSI package.
That should also clean up the PSModulePath environment variable.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

hope it should not ask for .msi package while uninstalling as it happened in one of the cases and it was not avaliable .

0 Kudos
LucD
Leadership
Leadership
Jump to solution

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

thanks luc

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

is there any powershell comaand that prechecks uninstalltion powercli.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

If you mean the MSI installation, you could use Uninstall-Package with the WhatIf switch.
But that most probably does not test the full uninstallation process.

You can also just check if the MSI is installed with the Get-Package cmdlet.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

pastedImage_0.png

if i run without whatif it will uninstall if sucessfull with reboot or ask for reboot if needed .is that correct ??

0 Kudos
LucD
Leadership
Leadership
Jump to solution

To be honest, I never uninstalled an MSI package that required a reboot this way.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

pastedImage_0.png

it has uninstalled now only reboot is pending for complete uninstalltion .

0 Kudos
LucD
Leadership
Leadership
Jump to solution

That could be because some of the PowerCLI modules were loaded in the PowerShell session.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos