WbemAuthenticationLevelEnum enumeration (wbemdisp.h)

The WbemAuthenticationLevelEnum constants define the security authentication levels. These constants are used with SWbemSecurity and in moniker connections to WMI.

The WMI scripting type library, wbemdisp.tlb, defines these constants. Visual Basic applications can access this library.

Script languages must use one of the following:

  • The short name. For example, for WbemAuthenticationLevelPktPrivacy use "PktPrivacy".
    
    strComputer = "RemoteComputer"
    Set objWMIServices = GetObject("WINMGMTS:" _
        & "{authenticationLevel=pktPrivacy}!\\" _
        & strComputer & "\ROOT\CIMV2")
    
  • Windows Script Host (WSH) XML file format in the script. For example, this means that the script can use the WbemAuthenticationLevelPkt constant directly.

    The following WSH script sets the authentication level. To run the script, save the text in a file with a .wsf extension.

    <?xml version="1.0" encoding="US-ASCII"?>
    <job>
    <reference object="WbemScripting.SWbemLocator"/>
    <script language="VBScript">
        set service = GetObject("winmgmts:")
        ' Following line uses a symbolic 
        ' constant from the WMI type library
        service.Security_.authenticationLevel = _
            WbemAuthenticationLevelPktPrivacy
    </script>
    </job>
    
    

    For more information, see Using the WMI Scripting Type Library.

Syntax

typedef enum WbemAuthenticationLevelEnum {
  wbemAuthenticationLevelDefault = 0,
  wbemAuthenticationLevelNone = 1,
  wbemAuthenticationLevelConnect = 2,
  wbemAuthenticationLevelCall = 3,
  wbemAuthenticationLevelPkt = 4,
  wbemAuthenticationLevelPktIntegrity = 5,
  wbemAuthenticationLevelPktPrivacy = 6
} ;

Constants

 
wbemAuthenticationLevelDefault
Value: 0
wbemAuthenticationLevelNone
Value: 1
wbemAuthenticationLevelConnect
Value: 2
wbemAuthenticationLevelCall
Value: 3
wbemAuthenticationLevelPkt
Value: 4
wbemAuthenticationLevelPktIntegrity
Value: 5
wbemAuthenticationLevelPktPrivacy
Value: 6

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Header wbemdisp.h

See also

Constructing a Moniker String

SWbemSecurity

Scripting API Constants

Setting Security on an Asynchronous Call in VBScript

Setting the Default Process Security Level Using VBScript