PowerShell Snip of the Week (SCVMM)

 

imageHere is this weeks PowerShell Snip of the Week.

Using Get-VirtualNetworkAdapter.

When looking into a recent issue with a NIC Team on a host, I had a need for a quick way to identify which VMs were using a particular logical network and their MAC Address so that the VM(s) traffic could be identified with WireShark.

This snip targets VMs on a specified cluster that are assigned to a certain logical network.

Get-VMHostCluster CLUSTERNAME | Get-VMHost| Get-VM |Get-VirtualNetworkAdapter |? LogicalNetwork -eq “LOGICALNETWORKNAME”| FT name, logicalnetwork, macaddress -a

Advertisements
This entry was posted in Hyper-V, PowerShell, SCVMM and tagged , , , , . Bookmark the permalink.

One Response to PowerShell Snip of the Week (SCVMM)

  1. Pingback: Microsoft Most Valuable Professional (MVP) – Best Posts of the Week around Windows Server, Exchange, SystemCenter and more – #75 - Flo's Datacenter Report

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s