wbemcli(1)

πŸ“¦
version 1.6.3 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– wbemcli β€” independent command line CIM Client πŸ’–

okay bestie, gather round, because this is the wbemcli(1) page from the General Commands Manual and it's about to be your new personality. it's a command line CIM client, it's CIMOM-library-independent, and it's lowkey iconic. let's go πŸ¦‹


✨ NAME ✨

wbemcli β€” independent command line CIM Client. that's it, that's the whole vibe check πŸ‘‘


🌸 SYNOPSIS 🌸

wbemcli gc|gcd|dc|ec|ecn|gi|ci|mi|di|ei|ein|ai|ain|ri|rin|gp|sp|cm|cmx
[-nl] [-h] [-t] [-cte] [-dx] [-dr] [-noverify] [-cacert file]
[-clientcert file] [-clientkey file] [-ac assocClass] [-arc resultClass]
[-ar role] [-arr resultRole] objectPath [prop=value[,...]]  [prop[,...]]

πŸ” Alternate formats

heads up bestie: these symlinks are not installed by the Debian package, but they work if you create them manually. DIY queen behavior πŸ’…
wbemgc     [-nl] [-h] [-t] [-dx] [-dr] objectPath [prop[,...]]

wbemgcd    [-nl] [-h] [-t] [-dx] [-dr] objectPath

wbemdc     [-nl] [-h] [-t] [-dx] [-dr] objectPath

wbemec     [-nl] [-h] [-t] [-cte] [-dx] [-dr] objectPath [prop[,...]]

wbemecn    [-nl] [-h] [-t] [-dx] [-dr] objectPath

wbemgi     [-nl] [-h] [-t] [-dx] [-dr] objectPath [prop[,...]]

wbemci     [-nl] [-h] [-t] [-dx] [-dr] objectPath [prop=value[,...]]

wbemmi     [-nl] [-h] [-t] [-dx] [-dr] objectPath [prop=value[,...]]

wbemdi     [-nl] [-h] [-t] [-dx] [-dr] objectPath

wbemei     [-nl] [-h] [-t] [-cte] [-dx] [-dr] objectPath [prop[,...]]

wbemein    [-nl] [-h] [-t] [-dx] [-dr] objectPath

wbemai     [-nl] [-h] [-t] [-cte] [-dx] [-dr] [-ac assocClass]
[-arc resultClass] [-ar role] [-arr resultRole] objectPath [prop[,...]]

wbemain    [-nl] [-h] [-t] [-dx] [-dr] [-ac assocClass]
[-arc resultClass] [-ar role] [-arr resultRole] objectPath

wbemri     [-nl] [-h] [-t] [-cte] [-dx] [-dr] [-arc resultClass]
[-ar role] objectPath [prop[,...]]

wbemrin    [-nl] [-h] [-t] [-dx] [-dr] [-arc resultClass] [-ar role]
objectPath

wbemgp     [-nl] [-h] [-t] [-dx] [-dr] objectPath prop

wbemsp     [-nl] [-h] [-t] [-dx] [-dr] objectPath prop=value

wbemcm     [-nl] [-h] [-t] [-dx] [-dr] objectPath
method[.param=value[,...]]

wbemcmx    [-nl] [-h] [-t] [-dx] [-dr] objectPath
method[.param=value[,...]]

🌈 DESCRIPTION 🌈

so wbemcli is a command line based CIM Client. it takes one of the operations

gc|gcd|dc|ec|ecn|gi|ci|mi|di|ei|ein|ai|ain|ri|rin|gp|sp|cm|cmx

plus the fully qualified path to the CIM Object, and from that it figures out how to get to the host and run the operation you asked for. this implementation is CIMOM library independent β€” she does not play favorites β€” and can be used with all WBEM compliant CIMOM implementations. no gatekeeping ✨

the objectPath parameter is what locates the CIM object, and it looks like this:

<scheme>://[user:pwd@]<host>:<port>/<namespace[/..]>:<classname>[.<key=value[,..]>]
fr fr, wrap that objectPath in single quotes so the double quoted strings inside it are preserved by the command line shell. the examples section below shows you the way 🫢

the only scheme supported is http. example:

http://krz:xyz@localhost:5988/root/cimv2:rpm_package.name=glibc

πŸ“ the prop=value[,...] parameter

this one specifies <Property>=<Value> pairs for the ci, mi and sp operations. for sp you must specify only one <Property>=<Value> pair β€” not two, not zero, exactly one, she's picky like that πŸ’…

Example:

stringProp="a string",booleanProp=true,numericProp=25

arrays of property values? absolutely supported, you just tack on more values separated by commas:

stringProp="a string","another string",numericProp=25,49,12

πŸŽ€ the prop[,...] parameter

this tells you which properties come back. one prop must be specified for the gp operation. for the other operations this parameter is optional β€” if you don't list any, all properties get returned. generous queen πŸ‘‘

Example:

stringProp,booleanProp,numericProp

