How do you do a keyword search the Services.msc (mmc) window in Windows 7?

When you want to run a service, you have very limited capabilities, in all current Windows versions, as far as I can tell.

I usually start Services by typing "services.msc" into the Start->Run box, on most versions of Windows, this works. I know how to click the "Name" column in the MMC view of Windows Services. If you know what the first few characters of a service name is, you can usually sort by the name, and type the prefix to scroll the list down (find Windows Search for example).

This seems pretty weak to me, so I spent some time searching the interwebs for tools that do a better job of managing services. Usually I have a keyword that I know "fooWare" might be the keyword, and I need to find the (usually badly named) service and start it and stop it. This is often WAY too hard.

The best I could do is "NET SERVICES" from the command line, and maybe add a grep in there, but that doesn't list every service, only a few of them.

And the MMC snap-in in Win7 now has an Export List button, exporting to csv text file feature which I have used from time to time, to export and then search. I have thought of writing my own tool. I'm hoping a better "service manager" utility exists out there that sysadmins use. I'd like a search box at the top right corner, kind of the same way that the Add-Remove-Programs dialog in Win7 and Vista has a search facility.

Does such a services utility exist out there?


Solution 1:

sc.exe at the command prompt OR the *-service set of PowerShell tools.

At the command line, sc can do a bit of service frobbing and you can combine that with outputting to a text file or messing about with find. But really, you should be using PowerShell these days so Get-Service (as well as Start-Service, Restart Service, Set-Service, etc.) combined with the myriad of PowerShell supplied formatting and parsing tools is your best bet.

Here's an example in PowerShell:

$t = '*mana*';Get-Service | Where {($_.Name -like "$t" -or $_.DisplayName -like "$t") -and $_.StartType -ne "Disabled"}

it filters in both name and display name and ignores disabled services.

You could put this into a script Find-Service.ps1 with a single parameter.

 param(
 [string]$term
 )

 $term = "*" + $term + "*"
 Get-Service | Where-Object {($_.Name -like "$term" -or $_.DisplayName -like "$term") -and $_.StartType -ne "Disabled"}

Solution 2:

xnet.exe available from a few locations (e.g. http://www.netware.se/en/downloads/) can list all the services running - you can then use something else to search the output. Handlily xnet also reports the short name of a service, which can be used to manage it.