Reply to Message

View discussion in a popup

Replying to:
Tocano
Enthusiast
Enthusiast

Not sure if this is really relevant, but just noticed the following:

In a single PS Console, every Connect-VIServer invocation after the first (to the same server with same credentials), instead of taking 4-5 seconds, takes about 0.1 seconds (measure-command says about 105-110ms). So I assume that this isn't actually reconnecting to the vCenter server and is instead just recognizing that an existing session to that server with those credentials exists and so just returns that object.

In fact, after the first connection, I can completely Remove-Variable the DefaultVIServer(s) variables, rerun the Connect-VIServer, and it still takes only ~100ms. So this makes me think that it's keeping track of server connections elsewhere besides the $global:DefaultVIServer(s) variables.

EDIT: Though I realize I could be wrong and it is actually contacting the vCenter server, who sees an existing session, and maybe just returns that already-built session - just all in lightning fast time.

Reply
0 Kudos