Is there a command to run in powercli that will tell you what vCenter or vCenters you're connected to?
I've tried Get-VIServer and Get-VC, neither work....
Hello, justinsmith-
You can have a look at the auto-variable, "$global:DefaultVIServers" -- it holds the VIServerImpl objects that correspond to the vCenter- and ESX(i) hosts to which you are currenty connected.
If you are interested in having info about your currently-connected vCenters in the title bar of your PowerShell session (the default behavior in previous PowerCLI releases), there are several places out there that have functions/how-tos for that. For example, AC wrote about it at vNugglets.com in his Show Currently Connected vCenter Servers in PowerCLI post.
Enjoy
Hello, justinsmith-
You can have a look at the auto-variable, "$global:DefaultVIServers" -- it holds the VIServerImpl objects that correspond to the vCenter- and ESX(i) hosts to which you are currenty connected.
If you are interested in having info about your currently-connected vCenters in the title bar of your PowerShell session (the default behavior in previous PowerCLI releases), there are several places out there that have functions/how-tos for that. For example, AC wrote about it at vNugglets.com in his Show Currently Connected vCenter Servers in PowerCLI post.
Enjoy
run $defaultVIServers.
$defaultVIServers stores the connection information for all connected entities where as the $defaultVIServer will only be the most recent connection.
Isn't that exactly the same thing that Matt said ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference