openwsman command line client
Klaus Kämpf edited this page Oct 15, 2013
·
9 revisions
wsmancli is the command line client which uses the openwsman client interface and API to provide a utility for testing and accessing WS-Management information from the command line.
Most RPM-based Linux distributions ship the wsmancli package. You can also get the latest version at the open build service
wsman [Option...]
-?, --help --help-all Show help options --help-enumeration Enumeration Options --help-tests Test Cases --help-cim CIM Options --help-flags Request Flags --help-event Subscription Options /pre> ### Application Options-q, --version Display application version -d, --debug=1-6 Set the verbosity of debugging output. -j, --encoding Set request message encoding -c, --cacert= Certificate file to verify the peer -A, --cert= Certificate file. The certificate must be in PEM format. -K, --sslkey= SSL Key. -u, --username= User name -g, --path= Service Path (default: 'wsman') -J, --input= File with resource for Create and Put operations in XML, can be a SOAP envelope -p, --password= User Password -h, --hostname= Host name -b, --endpoint= End point -P, --port= Server Port -X, --proxy= Proxy name -Y, --proxyauth= Proxy user:pwd -y, --auth= Authentication Method -a, --method= Method (Works only with 'invoke') -k, --prop= Properties with key value pairs (For 'put', 'invoke' and 'create') -C, --config-file= Alternate configuration file -O, --out-file= Write output to file -V, --noverifypeer Not to verify peer certificate -v, --noverifyhost Not to verify hostname -I, --transport-timeout= Transport timeout in secondsUsing wsman identify is the simplest way to ensure correct client-server communication.
Run it as
wsman identify -h <hostname> -P <port> -u <user> -p <pass> wsman identify -h localhost -P 5985 -u wsman -p secret
Enumeration requires a [[resource path]] to address the correct CIM class
wsman enumerate -h localhost -P 5985 -u wsman -p secret http://sblim.sf.net/wbem/wscim/1/cim-schema/2/Linux_ComputerSystem
This call will return an XML representation of the matching resoure(s).
WSMAN - Windows / Linux Command Conversion
Dell has put together a document about Programmatic scripting with WSMAN