Hi,
I run the below to find vm's in specific portgroups:
Get-Vm | Where {(Get-VirtualPortgroup -vm $_).name -match "P_Res*"}
But it is very slow and instead of using the Get-VM I was wondering if it was possible to use Get-VirtualPortGroup - something like this:
get-cluster | get-vmhost | get-virtualportgroup | where {$_.name -match "P_Res*"} | get-vm
Of course it doesn't work - maybe someone can help me tweak this process?
/Kim