wbemexec - submit a CIM operation to the CIM Server for execution
wbemexec [ -h hostname ] [ -p portnumber ]
[ -v httpversion ] [ -m httpmethod ]
[ -t timeout ]
[ -u username ] [ -w password ]
[ -d debugoption ]
[ -s ]
[ inputfilepath ]
The wbemexec command provides a command line interface to the CIM Server. The input to the command consists of a CIM request encoded in XML. The request is submitted to the CIM Server for execution. The result of the operation is returned to stdout, and consists of the CIM response encoded in XML.
By default, the operation is executed on the local host, using the
default port (5988), and the request is sent as an HTTP/1.1 request,
using the HTTP POST method.
By default, wbemexec waits 20000 milliseconds (20 seconds) on sending a
request, then times out if a response hasn't been received.
The -h
option allows the user to specify a
different host.
The -p
option allows the user to specify a different port
number.
The -v
option allows the user to specify a
different HTTP version for the request.
The -m
option allows the user to specify a
different HTTP method (i.e. M-POST) for the request.
The -t
option allows the user to specify, in milliseconds,
a different timeout value for the request.
The -u
and -w
options allow the user to specify a username and password to use for
authentication of the user and authorization of the operation.
By default, stdin is used as the input, if no input file is specified.
The -s
option enables the SSL protocol between wbemexec and
the CIM server.
The -d
option may be used to specify that debug information be included in the output.
wbemexec
recognizes the following options:
-h hostname
-p portnumber
-v httpversion
-m httpmethod
-t timeout
-u username
-w password
-s
-d debugoption
1 | Include HTTP-encapsulated XML request in output. |
2 | Include HTTP header of response in output. |
When an error occurs, an explanatory error message is written to stderr and an appropriate value is returned. The following return values are returned:
0 | Success |
1 | Error |
Submit an XML request contained in the file cimrequest.xml to the CIM Server running on the local host on the default port (5988), using the username guest and password guest for authentication and authorization:
wbemexec -u guest -w guest cimrequest.xml
Submit an XML request contained in the file cimrequest.xml to the CIM Server running on the host hpserver on port 49152, using the username guest and password guest for authentication and authorization:
wbemexec -h hpserver -p 49152 -u guest -w guest cimrequest.xml
Submit an XML request contained in the file cimrequest.xml to the CIM Server running on the local host on the default port (5988), including both the HTTP-encapsulated XML request, and the HTTP header portion of the response in the output:
wbemexec -d 1 -d 2 cimrequest.xml
wbemexec
was developed by the Hewlett-Packard Company.