There are some windows services hosted whose display name starts with a common name (here NATION). For example:
- NATION-CITY
- NATION-STATE
- NATION-Village
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.
Save it as a .ps1 file and then execute
powershell -file "path\to your\start stop nation service command file.ps1"
Using PowerShell, you can use the following
This will show a list off all services which displayname starts with "NATION-".
You can also directly stop or start the services;
or simply
/i
for case insensitive searchtype=
is deliberate and required