Checks if a service exists, and writes an error if it doesn't.
Assert-Service [-Name] <String> [<CommonParameters>]
Also returns True
if the service exists, False
if it doesn't.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Name | String | The name of the service. |
true | false |
Assert-Service -Name 'Drivetrain'
Writes an error if the Drivetrain
service doesn't exist.