GetInstance()
You can use the GetInstance()
method to retrieve a single instance of an object from the target namespace.
Parameters
Table 221 shows the parameters you can specify for the
GetInstance() method:
Table 221. GetInstance() parameters
|
Parameter |
Type |
Description |
| InstanceName |
String |
Defines the name of the instance to retrieve |
| LocalOnly |
Boolean |
If set to TRUE, returns all properties, methods, and
qualifiers overridden within the definition of the class |
| IncludeQualifiers |
Boolean |
If set to TRUE, returns all qualifiers for the class,
its properties, methods, or method parameters; if set to FALSE, returns no
qualifiers |
| IncludeClassOrigin |
Boolean |
If set to TRUE, returns the CLASSORIGIN attribute of
the class |
Return values
The GetInstance() method returns the specified class or one of the following
error codes:
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER
- CIM_ERR_INVALID_CLASS
- CIM_ERR_NOT_FOUND
- CIM_ERR_FAILED