Skip to main content

Get-ServiceStartMode

SYNOPSIS

Get the service startup mode.

SYNTAX

Get-ServiceStartMode [-Name] <String> [[-ComputerName] <String>] [[-ContinueOnError] <Boolean>]
[<CommonParameters>]

DESCRIPTION

Get the service startup mode.

EXAMPLES

EXAMPLE 1

Get-ServiceStartMode -Name 'wuauserv'

PARAMETERS

-Name

Specify the name of the service.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ComputerName

Specify the name of the computer. Default is: the local computer.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: $env:ComputerName
Accept pipeline input: False
Accept wildcard characters: False

-ContinueOnError

Continue if an error is encountered. Default is: $true.

Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

You cannot pipe objects to this function.

OUTPUTS

System.ServiceProcess.ServiceController.

Returns the service object.

NOTES

https://psappdeploytoolkit.com