command-linewindows-servicescommandcommand-prompt

How to get all Windows service names starting with a common word?


There are some windows services hosted whose display name starts with a common name (here NATION). For example:

Is there some command to get all the services like 'NATION-'. Finally I need to stop, start and restart such services using the command promt.


Solution

  • sc queryex type= service state= all | find /i "NATION"