IWMIExtension::GetWMIOBject method will not be supported on .Net server versions of the LDAP ADSI provider. (329207)



The information in this article applies to:

  • the operating system: Microsoft Windows XP
  • Microsoft Active Directory Services Interface, System Component

This article was previously published under Q329207

SUMMARY

The purpose of this article is to clarify the Microsoft position on the IWMIExtension implementation that exists in pre .Net versions of the LDAP provider. These versions include, Windows XP, all versions of Windows 2000 and those version of Windows NT that have the Directory Services Client for Windows NT Workstation installed.

MORE INFORMATION

The IWMIExtension is no longer considered a supported method for accessing the Win32_ComputerSystem object via the LDAP provider. The afore mentioned versions of the windows operating systems do provide access to this object via the LDAP provider by binding to a computer object and using the GetWMIObject method, however, using the LDAP provider to access the WMI object is not recommended and will not be supported.

The supported method for accessing the Win32_ComputerSystem object for a given computer system is to build the WMI provider string and create the object directly. This can be done in two lines of VBS code. The Following VBS code snippet illustrates how one can bind to a computer object in the AD and then build the WMI Win32_ComputerSystem path string:
dim oComp
'
' Get the computer object
set oComp = GetObject("LDAP://cn=myComputer,ou=domain controllers,dc=home,dc=com")
'
' Dimension the WMI object
'
dim oWMI
'
' Build the WMI path from the CN of the computer object as follows:
'
wmiPath = "WINMGMTS:{impersonationLevel=impersonate}!//"&oComp.Get("cn")&"/root/cimv2:Win32_ComputerSystem.Name=" &chr(34)& oComp.Get("cn") & chr(34)
WScript.Echo wmiPath
set oWMI= GetObject( wmiPath )
WScript.echo oWMI.UserName
Wscript.echo "Done"
				


In future releases of the LDAP provider the Win32_ComputerSystem object will not be available. The programmer will be responsible for building the Win32_ComputerSystem string and create the WMI object.

The MSDN documentation will is being updated to reflect this change.

REFERENCES

Current MSDN Documentation links describing the IWMIExtension object and its relationship to the LDAP provider. These links will be updated in future releases of the MSDN documentation to remove references to the IWMIExtension interface.

Accessing the Win32_ComputerSystem object via LDAP

Accessing the Win32_ComputerSystem object revisted

Overview of the WMI Extension to the LDAP provider

Modification Type:MinorLast Reviewed:3/19/2004
Keywords:kbDSWADSI2003Swept kbDSWADSI2003Swept kbinfo KB329207