public interface SWbemSecurity
The SWbemLocator, SWbemServices, SWbemObject, SWbemObjectSet, SWbemObjectPath, SWbemLastError, and SWbemEventSource objects have a Security_ property, which is the SWbemSecurity object.
When you retrieve an instance or view the WMI security log, you might need to set the properties of the Security_ object.
The VBScript CreateObject call cannot create the Security object.
The security settings in this object do not identify the authentication, impersonation, or privilege settings on a connection to WMI, or the security in effect for the proxy when an object is delivered to a sink in an asynchronous call.
To reduce the possibility of unauthorized code being able to get control, the system should run with the least privilege necessary. Applications that need to call functions that require special privileges can leave the system open to attack by hackers. Such applications should be designed to run for short periods of time and should inform the user of the security implications involved.
For information about how to run as different users and how to enable privileges in your application, see the following topics:
| Modifier and Type | Method and Description |
|---|---|
int |
getAuthenticationLevel()
Numeric value that defines the COM Authentication level that is assigned to this object.
|
int |
getImpersonationLevel()
Numeric value that defines the COM Impersonation level
that is assigned to this object.
|
SWbemPrivilegeSet |
getPrivileges()
object that defines privileges for this object.
|
int getAuthenticationLevel()
strComputer = "RemoteComputer"
Set objWMIServices = GetObject("WINMGMTS:" _
& "{authenticationLevel=pktPrivacy}!\\" _
& strComputer & "\ROOT\CIMV2")
int getImpersonationLevel()
SWbemPrivilegeSet getPrivileges()
Copyright © 2020. All rights reserved.