Windows Management Infrastructure(WMIC) Installation and Configuration

1] Download WMIC
ashok-pc:~# cd /tmp
ashok-pc:/tmp# wget
–2012-11-18 17:23:45–
Connecting to||:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 3994744 (3.8M) [application/x-gzip]
Saving to: “wmi-1.3.14.tar.gz”
100%[=========================================================================================>] 3,994,744 419K/s in 11s
2012-11-18 17:23:57 (366 KB/s) – “wmi-1.3.14.tar.gz” saved [3994744/3994744]

2] Unpack WMIC
ashok-pc:/tmp# tar xzvf wmi-1.3.14.tar.gz
ashok-pc:/tmp# cd wmi-1.3.14

3] Compile WMIC (takes about 5-10 minutes)
ashok-pc:/tmp/wmi-1.3.14# make

4] Test WMIC
Usage: [-?|–help] [–usage] [-d|–debuglevel DEBUGLEVEL] [–debug-stderr]
[-s|–configfile CONFIGFILE] [–option=name=value]
[-l|–log-basename LOGFILEBASE] [–leak-report] [–leak-report-full]
[-R|–name-resolve NAME-RESOLVE-ORDER]
[-O|–socket-options SOCKETOPTIONS] [-n|–netbiosname NETBIOSNAME]
[-W|–workgroup WORKGROUP] [–realm=REALM] [-i|–scope SCOPE]
[-m|–maxprotocol MAXPROTOCOL] [-U|–user [DOMAIN\]USERNAME[%PASSWORD]]
[-N|–no-pass] [–password=STRING] [-A|–authentication-file FILE]
[-S|–signing on|off|required] [-P|–machine-pass]
[–simple-bind-dn=STRING] [-k|–kerberos STRING]
[–use-security-mechanisms=STRING] [-V|–version] [–namespace=STRING]

//host query
Example: wmic -U [domain/]adminuser%password //host “select * from Win32_ComputerSystem”
ashok-pc:/tmp/wmi-1.3.14#/bin/wmic -U USER%PASS //HOST ‘Select Caption From Win32_OperatingSystem’
CLASS: Win32_OperatingSystem
Microsoft Windows XP Professional|Microsoft Windows XP Professional|C:\WINDOWS|\Device\Harddisk0\Partition1

About ashokabhat

I am a C,C ,JAVA,Adobe Flex,.NET Programmer Currently working as a Software Developer
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s