I have a below queries on PowerCLI Sessions.
1. What happens if I open a sesison with Connect-VIServer and dont close the session explicitly before exiting out of the script ?
a. Does it close the session as soon as the PowerShell Sesison ends ? (Which I believe, it doesn't because I can see my idle/active session in the vsphere client)
b. Session remains open. If yes, then till what time period and how can we control it.
Which leads to another query, how can we control no.of sessions per user ?
2. "Disconnect-VIServer" --> Does it close only the active session in that particular PowerShell Session ? Or We can close any other Session with the help of SessionID remotely.
3. If we are connecting to a Session with the help of Session ID (From the Same or a Different Server), is this counted as another session for that user.
Is there a limit on how many extra sessions we can open using this command for a user ? If yes how can we control it ?
Connect-VIServer -Session "xxxxxxxxxxxxxxxxxxxxxxxxxx" -Server "xxxxxxxxx"