Export (0) Print
Expand All

WbemAuthenticationLevelEnum

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.

The following values can be used to set the authentication level.

Constant/valueDescription
WbemAuthenticationLevelDefault
0 (0x0)

Short name: Default

WMI uses the default Windows Authentication setting.

WbemAuthenticationLevelNone
1 (0x1)

Short name: None

Uses no authentication.

WbemAuthenticationLevelConnect
2 (0x2)

Short name: Connect

Authenticates the credentials of the client only when the client establishes a relationship with the server.

WbemAuthenticationLevelCall
3 (0x3)

Short name: Call

Authenticates only at the beginning of each call when the server receives the request.

WbemAuthenticationLevelPkt
4 (0x4)

Short name: Pkt

Authenticates that all data received is from the expected client.

WbemAuthenticationLevelPktIntegrity
5 (0x5)

Short name: PktIntegrity

Authenticates and verifies that none of the data transferred between client and server has been modified.

WbemAuthenticationLevelPktPrivacy
6 (0x6)

Short name: PktPrivacy

Authenticates all previous impersonation levels and encrypts the argument value of each remote procedure call.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Wbemdisp.h

IDL

Wbemdisp.idl

See also

Scripting API Constants
Setting the Default Process Security Level Using VBScript
Setting Security on an Asynchronous Call in VBScript
Constructing a Moniker String
SWbemSecurity

 

 

Show:
© 2014 Microsoft