Communicate with Windows machines via WMI from *nix machines.
The original wmic was/is a command-line utility originally built as part of Samba. It has become difficult to find the correct requirements for building it manually, and there were to my knowledge no available packages for the differing platforms that I use.
While the current implementation aims to be compatible with check_wmi_plus.pl, getting feature parity with the original/compiled version of wmic is not out of the question.
To install simply run the following:
$ pip install wmic
- impacket >= 0.9.13
- natsort >= 3
The simplest way to run it is similar to the following
wmic -A /etc/nagios3/wmic_auth.ini //ServerName "SELECT * FROM Win32_PerfFormattedData_PerfOS_Memory"
-A
,--authentication-file
: INI style file thatdomain
: optional, default: WORKGROUPusername
: requiredpassword
: required
-U
,--user
: format[DOMAIN\]USERNAME[%PASSWORD]
--delimiter
: how to separate the colums, default: |--namespace
: namespace, default: //./root/cimv2
- If you do not supply a domain, then the script defaults to
WORKGROUP
- You must use either a file or user argument
MIT