The place that Windows most criticized for network management is that the command line is not as powerful as UNIX and Linux. But the situation is changing and Windows command lines are getting stronger. One example is the amount of WMI that Microsoft spends a lot of energy creating.
Get process ID and process name www.2cto.com
Code:
WMIC process Get Processid,name
Remote Create process
Code:
Wmic/node:109.254.2.102/user: "Rdgadadministrator"/password: "Dream come true" process call Create Commandline= "cmd.exe/k Echo Xxxxx|clip.exe "
Get CPU name, number of digits, serial number
Code:
WMIC CPU Get Name,addresswidth,processorid
Get the number of physical memory
Code:
WMIC memlogical Get TotalPhysicalMemory
Get serial number of Brand machine
Code:
WMIC Csproduct Get Identifyingnumber
Join Domain
Code:
WMIC ComputerSystem where name= "%computername%" Call JoinDomainOrWorkgroup name= "Www.mxcz.net" Username= " Rdgadadddomain "password=" Mxcz "Fjoinoptions=1 accountou=null
Gets the total capacity of the hard disk
Code:
WMIC diskdrive Get Deviceid,size
Start a service
Code:
WMIC SERVICE where caption= ' TELNET ' call StartService
Kill a Process
Code:
WMIC PROCESS where name= ' calc.exe ' delete
Get CPU usage percent
Code:
WMIC path win32_perfformatteddata_perfproc_process Get Name,percentprocessortime
WMIC CPU Get Loadpercentage
......
For more specific help, type WMIC/? Queries at the command line.