Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 294344

Re: Use get-view to get datacenter of host

$
0
0

Try something like this

$esx = Get-VMHost MyEsx
$parent = $esx.ExtensionData.Parent
$loc = Get-View $parent
while($loc.getType().Name -ne "Datacenter"){
    $parent = $loc.Parent
    $loc = Get-View $parent
}
$loc.Name

Viewing all articles
Browse latest Browse all 294344

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>