WBEM Client Usage
Here we will teach you how to use the most usefull WBEM commands with SBLIM wbemcli.
1. Enumerate Class Names
This command will list all the CIM classes' name available in the namespace.
Usage:
$ wbemcli ecn 'http://server/namespace'
2. Enumerate Instance Names
This command will list all the CIM instances' name available in the namespace.
Usage:
$ wbemcli ein 'http://server/namespace:classname'
3. Enumerate Instances
This command will list all the CIM instances and their properties available in the namespace.
Usage:
$ wbemcli ei 'http://server/namespace:classname'
4. Get Instance
This command will list all the properties of the requested CIM instance.
Usage:
$ wbemcli gi 'http://server/namespace:classname.StringKeyProperty="string prop",BooleanKeyProperty=true,NumericKeyProperty=25'
5. Get Class Definition
This command will ouput the class definition of the requested CIM class.
Usage:
$ wbemcli gcd 'http://server/namespace:classname'
6. Call Method
This command will call a requested method of a CIM instance.
Usage:
$ wbemcli cm http://server/namespace:classname.KeyProperty="KeyValue" MethodName.StringPro="string val",BoolProp=true,NumProp=25
7. Usefull options
- The new line option prints a new line after each listed properties. This option is very useful with the ei, gi and cm commands.
Usage:
$ wbemcli gi -nl 'http://server/namespace:classname.StringKeyProperty="string prop",BooleanKeyProperty=true,NumericKeyProperty=25'
