Last active
September 8, 2023 05:59
-
-
Save RomelSan/a24e775301ea88213f2b92c022c13569 to your computer and use it in GitHub Desktop.
List privileged services that don't come with Windows 10
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
# List privileged services that don't come with Windows 10 | |
# Exclusion List for Win10 built in | |
$exclusion = @('AppVClient', 'ClickToRunSvc', 'COMSysApp', 'diagnosticshub.standardcollector.service', | |
'msiserver', 'ose', 'perceptionsimulation', 'SecurityHealthService', 'Sense', | |
'SensorDataService', 'SgrmBroker', 'Spooler', 'ssh-agent', 'TieringEngineService', | |
'TrustedInstaller', 'UevAgentService', 'vds', 'VSS', 'wbengine', 'WinDefend', 'wmiApSrv', | |
'WSearch', 'SamSs') | |
# Get Service List with LocalSystem and Startmode Auto and does not contain svchost.exe (Also exclude the ones from the list) | |
Get-WmiObject win32_service | | |
Where-Object {$_.StartName -eq 'LocalSystem' -and $_.Startmode -eq 'Auto' -and $exclusion -notcontains $_.Name -and $_.PathName -NotLike '*svchost.exe*'} | | |
Select-Object Name,StartName,Started,Startmode,PathName | Format-Table -AutoSize | |
# If you want to display almost all then type: | |
# Get-WmiObject win32_service | Where-Object {$_.StartName -eq 'LocalSystem' -and $_.PathName -NotLike '*svchost.exe*'} | select Name,StartName,Started,Startmode,PathName | ft |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment