I got a param script and need to get vmhost info
params($vc,$dc,$cluster,$vmhost)
if ($dc -or $cluster -eq $null) {
get-vmhost $vmhost | select Name, etc.....
}
else if ($cluster -and $vmhost -eq $null}
get-datacenter $dc | get-vmhost | select Name, etc....
else if ($vmhost -eq $null}
get-datacenter | get-cluster | get-vmhost | select Name etc....
Is this correct?