Q. How can I find the short service name of a Windows service from the service display name?
John Savill
February 10, 2011
1 Min Read
A. Services in Windows have two names—their easy-to-understand display names and their actual service names, which is how their configuration is stored in the registry (under HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservices). If you know the display name and want to find the service name, the easiest way is to run
sc query
from the command line. This will list information about all the services on a box, including the service name and the display name, as shown here.
SERVICE_NAME: NlaSvc
DISPLAY_NAME: Network Location Awareness
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
You can dump the results to a file by adding > file.txt to the command and then search the file for the service. Using PowerShell is much easier, though, just use the get-service cmdlet and pass the displayname, as shown here.
PS C:Usersjohn> get-service -DisplayName "Network Location Awareness"
Status Name DisplayName
------ ---- -----------
Running NlaSvc Network Location Awareness
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like