Created
July 25, 2025 01:47
-
-
Save KaiStarkk/020d83b115f48099e00e9abe26587f4f to your computer and use it in GitHub Desktop.
PowerShell script to list services installed with NSSM
This file contains hidden or 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
| # Get all services and filter for those managed by NSSM | |
| $services = Get-WmiObject win32_service | Where-Object { $_.PathName -like '*nssm*' } | | |
| Select-Object Name, DisplayName, State, PathName | |
| # Check if any services were found | |
| if ($services) { | |
| # Output the services to the console | |
| $services | Format-Table -AutoSize | |
| } else { | |
| Write-Host "No NSSM services found." | |
| } | |
| # Pause the script to view the output | |
| Read-Host -Prompt "Press Enter to continue" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment