SC tasklist with ntsd command using _dos/bat

Source: Internet
Author: User
For example, start Messenger in cmd:
sc config Messenger start= auto
net start Messenger
Auto Auto Demand manual disabled disabled
The above first sentence for the manual to automatically, = number after the space can not be missed, the second sentence is to open the service command


There is a command to view the process in cmd tasklist

TASKLIST [/S system [/u username [/p [password]]]]
[/M [module] |/svc |/v] [/FI Filter] [/FO format] [/NH]

Describe:
The tool displays a list of processes currently running on a local or remote machine.

Parameter list:
/S system Specifies the remote system to which to connect.

/u [domain\]user specifies in which user context the command should be executed.

/p [Password] specifies the password for the provided user context. If omitted, prompts
Input.

/M [Module] lists all tasks that currently use the given Exe/dll name.
If the module name is not specified, all loaded modules are displayed.

/SVC Displays the services hosted in each process.

/V displays detailed task information.

/FI Filter displays a series of tasks that conform to the criteria specified by the filter.

/FO format Specifies the output format.
Valid values: "TABLE", "LIST", "CSV".

/NH specifies that the column headings should not be displayed in the output.
Valid only for "TABLE" and "CSV" formats.

/? Displays a help message.


Filter:
Filter name valid operator valid value
----------- --------------- --------------------------
STATUS eq, ne RUNNING |
Not Responding | UNKNOWN
imagename eq, NE image name
PID eq, NE, GT, lt, GE, le PID values
Sessions eq, NE, GT, lt, GE, le session number
sessionname EQ, NE session name
CPUTime eq, NE, GT, lt, GE, le CPU time, format for
Hh:mm:ss.
HH--When,
MM-min, ss-Sec
Memusage eq, NE, GT, lt, ge, le memory usage, per KB
USERNAME eq, NE user name, in format [Domain\]user
Services EQ, NE service name
WindowTitle eq, NE window title
MODULES eq, NE DLL name

Note: When querying remote machines, "WindowTitle" and "STATUS" are not supported
Filter.

Example:
TASKLIST
tasklist/m
tasklist/v/fo CSV
TASKLIST/SVC/FO LIST
tasklist/m wbem*
tasklist/s SYSTEM/FO LIST
tasklist/s system/u domain\username/fo CSV/NH
tasklist/s system/u username/p password/fo table/nh
Tasklist/fi "USERNAME ne NT authority\system"/fi "STATUS eq Running"


command to end a process in cmd
NTSD-C q-p PID (PID is the process identifier, which can be paged out in Task Manager)
Example: If the PID of Explorer.exe is 1332, it runs:
Ntsd-c Q-p 1332 will end the Explorer.exe process.
Ntsd-c Q-PN ***.exe (***.exe for process name, exe not province)
Cases:
Running: ntsd-c Q-PN explorer.exe to end Explorer.exe process

CMD middle Access trace command

Tracert www.jb51.net

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.