Overview
Command Examples
-- Display installed applicationsc:\wmic product get name
c:\wmic /node:"computername" product list > c:\output.txt
-- Uninstall An Application
c:\wmic product where name="ApplicationName" call uninstall
c:\WMIC /node:"computername" product where name="applicationName" call uninstall
c:\WMIC /node:"computer" /user:"domain\userid" /password:"yourpassword" product where name="applicationName" call uninstall
C:\wmic bios get serialnumber
c:\wmic process where name=”iexplore.exe” call terminate
c:\wmic process call create “paint.exe”
c:\wmic process list
c:\wmic nic get macaddress,description
c:\wmic nicconfig where (IPEnabled=TRUE and DHCPEnabled=FALSE)
call SetDNSServerSearchOrder (“192.168.254.101â€,“192.168.254.100â€)
c:\wmic /node:“rv-wk-test-01” process call create “netsh interface ip set dns local static “10.1.1.1”"
c:\wmic /node:“rv-wk-test-01” process call create “netsh interface ip add dns local static “10.1.1.1”"
-- Disable System restore
wmic /node:computer /namespace:\\root\default path SystemRestore call Disable c:\
wmic /namespace:\\root\default path SystemRestore call Disable %SystemDrive%\
wmic.exe computersystem where name=”%computername%” set AutomaticManagedPagefile=True
1. To get the process list – wmic process list
2. To get the group list – wmic group list
3. To get the NIC Card Configuration – wmic nicconfig list
4. To get user account list – wmic useraccount list
5. To get the built in System account list – wmic sysaccount list
6. To get the Environment list – wmic environment list
7. To get the information of all shares (including hidden) – wmic share list
8. To get the list of services – wmic services list
9. To get the computer system details – wmic computersystem list
10. To get the volume information – wmic volume list
11. To get full startup list – wmic startup list full
12. To get Information of logical disks – wmic logicaldisk get description, filesystem, name, size
13. To get screensaver information – wmic desktop get screensaversecure, screensavertimeout
14. To get logon information – wmic logon get authenticationpackage
15. To get information about the OS – wmic os get name, servicepackmajorversion
16. To get information about QFE (Quick Fix Engineering) – wmic qfe get description,installedOn
17. To get information about the computer – wmic csproduct get name,vendor,identifyingNumber
18. To get the toal ram – wmic computersystem get TOTALPhysicalMemory,caption
19. To get the macaddress of nic card – wmic nic get macaddress,description
Note: In all the above you can use “brief” command to get a brief list of information and “full” to get the full list of information, for example use wmic process list brief, wmic process list full.
Doing some niche tasks from wmic:
1. Update static ip address
wmic nicconfig where index=9 call enablestatic("192.168.0.117"),("255.255.255.0")
wmic nicconfig where index=9 call setgateways("192.168.0.117","192.168.0.118"),(1,2)
wmic process call create “paint.exe”
wmic nicconfig where index=9 call enabledhcp
wmic process where name=”paint.exe” call terminate
wmic process where name=”iexplorer.exe” call setpriority 64
wmic process where (Name=’svchost.exe’) get name,processid
More about.....WMIC commands
ReplyDeleteLing
nice sir
ReplyDelete