VMware: PowerCLI Errors

PowerCLI Errors KB ID 0001830

Problem

I was doing some work recently and tried to connect to my vCenter server and was greeted with this.

PS C:\Users\administrator.PNL> connect-viserver vc-70.pnl.com
connect-viserver : Object reference not set to an instance of an object.
At line:1 char:1
+ connect-viserver vc-70.pnl.com
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-VIServer], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

Some internet searching led me to find out I simply needed to update PowerCLI  – but when I did that this happened.

PS C:\Users\administrator.PNL> Update-Module VMware.PowerCLI
PackageManagement\Install-Package : Authenticode issuer ‘CN=DigiCert Trusted Root G4, OU=www.digicert.com, O=DigiCert
Inc, C=US’ of the new module ‘VMware.VimAutomation.Sdk’ with version ‘13.1.0.21605170’ is not matching with the authenticode issuer ‘CN=VeriSign Class 3 Public Primary Certification Authority – G5, OU=”(c) 2006 VeriSign, Inc. – For authorized use only”, OU=VeriSign Trust Network, O=”VeriSign, Inc.”, C=US’ of the previously-installed module ‘VMware.VimAutomation.Sdk’ with version ‘12.0.0.15939651’. If you still want to install or update, use -SkipPublisherCheck parameter. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:2089 char:20 + … $sid = PackageManagement\Install-Package @PSBoundParameters + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Microsoft.Power….InstallPackage:InstallPackage) [Install-Package],
Exception
+ FullyQualifiedErrorId : AuthenticodeIssuerMismatch,Validate-ModuleAuthenticodeSignature,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Errm OK?

Solution: PowerCLI Errors

Seems like the fix for both errors is to simply update PowerCLI, updating actually does not work (as you can see). So, you need to FORCE an clean install of PowerCLI and also ignore the certificate error (above) with a SkipPublisherCheck switch.

[box]

Install-Module VMware.PowerCLI -Force -SkipPublisherCheck

[/box]

Then all was well with the world!

Related Articles, References, Credits, or External Links

NA

Leave a Reply

Your email address will not be published. Required fields are marked *