πŸ¦‹ the method[.param=value[,...] parameter

this is for <Parameter>=<Value> pairs on the cm operation:

Method2Execute.stringParam="a
string",booleanParam=true,numericParam=25

and yes, arrays of property values are supported here too, just add more values separated by commas:

Method2Execute.stringParam="a string","another
string",numericParam=25,49,12

πŸ‘‘ OPERATIONS πŸ‘‘

the supported operations are, and I'm obsessed with all of them:

  • gc β€” get class
  • gcd β€” get class definition
  • dc β€” delete class
  • ec β€” enumerate classes
  • ecn β€” enumerate class names
  • gi β€” get instance
  • ci β€” create instance
  • mi β€” modify instance
  • di β€” delete instance
  • ei β€” enumerate instances
  • ein β€” enumerate instance names
  • ai β€” enumerate association instances
  • ain β€” enumerate association instance names
  • ri β€” enumerate reference instances
  • rin β€” enumerate reference instance names
  • gp β€” get property
  • sp β€” set property
  • cm β€” call method
  • cmx β€” call method (return XML)

πŸ’… OPTIONS πŸ’…

  • -h β€” Print a help message
  • -nl β€” Start a new line for every property returned
  • -t β€” Append array ([]), reference (&) and key property (#) indicators to property names
  • -cte β€” Enable support for chunked responses from CIMOM
  • -v β€” Show version information
  • -dx β€” Show XML messages payload as received from CIMOM
  • -dr β€” Delineate references with { } pairs
  • -noverify β€” Do not verify the server certificate for https URLs (useful for testing)
  • -cacert β€” CA certificate file (required for https URLS unless -noverify is specified)
  • -clientcert β€” Client certificate file (if the CIM server requires client certificates)
  • -clientkey β€” Client private key file (required if -clientcert is specified)
  • -ac β€” association class name (ai, ain only)
  • -arc β€” result class name (ai, ain, rin, ri only)
  • -ar β€” role name (ai, ain, rin, ri only)
  • -arr β€” result role name (ai, ain only)

🧚 LIBRARIES 🧚

wbemcli requires either libghttp, libwww, or winhttp, depending on build options used. whichever one she woke up with that day πŸ’–


⭐ Example ⭐

to get all instances of rpm_packages, i.e. all installed rpm packages on the local system, you'd do:

 wbemcli ei 'http://localhost:5988/root/cimv2:rpm_package'

the get instance operation can be specified to get more information about a certain package:

 wbemcli gi 'http://localhost:5988/root/cimv2:rpm_package.name="glibc"'

the create instance (ci) operation can be called using the following format example. Property values can also be specified/add to the sytax.

 wbemcli ci
'http://localhost:5988/root/cimv2:TST_InstanceProperties.CreationClassName="TST_InstanceProperties",Id="Instance
#2"' 'CreationClassName="TST_InstanceProperties",Id="Instance
#2",Property_string2="This is instance#2",Property_uint8=250'

more command line examples can be found from the wbemcli/samples directory πŸ“βœ¨

🌟 Host indirection support 🌟

the scheme and host specification in the object path can be replaced by an arbitrary token that will be used to locate the proper scheme and host specification in ./wbemcli.ind or any file specified via the WBEMCLI_IND environment variable. the format of this file is as follows:

<token>: <scheme>://[user:pwd@]<host>:<port>

assuming the following entry in ./wbemcli.ind:

myCimom: http://localhost:5988

the example in the previous section can then be specified as:

 wbemcli gi 'myCimom/root/cimv2:rpm_package.name="glibc"'

🌸 ENVIRONMENT 🌸

  • WBEMCLI_CURL_SSLVERSION β€” Specifies the SSL protocol that will be used. Valid values are SSLv2, SSLv3, TLSv1, TLSv1.0 (TLSv1_0), TLSv1.1 (TLSv1_1) or TLSv1.2 (TLSv1_2). If this variable is not set, wbemcli will attempt to figure out the remote SSL protocol version. she's a detective πŸ”

πŸ’œ FILES πŸ’œ

  • /etc/ssl/certs/ca-certificates.crt β€” The default CA certificate file. Can be overridden with -cacert.

πŸŽ€ EXIT CODES πŸŽ€

  1. 0 β€” Normal termination. slay, you did it πŸŽ‰
  2. 16 β€” Abnormal termination, see diagnostics printed to the standard error. not slay, go read the diagnostics 😭

🌈 AUTHOR 🌈

Adrian Schuur <schuur@de.ibm.com>


πŸ’€ BUGS πŸ’€

the SBLIM project maintains a mailing list to which you should direct all questions regarding sfcb, sfcc, wbemcli, or any of the SBLIM providers. to subscribe to this mailing list visit

http://lists.sourceforge.net/lists/listinfo/sblim-issues

the SBLIM Project Bug tracking page can be found at

http://sourceforge.net/tracker/?group_id=128809&atid=712784

(C) Copyright IBM Corp. 2002, 2004, 2005, 2009


πŸ¦‹ AVAILABILITY πŸ¦‹

wbemcli is a part of the SBLIM project. the most recent version is available on the web at

http://sblim.sourceforge.net/

⭐ SEE ALSO ⭐

cimserver(1)


and that's the whole page bestie πŸ’– this was wbemcli Version 1.6.3, dated June 2009, and it lives in the General Commands Manual section of the manual pages. go forth and enumerate some instances, you absolute icon 🫢✨