C
C
chelius_ua2017-06-02 11:21:15
PowerShell
chelius_ua, 2017-06-02 11:21:15

How to get a list of services and the memory they use?

Hello! Not strong in batch files, but tembolee in PS scripts, so I want to ask for help or advice.
There is a task to get a list of services on a Windows machine by the name mask "Trigger *", get the amount of RAM consumed by them, rank by RAM from larger to smaller, and restart the top (gluttonous) services.
I would appreciate any advice or guidance. Thanks"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dmfun, 2017-06-02
@dmfun

Try TaskList, there are a lot of parameters, to be honest, I don’t know how to display it with such a name, but I think there is a parameter.
restarting the net stop
net start service
is generally difficult enough here.
I don't know about sorting.

R
res2001, 2017-06-02
@res2001

The sc command gives full access to services, tasklist - to running processes.
Experiment

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question