Identifying VLANs in WMI

604 views
Skip to first unread message

Wayne Gault

unread,
Mar 19, 2012, 9:27:29 PM3/19/12
to Madison WI PowerShell Users Group
Hi my question is, where can I find VLAN information in WMI?

Scenario is

Take these 80 servers
Enable the nics that are in this list of VLANs

Thanks
Wayne

Adam Driscoll

unread,
Mar 20, 2012, 5:16:25 PM3/20/12
to madposh-u...@googlegroups.com
Wayne,

It looks like there isn't a WMI class that contains the WMI information you need. According to this TechNet post: http://social.technet.microsoft.com/Forums/en-US/winserverManagement/thread/839ef0c0-cd3b-473d-bc8a-bf26f65edf52/

Although there isn't a class or property there is a WMI registry provider that you could use to query the registry values through WMI. This is described in this post. http://itknowledgeexchange.techtarget.com/powershell/wmi-and-the-registry/

This should allow you to access the servers via WMI and query the registry for the VLAN information. 

Hope this leads you in the right direction!

Adam

Steven Murawski

unread,
Mar 20, 2012, 5:21:45 PM3/20/12
to madposh-u...@googlegroups.com
Wayne, 

It depends on where the VLAN information is being configured for the NIC.  Is the NIC handling the VLAN tagging?  Is this a physical or virtual machine?  If virtual, which virtualization platform?

Windows (by default) does not support vlan tagging, but some NIC vendors do with their proprietary NIC configuration software.

Some of those vendors provide an API to access that information (WMI or otherwise) but that is going to vary based on vendor.

Hypervisors allow for virtual NICs to have their traffic tagged for a particular vlan, but again where that information is stored will vary by vendor.

Steve
--
Steven Murawski
Microsoft MVP - PowerShell
http://blog.usepowershell.com/


Reply all
Reply to author
Forward
0 new messages