Automation

 View Only
  • 1.  Acumulating vSphere Sessions - PowerCLI

    Posted Apr 26, 2012 10:05 PM

    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!



  • 2.  RE: Acumulating vSphere Sessions - PowerCLI
    Best Answer

    Posted Apr 27, 2012 05:42 AM

    Are you sure the session is disconnected ?

    What is in

    $defaultViServers


  • 3.  RE: Acumulating vSphere Sessions - PowerCLI

    Posted Apr 27, 2012 02:17 PM

    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...



  • 4.  RE: Acumulating vSphere Sessions - PowerCLI

    Posted Apr 27, 2012 02:22 PM

    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



  • 5.  RE: Acumulating vSphere Sessions - PowerCLI

    Posted May 08, 2012 03:24 PM

    Well, i've found the problem.

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