Gets a service's full configuration, e.g. username, path, failure actions, etc.
Get-ServiceConfiguration [-Name] <String> [-ComputerName <String>] [<CommonParameters>]
The .NET ServiceController
object only returns basic information about a service. This function returns a bunch of the missing configuration in the form of a Carbon.Service.ServiceInfo
object:
You can load a specific service using its name, or pipe in ServiceController
objects.
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 QueryConfig
, QueryStatus
, and 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 |
---|---|---|---|---|---|
Name | String | The name of the service. |
true | true (ByPropertyName) | |
ComputerName | String | The name of the computer where the service lives. |
false | true (ByPropertyName) |
Carbon.Service.ServiceInfo.
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.