2

Is there a way to display the full settings of a specific Hyper-V vSwitch using Powershell? I'm trying to configure port-mirroring from the vSwitch to the Destination vNIC on a VM and so I've set the vSwitch as the mirror Source but I want to be able to check that the setting has been applied.

OS is Windows Server 2012 R2

Thanks

takesides
  • 101
  • 1
  • 10
  • 1
    For future uses of powershell, check this command: `Get-Command | Where-Object {$_.Source -eq 'Hyper-V'}`, this will list you all commands related to source `Hyper-V` (and you can, of course, change Hyper-V to whatever you like to know) – Lenniey Sep 08 '17 at 12:32
  • @Lenniey You can even avoid the UUoP `Get-Command -Module 'Hyper-V'`. – jscott Sep 09 '17 at 11:12

1 Answers1

2

This should be what you need:

get-vmswitch | select *
Mike Shepard
  • 748
  • 3
  • 7
  • Thanks. That is pretty useful but it doesn't give me exactly what I need. I want to find out if a vSwitch is configured as a port mirroring source or not. – takesides Sep 08 '17 at 16:30
  • [This post](https://blogs.technet.microsoft.com/networking/2015/10/16/setting-up-port-mirroring-to-capture-mirrored-traffic-on-a-hyper-v-virtual-machine/) has some info about port mirroring and PowerShell. I don't have anything like this set up, so I can't give you anything specific. – Mike Shepard Sep 08 '17 at 20:05