TechBuzzPro

How to Find the PID of a Windows Service

· 5 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To find the process ID (PID) of a Windows service, open Task Manager, go to the Details tab, and match the service's executable name to the PID column. For a more precise method, open an elevated Command Prompt and run sc queryex "ServiceName" — the output includes the PID directly. You can also use PowerShell with Get-CimInstance Win32_Service to list every service and its PID in one table. The PID is the number Windows assigns to the running process behind the service, and you need it whenever you want to monitor, troubleshoot, or stop that specific process.

What You'll Need

  • A Windows PC (Windows 10 or Windows 11; the steps are nearly identical on both).
  • Administrator rights if you plan to use Command Prompt or PowerShell — some service details are hidden from standard users.
  • The exact service name (not the display name). You can find it in the Services app under the "Name" column, or by right-clicking the service and choosing Properties.

Step-by-Step

  1. Open the Services app. Press Win + R, type services.msc, and press Enter. This lists every installed service. Note the exact Name of the service you care about (for example, wuauserv for Windows Update). The display name is often different from the service name, and commands need the service name.
  2. Open Task Manager. Press Ctrl + Shift + Esc. If you see only a small window, click More details at the bottom.
  3. Go to the Details tab. This tab lists every running process with its PID. Click the PID column header to sort by PID if you like.
  4. Match the executable name. Find the process whose name matches the service's executable (for example, svchost.exe for many built-in services). Because several services can share one svchost.exe process, this method is not always precise — use the command-line method below when accuracy matters.
  5. Use Command Prompt for an exact PID. Right-click Start, choose Terminal (Admin) or Command Prompt (Admin), and run:
    sc queryex "ServiceName"
    Replace ServiceName with the exact name from step 1. In the output, look for the line PID : 1234. That number is the process ID.
  6. Or use PowerShell for a full list. Open PowerShell as administrator and run:
    Get-CimInstance Win32_Service | Select-Object Name, ProcessId, State
    This prints every service with its PID and whether it is running. To filter, add | Where-Object Name -eq "ServiceName".
  7. Verify the PID belongs to the service. In Task Manager's Details tab, find the PID you obtained and confirm the process name and description match. You can also run tasklist /svc /fi "PID eq 1234" in Command Prompt to see which services are hosted by that PID.

Common Mistakes

  • Using the display name instead of the service name. Commands like sc queryex expect the short service name (e.g., Spooler), not the display name (e.g., "Print Spooler"). Check the Name column in Services.
  • Assuming every service has its own process. Many Windows services share a single svchost.exe process, so one PID can host several services. The tasklist /svc command shows which services are grouped under a PID.
  • Running commands without administrator rights. Standard users may see incomplete output or "Access Denied" errors. Always open the terminal as administrator.
  • Confusing the PID with the service's process handle. The PID is a number; a handle is a temporary reference used by programs. You only need the PID for Task Manager, taskkill, or monitoring tools.
  • Looking at the wrong tab in Task Manager. The Processes tab groups services under "Background processes" but does not show PIDs by default. Use the Details tab or add the PID column via right-click on the column header.

Tips

  • To add the PID column in Task Manager's Processes tab, right-click any column header and check PID. This saves switching tabs.
  • Use sc queryex with the type= service filter if you are unsure of the exact name: sc queryex type= service state= all lists everything.
  • In PowerShell, Get-Process -Id 1234 shows details about the process behind a PID, including its path and start time.
  • If a service keeps restarting, note its PID over time — a changing PID usually means the service is crashing and being restarted by Windows.
  • For services hosted in svchost.exe, use tasklist /svc /fi "PID eq 1234" to see exactly which services share that process before you stop it.

Troubleshooting

  • "The specified service does not exist as an installed service." The service name is wrong or the service is not installed. Recheck the Name column in Services, and remember names are case-insensitive but must be spelled exactly.
  • PID shows as 0. A PID of 0 means the service is not running. Start it in Services (right-click > Start) and query again.
  • Access denied when running commands. Close the terminal and reopen it with "Run as administrator." If you are on a managed work PC, your IT policy may block service queries — contact your administrator.
  • Task Manager shows no PID column. Right-click the column header row and enable PID, or switch to the Details tab where it is shown by default.
  • Multiple PIDs for one service name. Some services run multiple instances (for example, per-user services). Use Get-CimInstance Win32_Service and filter by name to see each instance and its PID.
  • Command output scrolls past too fast. Pipe the output to a file: sc queryex "ServiceName" > C:\temp\service.txt, then open the file in Notepad.

Frequently Asked Questions

Can I find a service's PID without administrator rights?

Partially. Task Manager's Details tab shows PIDs for your own processes, but system services may be hidden or show limited information. Command-line tools like sc queryex often require elevation to return full details.

What is the difference between a service name and a display name?

The service name is the short internal identifier used by commands and the registry (e.g., wuauserv). The display name is the friendly label shown in the Services app (e.g., "Windows Update"). Always use the service name in commands.

Why do several services share the same PID?

Windows groups many built-in services into a single svchost.exe process to save memory. Each group has one PID, and tasklist /svc lists which services belong to it.

How do I stop a service using its PID?

You can run taskkill /PID 1234 /F in an elevated Command Prompt, but this forcibly ends the process and may affect other services sharing it. The safer method is net stop "ServiceName" or Stop-Service -Name "ServiceName" in PowerShell.

Does the PID stay the same after a reboot?

No. PIDs are assigned dynamically each time a process starts, so a service will usually have a different PID after a restart or after the service is stopped and started again.

Can I find a PID using only the Services app?

No. The Services app shows status and startup type but not PIDs. Use Task Manager, Command Prompt, or PowerShell as described above.