INFO: Default DCOM Impersonation Level Changed in Windows Management Instrumentation Version 1.5

This article has been archived. It is offered "as is" and will no longer be updated.
In Microsoft Windows Management Instrumentation version 1.5, the default DCOM impersonation level is RPC_C_IMP_LEVEL_IMPERSONATE. In earlier versions of WMI, the default level was RPC_C_IMP_LEVEL_IDENTIFY.
More information
In WMI 1.1, you had to explicitly set the DCOM impersonation level to RPC_C_IMP_LEVEL_IMPERSONATE. For example, the following Microsoft Visual Basic code explicitly sets the impersonation level:
Set classObj = GetObject("WinMgmts:{impersonationLevel=impersonate}!//./root/cimv2:Win32_logicalDisk")For Each obj In classObj.instances_    ' Process this instanceNext				
This step is no longer necessary. For example:
Set classObj = GetObject("WinMgmts://./root/cimv2:Win32_logicalDisk")For Each obj In classObj.instances_    ' Process this instanceNext				
In WMI 1.1, the classObj.instances_ call would fail with error code 0x80041003 (WBEM_E_ACCESS_DENIED) because the provider needs to impersonate the client in order to access system information. Because WMI 1.5 impersonates the client by default, the code would succeed. However, you may still want to explicitly set the impersonation level in order to maintain compatibility with previous versions of WMI.
See the WMI programming documentation in the Platform SDK for more details.
WMI WBEM impersonation impersonate WBEM_E_ACCESS_DENIED client

Article ID: 243488 - Last Review: 01/10/2015 12:12:28 - Revision: 4.0

Microsoft Windows 2000 Server, Microsoft Windows 2000 Advanced Server, Microsoft Windows 2000 Professional Edition

  • kbnosurvey kbarchive kbinfo kbwbem KB243488