Quantcast
Viewing all articles
Browse latest Browse all 185049

Re: Command powershell for choise good esx

You can specify that the ESXi should be in a "connected" state

$esx = Get-Datastore xxxxx | Get-VMHost -State Connected

if($esx){

   $rEsx = $esx | Get-Random

   ....

}

If $esx is empty, the code block following the If-statement will not be executed.


Viewing all articles
Browse latest Browse all 185049

Trending Articles