{"id":55103,"date":"2008-09-09T02:22:00","date_gmt":"2008-09-09T02:22:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2008\/09\/09\/hey-scripting-guy-how-do-i-find-information-about-the-network-adapter-cards-on-my-computer\/"},"modified":"2008-09-09T02:22:00","modified_gmt":"2008-09-09T02:22:00","slug":"hey-scripting-guy-how-do-i-find-information-about-the-network-adapter-cards-on-my-computer","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/hey-scripting-guy-how-do-i-find-information-about-the-network-adapter-cards-on-my-computer\/","title":{"rendered":"Hey, Scripting Guy! How Do I Find Information About the Network Adapter Cards on My Computer?"},"content":{"rendered":"<p><span class=\"Apple-style-span\"><\/p>\n<h2><font class=\"Apple-style-span\" face=\"Verdana\" size=\"4\"><span class=\"Apple-style-span\"><b><\/b><\/span><\/font><\/h2>\n<div>\n<p><img decoding=\"async\" class=\"nearGraphic\" title=\"Hey, Scripting Guy! Question\" height=\"34\" alt=\"Hey, Scripting Guy! Question\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" width=\"34\" align=\"left\" border=\"0\" \/> <\/p>\n<p>Hey, Scripting Guy! When I use WMI to query for network cards on my laptop, it comes back with 32 network cards. 32! I am not lying. My laptop does not even have 32 slots, so how does it have 32 network cards in it? How can I find information about the &#8220;real&#8221; network cards on my laptop? I figure I should only have two: the wired NIC and the wireless NIC, but I am getting all kinds of stupid stuff coming back. Help!<\/p>\n<p>&#8211; LB<\/p>\n<p><img decoding=\"async\" height=\"5\" alt=\"Spacer\" src=\"https:\/\/devblogs.microsoft.com\/scripting\/wp-content\/uploads\/sites\/29\/2019\/05\/spacer.gif\" width=\"5\" border=\"0\" \/><img decoding=\"async\" class=\"nearGraphic\" title=\"Hey, Scripting Guy! Answer\" height=\"34\" alt=\"Hey, Scripting Guy! Answer\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" width=\"34\" align=\"left\" border=\"0\" \/> <\/p>\n<p>Hi LB,<\/p>\n<p>So you need help looking for your network interface card. Have you waited until after sunset? That is when you can find a NIC at \u2026 (old joke). Speaking of old things, we used to be able to find our real network card by finding the one that was bound to TCP\/IP. We would query the&nbsp;<b>Win32_NetworkAdapterConfiguration<\/b>&nbsp;WMI class, and filter on the&nbsp;<b>IPEnabled<\/b>&nbsp;property. Using this approach we would have done something like this: <\/p>\n<pre class=\"codeSample\">PS C:\\&gt; Get-WmiObject -Class Win32_NetworkAdapterConfiguration `\n-filter \"IPEnabled = $true\"\n<\/pre>\n<p>The problem with this methodology these days is that some of the pseudo-adapters you were complaining about so vociferously are also<b>IPEnabled<\/b>. The above command would eliminate many, but not necessarily all of the adapters.<\/p>\n<p>A better approach is to look at the&nbsp;<b>Win32_NetworkAdapter<\/b>&nbsp;class and query the&nbsp;<b>NetConnectionStatus<\/b>&nbsp;property. Using this technique, we return only network adapter devices that are actually connected to a network. While it is possible that a pseudo-adapter could sneak under the wire (pun intended), the likelihood is more remote (pun unintended). In this command we will use the&nbsp;<b>Get-WmiObject<\/b>PowerShell cmdlet to return all instances of the&nbsp;<b>Win32_NetworkAdapter<\/b>&nbsp;class on the computer. We then create a table to display the data returned by the&nbsp;<b>NetConnectionStatus<\/b>&nbsp;property: <\/p>\n<pre class=\"codeSample\">PS C:\\&gt; Get-WmiObject -Class Win32_NetworkAdapter | \nFormat-Table -Property Name, NetConnectionStatus -AutoSize\n<\/pre>\n<p>The fruit of our labor is somewhat impressive. We have a nice table that details all of the fake and real network adapters on our laptop, as well as the connection status of each. Here is the list from my laptop:<\/p>\n<table class=\"dataTable\" id=\"EYD\" cellSpacing=\"0\" cellPadding=\"0\">\n<thead>\n<tr class=\"stdHeader\" vAlign=\"top\">\n<td class=\"\" id=\"colE1D\">Value<\/td>\n<td class=\"\" id=\"colE5D\">NetConnectionStatus<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">WAN Miniport (L2TP)<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">WAN Miniport (PPTP)<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">WAN Miniport (PPPOE)<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">WAN Miniport (IPv6)<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Intel(R) PRO\/1000 PL Network Connection<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">2<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Intel(R) PRO\/Wireless 3945ABG Network Connection<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">0<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">WAN Miniport (IP)<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Microsoft 6to4 Adapter<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Bluetooth Personal Area Network<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">RAS Async Adapter<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">isatap.{51AAF9FF-857A-4460-9F17-92F7626DC420}<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Virtual Machine Network Services Driver<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Microsoft ISATAP Adapter<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Bluetooth Device (Personal Area Network)<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">7<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">6TO4 Adapter<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Microsoft 6to4 Adapter<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Microsoft Windows Mobile Remote Adapter<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">isatap.launchmodem.com<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">isatap.{647A0048-DF48-4E4D-B07B-2AE0995B269F}<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Microsoft Windows Mobile Remote Adapter<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">WAN Miniport (SSTP)<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">WAN Miniport (Network Monitor)<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">6TO4 Adapter<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">6TO4 Adapter<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Microsoft 6to4 Adapter<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Microsoft Windows Mobile Remote Adapter<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">isatap.{C210F3A1-6EAC-4308-9311-69EADBA00A04}<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">isatap.launchmodem.com<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Virtual Machine Network Services Driver<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Virtual Machine Network Services Driver<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">Teredo Tunneling Pseudo-Interface<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">isatap.{647A0048-DF48-4E4D-B07B-2AE0995B269F}<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Status not reported<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"dataTableBottomMargin\"><\/div>\n<p>There are two things you will no doubt notice. The first is that most of the network adapters report no status whatsoever. The second thing you will notice is that the ones that do report a status do so in some kind of code. The previous table is therefore pretty much useless! But it does look nice.<\/p>\n<p>A little work in the Windows SDK looking up the&nbsp;<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa394216(VS.85).aspx\" target=\"_blank\">Win32_NetworkAdapter<\/a>&nbsp;WMI class, and we run across the following information:<\/p>\n<table class=\"dataTable\" id=\"ELBAC\" cellSpacing=\"0\" cellPadding=\"0\">\n<thead>\n<tr class=\"stdHeader\" vAlign=\"top\">\n<td class=\"\" id=\"colENBAC\">Value<\/td>\n<td class=\"\" id=\"colERBAC\">Meaning<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">0<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Disconnected<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">1<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Connecting<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">2<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Connected<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">3<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Disconnecting<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">4<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Hardware not present<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">5<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Hardware disabled<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">6<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Hardware malfunction<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">7<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Media disconnected<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">8<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Authenticating<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">9<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Authentication succeeded<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">10<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Authentication failed<\/p>\n<\/td>\n<\/tr>\n<tr class=\"evenRecord\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">11<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Invalid address<\/p>\n<\/td>\n<\/tr>\n<tr class=\"record\" vAlign=\"top\">\n<td class=\"\">\n<p class=\"lastInCell\">12<\/p>\n<\/td>\n<td class=\"\">\n<p class=\"lastInCell\">Credentials required<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"dataTableBottomMargin\"><\/div>\n<p>Ah, the results of our quest for networking nirvana. The value of 2 means the network adapter is connected. Here is the code we wrote to exploit the results of our research:<\/p>\n<pre class=\"codeSample\">Get-WmiObject -class win32_networkadapter -filter \"NetConnectionStatus = 2\" | format-list -Property [a-z]*<\/pre>\n<p>However, such ecstasy is short lived when we realize that, even though we have indeed returned information about a network adapter that is connected, we do not have any of the configuration information from the card. Bummer! Note the results of the query:<\/p>\n<p><img decoding=\"async\" height=\"375\" alt=\"First run graphic\" src=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/qanda\/hsg\/hey0908\/networkadapterclass.jpg\" width=\"500\" border=\"0\" \/> <\/p>\n<p>&nbsp;<\/p>\n<p>What we need is to be able to use the&nbsp;<b>NetConnectionStatus<\/b>&nbsp;property from Win32_Networkadapter and to be able to obtain the TCP\/IP configuration information from the&nbsp;<b>Win32_NetworkAdapterConfiguration<\/b>&nbsp;WMI class. This sounds like a job for an association class. In VBScript, querying an&nbsp;<b>Association<\/b>&nbsp;class involved performing confusing&nbsp;<b>AssociatorsOf<\/b>&nbsp;queries. (Refer to the Microsoft Press book,<a href=\"http:\/\/www.microsoft.com\/products\/info\/product.aspx?view=22&amp;pcid=0b694f48-bd0d-47b0-baf5-16a41c6231ae&amp;type=ovr\" target=\"_blank\">Microsoft Windows Scripting with WMI: Self-Paced Learning Guide<\/a>, for more information about this technique.)<\/p>\n<p>Using the&nbsp;<b>Association<\/b>&nbsp;class with Windows PowerShell, we come up with the script shown&nbsp;here: <\/p>\n<pre class=\"codeSample\">Param($computer = \"localhost\")\nfunction funline ($strIN)\n{\n $num = $strIN.length\n for($i=1 ; $i -le $num ; $i++)\n  { $funline = $funline + \"=\" }\n    Write-Host -ForegroundColor yellow $strIN \n    Write-Host -ForegroundColor darkYellow $funline\n} #end funline\n\nWrite-Host -ForegroundColor cyan \"Network adapter settings on $computer\"\nGet-WmiObject -Class win32_NetworkAdapterSetting `\n-computername $computer |\nForeach-object `\n {\n  If( ([wmi]$_.element).netconnectionstatus -eq 2)\n    {\n     funline(\"Adapter: $($_.setting)\")\n     [wmi]$_.setting\n     [wmi]$_.element\n    } #end if\n } #end foreach\n<\/pre>\n<p>We begin the script by using a command-line parameter to allow us to run the script remotely, if needed. We use the&nbsp;<b>Param<\/b>&nbsp;statement to do this. We also create a function named&nbsp;<b>funline<\/b>&nbsp;that is used to underline the results of the query. It makes the output nicer if there is a large amount of data returned: <\/p>\n<pre class=\"codeSample\">Param($computer = \"localhost\")\nfunction funline ($strIN)\n{\n $num = $strIN.length\n for($i=1 ; $i -le $num ; $i++)\n  { $funline = $funline + \"=\" }\n    Write-Host -ForegroundColor yellow $strIN \n    Write-Host -ForegroundColor darkYellow $funline\n} #end funline\n<\/pre>\n<p>We print out the name of the computer by using the&nbsp;<b>Write-Host<\/b>&nbsp;cmdlet as seen here. We use the color cyan so that the text will show up very nicely on the screen:<\/p>\n<pre class=\"codeSample\">Write-Host -ForegroundColor cyan \"Network adapter settings on $computer\"<\/pre>\n<p>Then we get down to the actual WMI query. To do this, we use the&nbsp;<b>Get-WmiObject<\/b>&nbsp;cmdlet. We use the&nbsp;<b>-computername<\/b>&nbsp;parameter to allow the script to run against other computers, and we pipeline the results to the&nbsp;<b>ForEach-Object<\/b>&nbsp;cmdlet: <\/p>\n<pre class=\"codeSample\">Get-WmiObject -Class win32_NetworkAdapterSetting `\n-computername $computer |\nForeach-object `\n<\/pre>\n<p>The hard part of the query is seen here. We need a way to look at the&nbsp;<b>netConnectionStatus<\/b>&nbsp;property of the&nbsp;<b>Win32_NetworkAdapter<\/b>class. This class is referred to by the reference returned from the association query. It is called&nbsp;<b>element<\/b>. To gain access to this class, we use the reference that was returned and feed it to the [WMI] type accelerator (it likes to receive a path, and this is what the reference is). Because the reference refers to a specific instance of a WMI class, and because the [WMI] type accelerator can query a specific instance of a class, we are now able to obtain the value of the&nbsp;<b>netConenctionStatus<\/b>&nbsp;property. So we say in our script that if it is equal to 2, we will print out the name of the network adapter, and the configuration that is held in the&nbsp;<b>setting<\/b>&nbsp;property, and the adapter information that is held in the&nbsp;<b>element<\/b>&nbsp;property. This section of the code is seen&nbsp;here: <\/p>\n<pre class=\"codeSample\">{\n  If( ([wmi]$_.element).netconnectionstatus -eq 2)\n    {\n     funline(\"Adapter: $($_.setting)\")\n     [wmi]$_.setting\n     [wmi]$_.element\n    } #end if\n<\/pre>\n<p>The result of running the script is that it displays information from both the&nbsp;<b>Win32_NetworkAdapter<\/b>&nbsp;WMI class and the<b>Win32_NetworkAdapterConfiguration<\/b>&nbsp;class. It also shows us we only have one connected network adapter. Take a look for yourself:<\/p>\n<p><img decoding=\"async\" height=\"375\" alt=\"Query results graphic\" src=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/qanda\/hsg\/hey0908\/filterassociatednetworkadaptersresults.jpg\" width=\"500\" border=\"0\" \/> <\/p>\n<p>&nbsp;<\/p>\n<p>LB, I hope this script can help you to find the real network adapter on your computer. In addition, you can use this same technique to probe the depths of results from other association classes. I know we will be reviewing some of these classes in the near future. Thanks for the question, and relax. You do not really have 32 network adapters on your computer.<\/p>\n<p><font class=\"Apple-style-span\" face=\"Verdana\" size=\"3\"><span class=\"Apple-style-span\"><b><b>Ed Wilson and Craig Liebendorfer, Scripting Guys<\/b><\/b><\/span><\/font><\/p>\n<p><font class=\"Apple-style-span\" face=\"Verdana\" size=\"3\"><b><\/b><\/font><\/div>\n<p><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey, Scripting Guy! When I use WMI to query for network cards on my laptop, it comes back with 32 network cards. 32! I am not lying. My laptop does not even have 32 slots, so how does it have 32 network cards in it? How can I find information about the &#8220;real&#8221; network cards [&hellip;]<\/p>\n","protected":false},"author":595,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[36,34,332,37,3,4,45,6],"class_list":["post-55103","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-client-side-management","tag-hardware","tag-network-adapters","tag-networking","tag-scripting-guy","tag-scripting-techniques","tag-windows-powershell","tag-wmi"],"acf":[],"blog_post_summary":"<p>Hey, Scripting Guy! When I use WMI to query for network cards on my laptop, it comes back with 32 network cards. 32! I am not lying. My laptop does not even have 32 slots, so how does it have 32 network cards in it? How can I find information about the &#8220;real&#8221; network cards [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/55103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/595"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=55103"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/55103\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=55103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=55103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=55103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}