VMware Cloud Community
GuilhermeStela
Enthusiast
Enthusiast
Jump to solution

Acumulating vSphere Sessions - PowerCLI

I'm having problem with multiple sessions when opening some PowerCLI windows...

I open a session with "connect-viserver -server ....." and close with "disconnect-viserver" but the session remains at the vcenter.

We have the 4.1 vCenter version.

If someone is passing through the same problem, let's share!

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Are you sure the session is disconnected ?

What is in

$defaultViServers


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

View solution in original post

Reply
0 Kudos
4 Replies
LucD
Leadership
Leadership
Jump to solution

Are you sure the session is disconnected ?

What is in

$defaultViServers


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

Reply
0 Kudos
GuilhermeStela
Enthusiast
Enthusiast
Jump to solution

Thats weird...

[vSphere PowerCLI] C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\Scrip
ts> $defaultviservers

Name                           Port  User
----                           ----  ----
bbavcdp1                       443   nt\gastela


[vSphere PowerCLI] C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\Scrip
ts> disconnect-viserver


Disconnect-VIServer : 4/27/2012 11:09:42 AM    Disconnect-VIServer        Power
CLI is currently not connected to a server. To create a new connection use Conn
ect-VIServer.
At line:1 char:19
+ disconnect-viserver <<<<


[vSphere PowerCLI] C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\Scrip
ts> $defaultviservers
[vSphere PowerCLI] C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\Scrip
ts>

when i run the disconnect command, it returns no conection...

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

How long ago was that session established ?

Do you see the same when you do

Connect-VIServer -Server bbavcdp1

$defaultVIServers

Disconnect-VIServer -Server bbavcdp1

$defaultVIServers


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

GuilhermeStela
Enthusiast
Enthusiast
Jump to solution

Well, i've found the problem.

That was another people using the same user to access the vcenter.. :smileyplain:

Reply
0 Kudos