TestimoX

API Reference

Command

Get-CxServices

Namespace ComputerX.PowerShell
Inputs
ComputerX.Services.ServiceFilter System.String[]
Outputs
ComputerX.Services.ServiceInfo

Returns Windows service inventory for one or more computers.

Examples

Authored help example

Example 1: Lists local services.

PS>


Get-CxServices
        

Example 2: Queries a remote server and returns only running services.

PS>


Get-CxServices -ComputerName APP01 -Filter Running
        

Example 3: Uses the CIM query path to review automatically starting services on a remote host.

PS>


Get-CxServices -ComputerName APP01 -Filter AutoStart -Method Cim
        

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

Get-CxServices [-ComputerName <string[]>] [-Filter <All|Running|AutoStart>] [-Method <Native|Wmi|Cim|Auto>] [<CommonParameters>]
#

Parameters

ComputerName string[] optionalposition: 0pipeline: true (ByValue, ByPropertyName)
Target computer names. Use . for the local machine or provide DNS/NetBIOS names. When omitted, the local computer is queried.
Filter ServiceFilter optionalposition: 1pipeline: true (ByPropertyName)values: 3
Restricts results to items matching the provided filter. Possible values: All, Running, AutoStart
Possible values: All, Running, AutoStart
Method ServiceEngine optionalposition: 2pipeline: falsevalues: 4
Engine used to query services: Native, Wmi, Cim, or Auto. Possible values: Native, Wmi, Cim, Auto
Possible values: Native, Wmi, Cim, Auto

Outputs

ComputerX.Services.ServiceInfo