VMware Cloud Community
nlong12
Enthusiast
Enthusiast
Jump to solution

Multiple power cli versions

Good afternoon experts,

Just updated to version 11.5 of powercli, noticed we have multiple versions containing the same cmdlets.  This does not seem right, is there something I need to do to correct this

Thank you for your input

Norm

ModuleType Version    Name                                ExportedCommands                                                                                   

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

Script     6.7.0.1... VMware.DeployAutomation             {Add-DeployRule, Add-ProxyServer, Add-ScriptBundle, Copy-DeployRule...}                            

Script     6.7.0.1... VMware.ImageBuilder                 {Add-EsxSoftwareDepot, Add-EsxSoftwarePackage, Compare-EsxImageProfile, Export-EsxImageProfile...} 

Manifest   11.5.0.... VMware.PowerCLI                                                                                                                        

Manifest   11.2.0.... VMware.PowerCLI                                                                                                                        

Script     6.7.0.1... VMware.Vim                                                                                                                             

Script     6.7.0.1... VMware.Vim                                                                                                                             

Script     11.5.0.... VMware.VimAutomation.Cis.Core       {Connect-CisServer, Disconnect-CisServer, Get-CisService}                                          

Script     11.2.0.... VMware.VimAutomation.Cis.Core       {Connect-CisServer, Disconnect-CisServer, Get-CisService}                                          

Script     11.0.0.... VMware.VimAutomation.Cloud          {Add-CIDatastore, Connect-CIServer, Disconnect-CIServer, Get-Catalog...}                           

Script     11.5.0.... VMware.VimAutomation.Common         {Get-Task, Stop-Task, Wait-Task}                                                                   

Script     11.2.0.... VMware.VimAutomation.Common                                                                                                            

Script     11.5.0.... VMware.VimAutomation.Core           {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-VMHostNtpServer...}

Script     11.2.0.... VMware.VimAutomation.Core           {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-VMHostNtpServer...}

Script     11.5.0.... VMware.VimAutomation.Hcx            {Connect-HCXServer, Disconnect-HCXServer, Get-HCXAppliance, Get-HCXComputeProfile...}              

Script     11.2.0.... VMware.VimAutomation.Hcx            {Connect-HCXServer, Disconnect-HCXServer, Get-HCXAppliance, Get-HCXApplianceCompute...}            

Script     7.10.0.... VMware.VimAutomation.HorizonView    {Connect-HVServer, Disconnect-HVServer}                                                            

Script     7.6.0.1... VMware.VimAutomation.HorizonView    {Connect-HVServer, Disconnect-HVServer}                                                            

Script     11.3.0.... VMware.VimAutomation.License        Get-LicenseDataManager                                                                             

Script     10.0.0.... VMware.VimAutomation.License        Get-LicenseDataManager                                                                             

Script     11.5.0.... VMware.VimAutomation.Nsxt           {Connect-NsxtServer, Disconnect-NsxtServer, Get-NsxtPolicyService, Get-NsxtService}                

Script     11.2.0.... VMware.VimAutomation.Nsxt           {Connect-NsxtServer, Disconnect-NsxtServer, Get-NsxtPolicyService, Get-NsxtService}                

Script     11.5.0.... VMware.VimAutomation.Sdk            Get-ErrorReport                                                                                    

Script     11.2.0.... VMware.VimAutomation.Sdk            {Get-ErrorReport, Get-PSVersion, Get-InstallPath}                                                  

Manifest   1.0.0.5... VMware.VimAutomation.Sdk            {Get-PSVersion, Get-InstallPath}                                                                   

Script     11.0.0.... VMware.VimAutomation.Security       {Get-SecurityInfo, Get-VTpm, Get-VTpmCertificate, Get-VTpmCSR...}                                  

Script     11.5.0.... VMware.VimAutomation.Srm            {Connect-SrmServer, Disconnect-SrmServer}                                                          

Script     11.2.0.... VMware.VimAutomation.Srm            {Connect-SrmServer, Disconnect-SrmServer}                                                          

Script     11.5.0.... VMware.VimAutomation.Storage        {Add-KeyManagementServer, Add-VsanObjectToRepairQueue, Copy-VDisk, Export-SpbmStoragePolicy...}    

Script     11.2.0.... VMware.VimAutomation.Storage        {Add-KeyManagementServer, Copy-VDisk, Export-SpbmStoragePolicy, Get-KeyManagementServer...}        

Script     1.3.0.0    VMware.VimAutomation.StorageUtility Update-VmfsDatastore                                                                               

Script     11.2.0.... VMware.VimAutomation.Vds            {Add-VDSwitchPhysicalNetworkAdapter, Add-VDSwitchVMHost, Export-VDPortGroup, Export-VDSwitch...}   

Script     11.5.0.... VMware.VimAutomation.Vmc            {Add-VmcSddcHost, Connect-Vmc, Disconnect-Vmc, Get-AwsAccount...}                                  

Script     11.2.0.... VMware.VimAutomation.Vmc            {Connect-Vmc, Disconnect-Vmc, Get-VmcSddcNetworkService, Get-VmcService...}                        

Script     10.0.0.... VMware.VimAutomation.vROps          {Connect-OMServer, Disconnect-OMServer, Get-OMAlert, Get-OMAlertDefinition...}                     

Script     6.5.1.7... VMware.VumAutomation                {Add-EntityBaseline, Copy-Patch, Get-Baseline, Get-Compliance...}                      

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

No, not really.
PowerShell by default loads the latest version of each module.

The only disadvantage might be that the old module take space.
And there is perhaps an esthetical aspect :smileygrin:

If you want to clean up, you could run something like this.

Get-Module -Name VMware* -ListAvailable | Group-Object -Property Name |

where{$_.Count -gt 1} | %{

    $_.Group | Sort-Object -Property version -Descending |

    Select -skip 1 | %{

        Uninstall-Module -Name $_.Name -RequiredVersion $_.Version -Force -Confirm:$false -Verbose

    }

}


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

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

No, not really.
PowerShell by default loads the latest version of each module.

The only disadvantage might be that the old module take space.
And there is perhaps an esthetical aspect :smileygrin:

If you want to clean up, you could run something like this.

Get-Module -Name VMware* -ListAvailable | Group-Object -Property Name |

where{$_.Count -gt 1} | %{

    $_.Group | Sort-Object -Property version -Descending |

    Select -skip 1 | %{

        Uninstall-Module -Name $_.Name -RequiredVersion $_.Version -Force -Confirm:$false -Verbose

    }

}


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

Reply
0 Kudos
nlong12
Enthusiast
Enthusiast
Jump to solution

Hello Lucd,

Thank you for your response and the helpful script!

Norm

Reply
0 Kudos