connect dosn't work


I see some problems in the connect-viserver cmdlet, even though im not connected the cmdlet will not connect to a server. it usualy happens when a disconnect has heppened, due to service restart or network connection loss.

but if i connect to the same server using IP it works until that breaks then i have to find another "name" to connect to.

it seams that the cmdlet stores the name of the server somewhere and if a prior connection have existed for this name it refuses to create a new one.

Anyone else having the same issue?


Cut start ---

PS> Disconnect-VIServer

Disconnect-VIServer : 19-02-2010 07:44:56 Disconnect-VIServer PowerCLI is currently not connected to a server. To create a new co

nnection use Connect-VIServer.

At line:1 char:20

+ Disconnect-VIServer <<<<

+ CategoryInfo : ResourceUnavailable: (Smiley Happy , ViServerConnectionException

+ FullyQualifiedErrorId : Core_BaseCmdlet_NotConnectedError,VMware.VimAutomation.VimAutomation.Commands.DisconnectVIServer

PS> Connect-VIServer vi-server

Connect-VIServer : Server vi-server not connected.

At line:1 char:17

+ Connect-VIServer <<<< vi-server

+ CategoryInfo : NotSpecified: (Smiley Happy , ViServerConnectionException

+ FullyQualifiedErrorId : VMware.VimAutomation.Types.ViServerConnectionException,VMware.VimAutomation.Commands.ConnectVIServer

PS> Connect-VIServer

WARNING: There were one or more problems with the server certificate:

  • A certification chain processed correctly, but terminated in a root certificate which isn't trusted by the trust provider.

  • The certificate's CN name does not match the passed value.

Name Port User



- 443 vi-server\Administrator


Cut end


0 Kudos
1 Reply

Did you try

Connect-VIServer -Credential (Get-Credential)

There is an issue in the current release when you try to connect for the 2nd time to the same server.

The above method is the bypass.


Blog: LucD notes

Twitter: lucd22

Blog:  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos