Quantcast
Channel: Hyper-V forum
Viewing all articles
Browse latest Browse all 8743

Set VLAN ID on a virtual machine network on Windows 2012

$
0
0

I'm currently working in C# consuming Hyper-V V2 WMI API to do different tasks related to virtual machines. I've not been able to figure out how to get/set VLAN ID. I've found many links on net pointing to PS HyperV lib exploring "Get-VMNICVLAN" and "Set-VMNICVLAN" but they dont seem to be working from me as Nic.connection[0] always seem to be null in my case. Perhaps that only works with Windows 2008 Hyper-V.  

Also I'm not familiar with WMI scripts much so converting that code to C# is being a pain. Can someone please tell me exactly how to do so in C# using WMI.

Regards

Usman



Viewing all articles
Browse latest Browse all 8743

Trending Articles



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