VMware Cloud Community
jzim
Contributor
Contributor

how can I find out how many sessions are on my vc-server

Is there anyway I can use powershell to list all of the sessions that are connected to my vc-server? I would like to get the same information that is displaied on teh sessions tab under administration.

Thanks,

Zim

0 Kudos
1 Reply
LucD
Leadership
Leadership

Yes, you can use this to get the number of sessions

write-host (Get-View SessionManager).sessionList.count

If you want to list the sessions use this

foreach($ses in (Get-View SessionManager).sessionList){
 Write-Host $ses.UserName
}

Other properties for a session can be found in the UserSession object.


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

0 Kudos