if you loaded the vmware module successfully ,now you’ll want to connect to any of your
virtual center servers , or for any ESX server from your farm.
this is easy
load your vmware module then connect to your VC by typing –
1 |
C:\PS>Connect-VIServer <Server Name/IP> |
now for this command like any you’ve some options the way you choose to connect to your VC
for example :
you can choose to connect your VC with SSL protocol (Secured)
1 |
C:\PS>Connect-VIServer -Server 10.11.111.211 -Protocol https -User admin -Password pass |
if you’re already connected to VC by powershell ,you can use the existing Connection SessionID created once you’re logged-in ,but
what is your SessionID ?
the SessionID is created each time you’re connected to any VC you can find it out by typing –
1 2 3 4 5 6 7 8 9 |
#recommended to store the SessionID to A Variable #instead of - C:\PS>(Connect-VIServer -Server $VMWareDC).SessionID $SessionID = (Conenct-VIServer $VMWareDC).SessionID ### #or you can store your connection to a variable C:\PS>$Connect = Connect-VIServer -Server $VMWareDC.DataCenter #and then just typing $Connect.SessionID to get the SessionID ### |
now when you found out the session id you can connect to VC so you’re using the SessionID –
1 |
C:\PS>Connect-VIServer "Server" -SessionId $sessionId |
(Visited 2,962 times, 1 visits today)