Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

The Filter is based on a property in the object(s) you want to retrieve.
Since the VirtualMachine object does not have a property indicating the Cluster, that is hard/impossible to do.

A better option is to use the SearchRoot parameter.

$cl = Get-Cluster -Name $cluster

Get-View -ViewType VirtualMachine -SearchRoot $cl.Id


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference