Skip to content

Instantly share code, notes, and snippets.

@swbbl
Last active December 31, 2022 08:54
Show Gist options
  • Save swbbl/81c5bee5cdd0df2d9903d5beac9ecb99 to your computer and use it in GitHub Desktop.
Save swbbl/81c5bee5cdd0df2d9903d5beac9ecb99 to your computer and use it in GitHub Desktop.
Examples for PowerShell function 'Get-ServiceEx' → https://gist.github.com/swbbl/3fa226f626abfc5b29b66c2d32c920d0
# Examples for PowerShell function 'Get-ServiceEx':
# https://gist.github.com/swbbl/3fa226f626abfc5b29b66c2d32c920d0
PS> Get-ServiceEx ndis
Type : Driver
ServiceType : KernelDriver
ServiceName : NDIS
DisplayName : NDIS System Driver
Description : NDIS System Driver
Status : Running
StartType : Boot
DelayedAutoStart :
UserName :
RequiredServices :
DependentServices : {WFPLWFS, VMSVSF, WifiCx, MbbCx…}
Path : C:\WINDOWS\system32\drivers\ndis.sys
CanPauseAndContinue : False
CanShutdown : False
CanStop : True
ErrorControl : Critical
Process :
ServiceHandle : Microsoft.Win32.SafeHandles.SafeServiceHandle
Site :
Container :
InstallDate :
DesktopInteract : False
ExitCode : (0x80004005) The operation completed successfully.
ServiceSpecificExitCode : 0
TagId : 0
CheckPoint :
WaitHint :
MachineName : .
HostName : Sven-PC
HostDomain : WORKGROUP
PS> Get-ServiceEx -HasError
Type : Driver
ServiceType : KernelDriver
ServiceName : dam
DisplayName : Desktop Activity Moderator Driver
Description : Desktop Activity Moderator Driver
Status : Stopped
StartType : System
DelayedAutoStart :
UserName :
RequiredServices :
DependentServices :
Path : C:\WINDOWS\system32\drivers\dam.sys
CanPauseAndContinue : False
CanShutdown : False
CanStop : False
ErrorControl : Normal
Process :
ServiceHandle : Microsoft.Win32.SafeHandles.SafeServiceHandle
Site :
Container :
InstallDate :
DesktopInteract : False
ExitCode : (0x80004005) A device attached to the system is not functioning.
ServiceSpecificExitCode : 0
TagId : 0
CheckPoint :
WaitHint :
MachineName : .
HostName : Sven-PC
HostDomain : WORKGROUP
Type : Driver
ServiceType : KernelDriver
ServiceName : hwpolicy
DisplayName : Hardware Policy Driver
Description : Hardware Policy Driver
Status : Stopped
StartType : Boot
DelayedAutoStart :
UserName :
RequiredServices :
DependentServices :
Path : C:\WINDOWS\system32\drivers\hwpolicy.sys
CanPauseAndContinue : False
CanShutdown : False
CanStop : False
ErrorControl : Ignore
Process :
ServiceHandle : Microsoft.Win32.SafeHandles.SafeServiceHandle
Site :
Container :
InstallDate :
DesktopInteract : False
ExitCode : (0x80004005) A device attached to the system is not functioning.
ServiceSpecificExitCode : 0
TagId : 0
CheckPoint :
WaitHint :
MachineName : .
HostName : Sven-PC
HostDomain : WORKGROUP
PS> Get-ServiceEx -ProcessName svchost | Select -First 3
Type : Service
ServiceType : Win32OwnProcess, Win32ShareProcess
ServiceName : Appinfo
DisplayName : Application Information
Description : Facilitates the running of interactive applications with additional administrative privileges. If this service is stopped, users will be unable to launch applications with the additional administrative privileges they may require to perform desired user tasks.
Status : Running
StartType : Manual
DelayedAutoStart : False
UserName : LocalSystem
RequiredServices : {RpcSs, ProfSvc}
DependentServices :
Path : C:\WINDOWS\system32\svchost.exe -k netsvcs -p
CanPauseAndContinue : False
CanShutdown : False
CanStop : True
ErrorControl : Normal
Process : svchost (9596)
ServiceHandle : Microsoft.Win32.SafeHandles.SafeServiceHandle
Site :
Container :
InstallDate :
DesktopInteract : False
ExitCode : (0x80004005) The operation completed successfully.
ServiceSpecificExitCode : 0
TagId : 0
CheckPoint : 0
WaitHint : 0
MachineName : .
HostName : Sven-PC
HostDomain : WORKGROUP
Type : Service
ServiceType : Win32OwnProcess, Win32ShareProcess
ServiceName : AppXSvc
DisplayName : AppX Deployment Service (AppXSVC)
Description : Provides infrastructure support for deploying Store applications. This service is started on demand and if disabled Store applications will not be deployed to the system, and may not function properly.
Status : Running
StartType : Manual
DelayedAutoStart : False
UserName : LocalSystem
RequiredServices : {RpcSs, StateRepository}
DependentServices :
Path : C:\WINDOWS\system32\svchost.exe -k wsappx -p
CanPauseAndContinue : False
CanShutdown : True
CanStop : True
ErrorControl : Normal
Process : svchost (5612)
ServiceHandle : Microsoft.Win32.SafeHandles.SafeServiceHandle
Site :
Container :
InstallDate :
DesktopInteract : False
ExitCode : (0x80004005) The operation completed successfully.
ServiceSpecificExitCode : 0
TagId : 0
CheckPoint : 0
WaitHint : 0
MachineName : .
HostName : Sven-PC
HostDomain : WORKGROUP
Type : Service
ServiceType : Win32OwnProcess, Win32ShareProcess
ServiceName : AudioEndpointBuilder
DisplayName : Windows Audio Endpoint Builder
Description : Manages audio devices for the Windows Audio service. If this service is stopped, audio devices and effects will not function properly. If this service is disabled, any services that explicitly depend on it will fail to start
Status : Running
StartType : Automatic
DelayedAutoStart : False
UserName : LocalSystem
RequiredServices :
DependentServices : {AarSvc_6696be, $null, Audiosrv}
Path : C:\WINDOWS\System32\svchost.exe -k LocalSystemNetworkRestricted -p
CanPauseAndContinue : False
CanShutdown : False
CanStop : True
ErrorControl : Normal
Process : svchost (3256)
ServiceHandle : Microsoft.Win32.SafeHandles.SafeServiceHandle
Site :
Container :
InstallDate :
DesktopInteract : False
ExitCode : (0x80004005) The operation completed successfully.
ServiceSpecificExitCode : 0
TagId : 0
CheckPoint : 0
WaitHint : 0
MachineName : .
HostName : Sven-PC
HostDomain : WORKGROUP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment