Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

The network adapter name cannot be retrieved by using ifAlias if the network adapter name contains multibyte characters


View products that this article applies to.

Symptoms

Consider the following scenario:
  • You have a network that is running the Simple Network Management Protocol (SNMP).
  • You use a SNMP agent to monitor the network.
  • You send an ifAlias request to return the network adapter name from the network.
In this scenario, the SNMP agent cannot collect the network adapter name from the network by using the ifAlias request.

↑ Back to the top


Cause

This issue occurs when the network adapter name contains multibyte characters. This behavior is by design. The IfAlias request can only use ASCII characters as mandated by RFC 2863. For more information about RFC 2863, visit the following Internet Engineering Task Force webpage:

↑ Back to the top


Workaround

To work around this issue, and obtain the network adapter name, use the following sample Windows Management Instrumentation (WMI) script.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
strComputer = "." 

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")

Set colItems = objWMIService.ExecQuery( _

"SELECT * FROM Win32_NetworkAdapter where PhysicalAdapter=TRUE",,48)

For Each objItem in colItems

Wscript.Echo "Win32_NetworkAdapter instance - NetConnectionID: " &objItem.NetConnectionID

Next

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2639402
Revision : 1
Created on : 1/7/2017
Published on : 12/16/2011
Exists online : False
Views : 439