Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 293210

Identify VM's in specific portgroups

$
0
0

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


Viewing all articles
Browse latest Browse all 293210

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>