TestimoX

API Reference

Command

Set-CxService

Namespace ComputerX.PowerShell

Updates selected service configuration settings on the local or a remote computer.

Examples

Authored help example

Example 1: Disables the local Print Spooler service.

PS>


Set-CxService -Name Spooler -StartupType Disabled
        

Example 2: Sets a remote service to automatic startup after validating its baseline.

PS>


Set-CxService -ComputerName APP01 -Name TestimoX.Monitoring -StartupType Automatic
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Set-CxService -Name <string> [-ComputerName <string>] [-StartupType <Unknown|Automatic|Manual|Disabled>] [<CommonParameters>]
#

Parameters

Name string requiredposition: 0pipeline: false
Service name to update.
ComputerName string optionalposition: 1pipeline: false
Target computer name. Use . for the local machine or provide a DNS/NetBIOS name. When omitted, the local computer is queried.
StartupType ServiceStartupType optionalposition: 2pipeline: falsevalues: 4
Startup type to apply to the target service. Possible values: Unknown, Automatic, Manual, Disabled
Possible values: Unknown, Automatic, Manual, Disabled