SWbemPrivilegeSet.Remove method
The Remove method of the SWbemPrivilegeSet object deletes a privilege from the collection.
For an explanation of this syntax, see Document Conventions for the Scripting API.
Syntax
SWbemPrivilegeSet.Remove( _
ByVal iPrivilege _
)
Parameters
-
iPrivilege
-
Required. This is one of the WMI constants from the WbemPrivilegeEnum group. These constants are essentially integers that represent specific privileges. For example, to remove the privilege that allows you to shut down a Windows system, use the wbemPrivilegeShutdown constant or the numeric equivalent of 0x17.
Return value
This method does not return a value.
Error codes
Upon completion of the Remove method, the Err object may contain one of the error codes in the following list.
-
wbemErrFailed - 2147749889 (0x80041001)
-
Unspecified error.
-
wbemErrNotFound - 2147749890 (0x80041002)
-
Specified privilege does not exist.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista |
Minimum supported server |
Windows Server 2008 |
Header |
|
Type library |
|
DLL |
|
CLSID |
CLSID_SWbemPrivilegeSet |
IID |
IID_ISWbemPrivilegeSet |