Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The usage of SC tasklist and ntsd commands

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces the knowledge of "the usage of SC tasklist and ntsd commands". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

In CMD, take starting messenger as an example:

Sc config messenger start= auto

Net start messenger

Auto automatic demand manual disabled disabled

The first sentence above is to change the manual to automatic, the space after the = sign cannot be left out, and the second sentence is to open the service command.

There is a command tasklist to view the process in CMD

TASKLIST [/ S system [/ U username [/ P [password]

[/ M [module] | / SVC | / V] [/ FI filter] [/ FO format] [/ NH]

Description:

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

Parameter list:

/ S system specifies the remote system to which you are connected.

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

/ P [password] specifies the password for the supplied user context. If ignored, prompt

Enter.

/ M [module] lists all tasks currently using the given exe/dll name.

If no module name is 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 meet the criteria specified by the filter.

/ FO format specifies the output format.

Valid values: "TABLE", "LIST", "CSV".

/ NH specifies that 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

SESSION eq, ne, gt, lt, ge, le session number

SESSIONNAME eq, ne session name

CPUTIME eq, ne, gt, lt, ge, le CPU time in the format

Hh:mm:ss .

Hh-time

Mm-minutes, ss-seconds

MEMUSAGE eq, ne, gt, lt, ge, le memory usage (in KB)

USERNAME eq, ne user name, in the format [domain\] user

SERVICES eq, ne service name

WINDOWTITLE eq, ne window title

MODULES eq, ne DLL name

Note: "WINDOWTITLE" and "STATUS" are not supported when querying remote machines

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"

A command to end a process in CMD

Ntsd-c Q-p pid (pid is the process identifier, which can be called up in the task manager)

For example, if the pid of explorer.exe is 1332, run:

Ntsd-c Q-p 1332 can end the explorer.exe process.

Ntsd-c Q-pn * * .exe (* .exe is the process name, exe cannot be omitted)

Example:

Run: ntsd-c Q-pn explorer.exe to end the explorer.exe process

This is the end of the introduction to the usage of SC tasklist and ntsd commands. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report