Last active
May 10, 2023 13:21
-
-
Save JohnL4/c1727341e5558cb52be8c728a185ef37 to your computer and use it in GitHub Desktop.
Find the process id (pid) of a Windows service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ServicePID = (get-wmiobject win32_service | where { $_.name -eq 'service name'}).processID | |
# https://social.technet.microsoft.com/Forums/en-US/43fa0ba5-f5b6-43b7-a10b-4957bc4a5f19/how-to-search-a-pid-with-service-name-and-then-task-kill-it?forum=winserverpowershell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment