Last active
December 18, 2022 22:48
-
-
Save Fuwn/0da38bb8657a18e3d2daad6565ca5b1d to your computer and use it in GitHub Desktop.
A PowerShell script to list external services that have been installed separately from the base Windows experience. I.e., user-installed services.
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
foreach ($service in Get-Service | ForEach-Object { $_.Name }) { | |
$path = Get-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\$service | ForEach-Object { $_.ImagePath } | |
# Change this as you see fit, but it should catch most externally installed services. | |
if ($path -like "*C:\Windows*") { | |
continue | |
} | |
"{0}: {1}" -f $service, $path | Write-Output | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment