I am looking for the Uid property of an object, in my example a ESXi host, but I need it from Get-View and not Get-VMhost.
For example if I run Get-VMhost | Select Uid it returns: /VIServer=userA@vCenterName:443/VMHost=HostSystem-host-001/
Is there any way to get this same return using Get-View -ViewObject HostSystem -Property xxxxxx?
In the long run what I need to do is be able to pull the vCenter name that this ESXi host is connected to. In the past I have used the Client property to pull this information, however it appears that property will be going away soon. I will be connected to multiple vCenters at once, so simply dumping $global:DefaultVIServer is not an option. Any suggestions would be helpful. We have an extremely large environment so I need the quickest possible way to pull this information.
Thanks in advance!