< Back
Test-CService
Post
NAME Test-CService
SYNOPSIS
Tests if a service exists, without writing anything out to the error stream.
SYNTAX
Test-CService [-Name] <String> [<CommonParameters>]
DESCRIPTION
`Get-Service` writes an error when a service doesn't exist. This function tests if a service exists without
writing anyting to the output stream.
PARAMETERS
-Name <String>
The name of the service to test.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.Boolean.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Test-CService -Name 'Drive'
Returns `true` if the `Drive` service exists. `False` otherwise.
RELATED LINKS
Carbon_Service
Install-CService
Uninstall-CService
SYNOPSIS
Tests if a service exists, without writing anything out to the error stream.
SYNTAX
Test-CService [-Name] <String> [<CommonParameters>]
DESCRIPTION
`Get-Service` writes an error when a service doesn't exist. This function tests if a service exists without
writing anyting to the output stream.
PARAMETERS
-Name <String>
The name of the service to test.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.Boolean.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Test-CService -Name 'Drive'
Returns `true` if the `Drive` service exists. `False` otherwise.
RELATED LINKS
Carbon_Service
Install-CService
Uninstall-CService