Gets a service's full configuration, e.g. username, path, failure actions, etc.
Get-ServiceConfiguration [-Name] <String> [-ComputerName <String>] [<CommonParameters>]
ServiceController object only returns basic information about a service. This function returns all the other service configuration as a
Carbon.Service.ServiceInfo object, which has the following properties:
DelayedAutoStart: A boolean value indicating if the service starts automically delayed. This property was added in Carbon 2.5.
Description: The service's description.
Carbon.Service.ErrorControlvalue that indicates the severity of the error when the service fails to start.
FailureProgram: The program to run when the service fails.
Carbon.Service.FailureActionvalue indicating what will happen after the service's first failure.
LoadOrderGroup: The name of the load order group this service loads in.
Name: The name of the service.
Path: The path to the service executable (with arguments).
RebootDelay: The number of milliseconds after boot to wait before the service starts.
RebootDelayexpressed in minutes.
ResetPeriod: How often, in seconds, to reset the service's failure count to 0.
ResetPeriodexpressed in number of days.
RestartDelay: The number of milliseconds to wait before restarting the service after it fails.
RestartDelayexpressed in minutes.
RunCommandDelay: The number of milliseconds to wait after a service fails before running the failure program.
RunCommandDelayas expressed/converted in minutes.
Carbon.Service.FailureActionvalue indicating what will happen after the service's second failure.
Carbon.Service.StartTypevalue indicating how and when the service should be started.
TagID: The service's tag ID. This is the order the service will start in its load group.
Carbon.Service.FailureActionvalue indicating what will happen after the service's third failure.
UserName: The name of the identity the service runs as.
You can load a specific service using its name, or pipe in
In addition to this function, Carbon also adds this information as extended type data properties onto the
ServiceController class. To see it,
Get-Service | Get-Member
The user running this function must have
EnumerateDependents permissions on the service. Use
Grant-ServicePermission to grant these permissions.
This function is new in Carbon 1.8.
|Name||Type||Description||Required?||Pipeline Input||Default Value|
The name of the service.
The name of the computer where the service lives.
Get-Service | Get-ServiceConfiguration
Demonstrates how you can pipe in a
ServiceController object to load the service. This works for services on remote computers as well.
Get-ServiceConfiguration -Name 'w3svc'
Demonstrates how you can get a specific service's configuration.
Get-ServiceConfiguration -Name 'w3svc' -ComputerName 'enterprise'
Demonstrates how to get service configuration for a service on a remote computer.