VMware Cloud Community
bechaker
Contributor
Contributor

Connect-VIServer -Server - Sesion

Hello

When I use Connect-VIServer -Server a session is generated as I understand it. How can I see the sessions that I generated by console and, on the other hand, how can I close them?

I want to make a menu in PS to add servers and close the connection. I have advanced the menu but I find this topic.

any ideas?

Thank you

Reply
0 Kudos
6 Replies
LucD
Leadership
Leadership

Reply
0 Kudos
bechaker
Contributor
Contributor

Hello

I do not use your information very much or I do not interpret it.

What I want to get are the active sessions at the moment of using the Connect-VIServer to be able to know about how many I am logged in.

any ideas?

Thank you

Reply
0 Kudos
LucD
Leadership
Leadership

That Get-VISession is not a PowerCLI cmdlet.
Is that a function you wrote?


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

Reply
0 Kudos
LucD
Leadership
Leadership

You can also have a look at my Get Complete VCenter Session Info post.


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

Reply
0 Kudos
bechaker
Contributor
Contributor

Hello LucD Smiley Happy

Test your script in PS (Windows) and I throw myself problems. (view image)

------------ Your Script------------------------

http://www.lucd.info/2012/01/17/get-complete-vcenter-session-info/

--- Script------

I'm doing the PS queries in a centos because on that same server is the mysql (which is finally what I want to do). That the result be inserted in a database (there I continue to investigate how to do it)

Thanks for all your help and support.

Smiley Happy.-

Reply
0 Kudos
LucD
Leadership
Leadership

The script does assume that you are connected to a vSphere Server.
Are you?
CHeck what is in $global:defaultVIServers


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

Reply
0 Kudos