AuthenticationLevel Property

 

Description

 

The AuthenticationLevel property is an integer that defines the COM Authentication level that is assigned to this object. This setting determines how you protect information sent from WMI. In general, it is not necessary to set the authentication level when making WMI API calls. If you do not set this property, the default COM Authentication level for your system is used.

 

PowerBASIC Syntax

 

PROPERTY GET AuthenticationLevel () AS LONG

PROPERTY SET AuthenticationLevel (BYVAL iAuthenticationLevel AS LONG)

 

Parameters (set property only)

 

iAuthenticationLevel

 

LONG. The authentication level.

 

Return Value (get property only)

 

LONG. The authentication level.

 

Remarks

 

You can set the authentication level of the SWbemServices, SWbemObject, SWbemObjectSet, SWbemObjectPath, and SwbemLocator objects by setting the AuthenticationLevel property to the desired value.

 

The following example shows how to set the authentication level for an SwbemObject object.

 

[VBScript]

objinstance.Security_.AuthenticationLevel = wbemAuthenticationLevelPkt

 

[PowerBASIC]

objinstance.Security_.AuthenticationLevel = %wbemAuthenticationLevelPkt

 

You can also specify authentication levels as part of a moniker. The following example sets the authentication level and the impersonation level, and retrieves an instance of Win32_LogicalDisk.

 

[VBScript]

Set objinst = GetObject("WinMgmts:{impersonationLevel=impersonate," & _

                    "authenticationLevel=pktPrivacy}" & _

                    "!root/cimv2:Win32_LogicalDisk='c:'")

 

[PowerBASIC]

objinst = WmiGetObject("WinMgmts:{impersonationLevel=impersonate," & _

                    "authenticationLevel=pktPrivacy}" & _

                    "!root/cimv2:Win32_LogicalDisk='c:'")

 

Requirements

 

Client

Requires Windows Vista, Windows XP, Windows 2000 Professional, Windows NT Workstation 4.0 SP4 and later, Windows Me, Windows 98, or Windows 95 OSR2 and later.

Server

Requires Windows Server 2008, Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0 SP4 and later.

Type Library

Use Wbemdisp.tlb.

DLL

Requires Wbemdisp.dll.

 

 

Valid XHTML 1.0 Transitional