Powerful WMIC command-line tool under Windows

Source: Internet
Author: User
Tags cpu usage

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.