PowerShell: Quickly Start Services that were Set to Auto

Quick Liners:
# Command to check
Get-WmiObject -ClassName Win32_Service -Filter "StartMode='Auto' AND State<>'Running'" | Format-Table -Auto DisplayName,Name,StartMode,State

# Command to start those non-running services
Get-WmiObject -ClassName Win32_Service -Filter "StartMode='Auto' AND State<>'Running'" | Start-Service
Sample Output:
[sherver007.something.loco]: PS C:\Users\176233\Documents> Get-WmiObject -ClassName Win32_Service -Filter "StartMode='Auto' AND State<>'Running'" | Format-Table -Auto DisplayName,Name,StartMode,State

DisplayName Name StartMode State
----------- ---- --------- -----
Downloaded Maps Manager MapsBroker Auto Stopped
Remote Registry RemoteRegistry Auto Stopped
Software Protection sppsvc Auto Stopped
Windows Biometric Service WbioSrvc Auto Stopped

[sherver007.something.loco]: PS C:\Users\176233\Documents> Get-WmiObject -ClassName Win32_Service -Filter "StartMode='Auto' AND State<>'Running'" | Start-Service
# output = silent

[sherver007.something.loco]: PS C:\Users\176233\Documents> Get-WmiObject -ClassName Win32_Service -Filter "StartMode='Auto' AND State<>'Running'" | Format-Table -Auto DisplayName,Name,StartMode,State
# output = de nata

Leave a Reply

Your email address will not be published. Required fields are marked *