Does anyone have details on how to use wildcards with the get-view commandlet?
e.g.
get-view -viewtype virtualmachine -filter @{"Name" = "server*"}
where I want to return all vms with beginning with the name server
This doesn't work but I'm sure there is some syntax available to make this work
In the Get-View filter you can use a set of regex expressions
get-view -viewtype virtualmachine -filter @{"Name" = "^server"}
This will resturn every virtualmachine whose name starts with "server".
In VMware PowerCLI and Get-View filters you'll find some more info.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
In the Get-View filter you can use a set of regex expressions
get-view -viewtype virtualmachine -filter @{"Name" = "^server"}
This will resturn every virtualmachine whose name starts with "server".
In VMware PowerCLI and Get-View filters you'll find some more info.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks a bunch