chrischrischris
Enthusiast
Enthusiast

Trying to install PowerCLI 10 on Windows 7 and failing ... please help!

Jump to solution

Hi all,

I need your help.

I'm trying to install PowerCLI 10 on Windows 7 and failing, repeatedly.  No matter what I do, I always end-up with a 6.5.* version:

After running my script (below), I'm still on version 6.5.*:

PS C:\Users> Get-PowerCLIVersion

PowerCLI Version

----------------

   VMware PowerCLI 6.5.1 build 5377412

---------------

Component Versions

---------------

   VMware Cis Core PowerCLI Component 6.5 build 6870462

   VMware VimAutomation Core PowerCLI Component 6.5 build 6234650

PS C:\Users> Get-Module -Name VMware.* | Select-Object -Property Name,Version

Name                          Version     

----                          -------     

VMware.VimAutomation.Cis.Core 6.5.3.6870462

VMware.VimAutomation.Common   6.5.1.5335010

VMware.VimAutomation.Core     6.5.2.6234650

VMware.VimAutomation.Sdk      1.0.0.5334677

Here is my script: it kept not working, so I kept adding (things I did not understand) to it:

# Set execution policy:

set-executionpolicy unrestricted

# The VMware.PowerCLI module is a NuGet repository.

# So, we need to install NuGet before trying the install:

Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force

# Close and reopen PowerShell.  Why? Is this really necessary?

# Confirm version -- WHY is it not version 10? 

Get-PowerCLIVersion

# why?

Install-Module –Name PowerShellGet –Force  -AllowClobber

# Install PowerCLI 10:

Install-Module -Name VMware.PowerCLI -Scope CurrentUser

# Confirm version -- WHY is it not version 10?

Get-PowerCLIVersion

Get-Module -Name VMware.* | Select-Object -Property Name,Version

# Update PowerCLI:

Update-Module VMware.PowerCLI

# Confirm version -- WHY is it not version 10?

Get-PowerCLIVersion

Get-Module -Name VMware.* | Select-Object -Property Name,Version

# Try this:

Save-Module -Name VMware.PowerCLI -Path .

Install-Module -Name VMware.PowerCLI

# Confirm version -- WHY is it not version 10?

Get-PowerCLIVersion

Get-Module -Name VMware.* | Select-Object -Property Name,Version

1 Solution

Accepted Solutions
LucD
Leadership
Leadership

Did you manually uninstall the 6.5R1 version before trying to install the PowerCLI 10 version from the PowerShell Gallery?

See also Welcome PowerCLI to the PowerShell Gallery – Install Process Updates


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

View solution in original post

0 Kudos
6 Replies
LucD
Leadership
Leadership

Did you manually uninstall the 6.5R1 version before trying to install the PowerCLI 10 version from the PowerShell Gallery?

See also Welcome PowerCLI to the PowerShell Gallery – Install Process Updates


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

0 Kudos
FRANC0IS
Contributor
Contributor

Hi

I've the same issue. I cannot install PowerCLI on Windows7 or Windows 2012 R2 Server. I uninstall PowerCLI 6.5 R1, but "Install-Module" and "Install-PackageProvider" commands don't work

the VMware PowerCLI Blog is of no use, it don't explain how add the online repository...

"Find-Module" or "Save-Module" commands don't work.

I've been using PowerCLI since 8 years, but I did not think I'd be out of date

0 Kudos
LucD
Leadership
Leadership

Which PowerShell version are you suing?

Check what is in $PSVersionTable


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

0 Kudos
FRANC0IS
Contributor
Contributor

on the Windows 2012R2:

PS D:\PowerCLI\SCRIPTS\vCheck\vCheck-vSphere-master> $PSVersionTable

Name                           Value

----                           -----

PSVersion                      4.0

WSManStackVersion              3.0

SerializationVersion           1.1.0.1

CLRVersion                     4.0.30319.42000

BuildVersion                   6.3.9600.18773

PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}

PSRemotingProtocolVersion      2.2

on the Windows 7:

PS Y:\> $PSVersionTable

Name                           Value

----                           -----

PSVersion                      4.0

WSManStackVersion              3.0

SerializationVersion           1.1.0.1

CLRVersion                     4.0.30319.42000

BuildVersion                   6.3.9600.18728

PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}

PSRemotingProtocolVersion      2.2

0 Kudos
LucD
Leadership
Leadership

I suggest to upgrade to PowerShell 5.1 (downloads here).

That will most probably fix the missing PackageManagement module


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

FRANC0IS
Contributor
Contributor

Thanks for the link, it work very well for Windows7.

For Windows 2012R2, the installation package don't work for my system

But I found it : Install and configure WMF 5.1 | Microsoft Docs  and it works for my OS with this package (Win8.1AndW2K12R2-KB3191564-x64.msu)

Issue solved

Thanks you very much for the help

0 Kudos