WS SDK Professional Edition Development Utilities
wbemop
The wbemop program is a CLI (Command Line Interface) utility that will allow a user to execute CIM Operations against a WBEM Server.
Run wbemop from the following directory
Platform | Directory |
---|---|
Windows | C:\Program Files\ws\sdk\bin |
Linux | /usr/ws/sdk/bin |
Solaris | /opt/ws/sdk/bin |
Command Line Syntax
The wbemop utility can be invoked by typing wbemop at the command prompt. The command line syntax for the wbemop utility is included in the two following tables.
C:\>cd \Program Files\ws\sdk\bin
C:\Program Files\ws\sdk\bin>wbemop -h
WBEMOp [options] OBJECTPATH COMMAND [ATTRS]
Copyright (c) 2002-2010 WS, Inc.
Use is Subject to
License Terms.
Options:
-ac <name> Association class name
-ar <name> Association
role argument
-co Include class origin information
-d Display
debug information
-dh Deep Inheritance off
-f <filter> Filter
for query execution
-h Display this usage statement
-kf <file> KeyStore File (Mutual Authentication)
-kp <password> KeyStore Password (Mutual Authentication)
-l <locales> List of locales in priority order.
-lo Include
local properties only
-nq Do not include qualifiers
-p <credential> WBEM Server credential (e.g. password)
-ph <host> HTTP Proxy Host
-pl <prop>,* Comma-separated property list
-pp <port> HTTP Proxy Port
-ql <language> Query Language to use for executing queries
-rc <name> Result class name
-rp
<credential> WBEM Server Role credential (e.g. password)
-ru <principal> WBEM Server Role principal (e.g. role to assume)
-rr <name> Result role class name
-s
<server> WBEM Server URL
-tf <file> TrustStore File
(Mutual Authentication)
-u <principal> WBEM Server principal (e.g. username)
-v Display the version information
-wp <protocol> WBEM Protocol (e.g. CIM-XML, WS-Management, ..)
-x Display the results in XML
-mo Maximimum number of objects for
each Pull request (defau lt 1)
-su Change the Resource URI (default: http://schemas.dmtf.or
g/wbem/wscim/1/cim-schema/2/)
Commands:
OBJECTPATH The objectpath of the element.
COMMAND
ci Create an Instance
dc Delete a Class
di Delete an
Instance
dq Delete a Qualifier Type Declaration
ec Enumerate
Classes
ei Enumerate Instances
eq Enumerate Qualifier
Types Declarations
gc Get a Class
gi Get an Instance
gq Get a Qualifier Type Declaration
mi Modify an Instance
nc Enumerate Class Names
ni Enumerate Instance Names
as Associators
an AssociatorNames
rs References
rn
ReferenceNames
qe Execute the supplied/default query
pan Pull Associator Names
pas Pull Associators
pei Pull
Enumerate Instance
pni Pull Enumerate Instance Names
prn Pull
Reference Names
prs Pull References
ATTRS prop=value[,prop=value]
Examples:
wbemop -s http://myhost/interop CIM_Test.InstanceID="org id:3" mi array={1;2;3 }
wbemop -pl name,handle -s
https://localhost/interop CIM_ProtocolAdapter ei
wbemop -nq CIM_ManagedElement gc
C:\Program Files\ws\sdk\bin>
CAUTION: wbemop does not support metadata operations (e.g. gc, ec, etc) when using the WS-Management protocol because the WS-Management protocol does not support metadata operations.
Default Values
The following table shows the default values for each of the option arguments. If an option is not listed, then it has no default value.
Option | Description | Default |
---|---|---|
-ac | Association | null |
-ar | Association Class argument | null |
-co | Class origin | TRUE |
-d | Display XML Debug Information | FALSE |
-dn | Deep Inheritance | TRUE |
-h | Display this usage statement | FALSE |
-lo | Include local properties only | FALSE |
-nq | Do not include qualifiers | FALSE |
-p <credentials> | CIM Server credential (e.g. Password) | null |
-pl <prop><prop> | Query Language | WQL |
ql | Comma-separated propery list | null |
-rc | Result class argument | null |
-rr | Result Role argument | null |
-s <server> | WBEM Server URL | http://localhost/interop |
-u <proncipal> | WBEM Server principal (e.g. Username) | guest |
-v | Display the version information | FALSE |
-wp | WBEM Protocol | CIM-XML |
-x | Prints the results in cimXML format | FALSE |
Example
The following use cases will show examples of how to use wbemop. The examples shown use CIM-XML a secure HTTPS connection. To use an HTTP connection, replace https with http.
For example:
Replace
wbemop -s https://localhost/interop -u user1 -p pass1 CIM_ObjectManager ei
With
wbemop -s http://localhost/interop
-u user1 -p pass1 CIM_ObjectManager ei
C:\>cd \Program Files\ws\sdk\bin
C:\Program Files\ws\sdk\bin>wbemop -s https://localhost/interop -u user1 -p pass1 CIM_ObjectManager ei instance of WBEMSolutions_ObjectManager {
Version = "3.4.3";
Build = "04/21/2010 04:55";
PrimaryOwnerName = "WS, Inc.";
PrimaryOwnerContact = "http://www.ws-inc.com/";
Caption = "WS J WBEM Server";
Description = "WS J WBEM Server";
ElementName = "WS J WBEM Server";
Started = true;
OperationalStatus = {2};
CreationClassName = "WBEMSolutions_ObjectManager";
SystemCreationClassName = "WBEMSolutions_ComputerSystem";
SystemName = "192.168.2.104";
Name = "WBEMSolutions:e05f6594-7b0f-44f3-a690-d34e75a8f849";
};
Processed 1 elements in 1657 milliseconds.
C:\Program Files\ws\sdk\bin>
For more information about the the WS products please contact sales.