|
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
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
|
