wbemexec(1)

πŸ“¦ version 2.14.1, in centos-stream 10, centos-stream 9, fedora 43, fedora 44

πŸ’– wbemexec(1) β€” the manual page, but make it make sense πŸ’–

okay so bestie, this is wbemexec, aka the little command-line bestie that talks to your CIM Server for you. she's giving glow-up for CIM operations and honestly? iconic. let's get into it πŸ¦‹


✨ NAME ✨

wbemexec β€” submit a CIM operation request to a CIM Server


🌸 SYNOPSIS 🌸

wbemexec [ -h hostname ] [ -p portnumber ] [ -v httpversion ]
         [ -m httpmethod ] [ -t timeout ] [ -u username ]
         [ -w password ] [ -s ] [ --help ] [ --version ]
         [ inputfilepath ]

πŸ’… DESCRIPTION πŸ’…

The wbemexec command is a whole command line interface to a CIM Server. the way that works: the input to the command is a CIM request encoded in XML, and that request gets submitted to the CIM Server for execution. she's the messenger, she does not read the mail πŸ’Œ

if the HTTP response from the CIM Server contains a status code of 200 (OK), then the result returned to stdout is the CIM response encoded in XML. slay. otherwise? the result returned to stdout is just the HTTP response. no filter, no notes, you get what the server said.

now for the ✨drama✨ β€” some types of invalid XML requests get caught by wbemexec herself, and some get caught by the CIM Server. lowkey two different bouncers at the same club πŸšͺ

  • some types of invalid XML requests β€” for example a missing PROTOCOLVERSION attribute or a missing NAME attribute β€” are detected by wbemexec, and result in an error message from wbemexec.
  • other invalid XML requests β€” for example an invalid CIMVERSION attribute value or a missing XML version β€” are detected by the CIM Server, and result in an HTTP response containing a non-Success status code, such as 501 (Not Implemented) or 400 (Bad Request).

the defaults, bestie, memorize them:

  • by default, the request is sent as an HTTP/1.1 request, using the HTTP M-POST method.
  • by default, wbemexec waits 20000 milliseconds (20 seconds), then times out if a response hasn't been received. she is patient but she is not that patient πŸ’€
  • input is read from stdin if no input file is specified.
  • by default, the operation is executed on the local host. wbemexec first attempts to connect to the CIM Server on the default port for the wbem-http service, and if that fails, another attempt is made on the default port for the wbem-https service. she tries again. resilience queen πŸ‘‘

πŸŽ€ Options πŸŽ€

wbemexec recognizes the following options:

  • -h hostname β€” connect to the CIM Server on the specified host. if this option is not specified, wbemexec connects to the local host.
  • --help β€” display command usage information. your lil cheat sheet 🫢
  • -m httpmethod β€” use the specified HTTP method for the request. the method must be "POST" or "M-POST". that's it. those are the options. pick one πŸ’…
  • -p portnumber β€” connect to the CIM Server on the specified port number. if this option is not specified, wbemexec connects to the default port for the wbem-http service, or, if the -s option is specified, to the default port for the wbem-https service.
  • -s β€” enable the use of the SSL protocol between and the CIM server. the -s option should be specified if the CIM Server on the specified hostname/portnumber expects clients to connect using HTTPS. secure the bag πŸ”
  • -t timeout β€” wait the specified number of milliseconds on sending a request, before timing out if no response has been received. the timeout value must be an integer value greater than 0.
  • -u username β€” connect as the specified R username. (yes bestie, the page literally says "R username", we report the lore as it is πŸ™ˆ) if username is not specified, the current logged in user is used for authentication. this option is ignored if neither hostname nor portnumber is specified.
  • -v httpversion β€” use the specified HTTP version for the request. the version must be "1.0" or "1.1". the 1.0 version may not be specified if the M-POST method is specified. not me catching that contradiction before you did 😭
  • --version β€” display CIM Server version. lil identity check ✨
  • -w password β€” authenticate the connection using the specified password. this option is ignored if neither hostname nor portnumber is specified.
WARNING, bestie, read this one fr fr: a password should not be specified on the command line on a multi-user system, since command-line options are typically world-readable for a short window of time. if the remote host requests authentication and this option is not specified, wbemexec will prompt for the password. (see cimconfig(1) for information on configuring the CIM Server.)

🌈 EXIT STATUS 🌈

when an error occurs, an explanatory error message is written to stderr and an appropriate value is returned. the following exit values are returned:

  • 0 β€” Success
  • 1 β€” Error

πŸ¦‹ USAGE NOTE πŸ¦‹

the wbemexec command requires that the CIM Server is running. no server, no slay. that's the vibe check 🫢


⭐ EXAMPLES ⭐

submit an XML request contained in the file cimrequest.xml to the CIM Server running on the local host on the default port:

wbemexec 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:

wbemexec -h hpserver -p 49152 -u guest -w guest cimrequest.xml

πŸ’œ SEE ALSO πŸ’œ

cimserver(1), cimconfig(1).


πŸ‘‘ STANDARDS CONFORMANCE πŸ‘‘

wbemexec: CIM Operations over HTTP 1.0, Representation of CIM in XML 2.0


and that's the whole page, bestie πŸŽ€ this was wbemexec(1) β€” that's the manual name right there in the corner, same one at the top and the bottom, keeping it symmetrical for the aesthetic πŸ’– mwah, go submit some requests, you're gonna eat ✨

πŸ“¦ where this page comes from