[This is preliminary documentation and is subject to change. Blank topics are included as placeholders.]

Start-CsWindowsService enables you to start a Microsoft Communications Server service.

Syntax

Start-CsWindowsService [-Name <String>] [-ComputerName <String>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-NoWait <SwitchParameter>] [-Report <String>] [-WhatIf [<SwitchParameter>]]
Start-CsWindowsService [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-InputObject <NTService>] [-NoWait <SwitchParameter>] [-Report <String>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Name

Optional

String

Name of the Microsoft Communications Server service you want to start. Note that you must use the service name (e.g., RTCCAA) and not the service display name (e.g., Microsoft Communications Server Conferencing Attendant). You can only pass a single service name to the -Name parameter, and addition you cannot use wildcards in the service name.

Start-CsWindowsService can only start Microsoft Communications Server services; you cannot use this cmdlet to start other Windows services. For those services, you might be able to use Windows PowerShell’s Start-Service cmdlet.

ComputerName

Optional

String

Name of the remote computer hosting the service to be started; if this parameter is not included, then Start-CsWindowsService will start the specified service (or services) on the local computer. The remote computer should be referenced using its fully qualified domain name; for example, atl-mcs-001.litwareinc.com.

InputObject

Optional

NTService object

Enables you to start a service using an object reference rather than a service name. For example, if you use Get-CsWindowsService to return information about a service, and if you store the returned object in a variable named $x, you can then start the service using this command:

Start-CsWindowsService -InputObject $x.Name

Report

Optional

String

Path to an HTML file where error information can be stored. If this parameter is included, any errors that occur during the running of this cmdlet will be logged to the specified file (e.g., C:\Logs\Service_report.html).

NoWait

Optional

Switch Parameter

When present, causes the command to execute and then immediately return control to the Windows PowerShell prompt. If not present, control will not be returned until the command has completed and a status report has been written to the screen.

Force

Optional

Switch Parameter

Suppresses the display of any non-fatal error message that might arise when running the command.

WhatIf

Optional

Switch Parameter

Describes what would happen if you executed the command without actually executing the command.

Confirm

Optional

Switch Parameter

Prompts you for confirmation before executing the command.

Detailed Description

Many Microsoft Communications Server components run as standard Windows services; for example, the Communications Server Conferencing Attendant component is actually a service named RTCCAA. If one of your Communications Server services is currently stopped, you can restart that service using the Start-CsWindowsService cmdlet.

Start-CsWindowsService can only start Microsoft Communications Server services; an error will occur if you attempt to start a non-Communications Server service (such as the print spooler) using this cmdlet. Functionally, Start-CsWindowsService is very similar to the generic Windows PowerShell cmdlet Start-Service. However, Start-CsWindowsService includes a -ComputerName parameter that makes it easy to start a service on a remote computer: you simply include the -ComputerName parameter followed by the fully qualified name of the remote computer. In addition, the -Report parameter eables you to keep a log of any errors that might occur when calling Start-CsWindowsService.

Some services have a dependency on another service; for example, the Conferencing Attendant service cannot run unless the Application Server service is already running. If you try to start a service that depends on another service, Start-CsWindowsService will start both of those services. For example, if you try to start the Conferencing Attendant service the cmdlet will first start the Application Server service and then start the Conferencing Attendant service. However, Start-CsWindowsService will not automatically start any dependent services: if you start the Application Server service the command will not automatically start the Conferencing Attendant service as well.

Return Types

Start-CsWindowsService starts instances of the Microsoft.Rtc.Management.Deployment.Core.NTService object.

Examples

-------------------------- Example 1 ------------------------

Copy Code
Start-CsWindowsService

The command shown in Example 1 starts all the Microsoft Communications Server services on the local computer. This is done by calling Start-CsWindowsService without any parameters. Note that you will not receive an error if you try to start a service that has already been started.

-------------------------- Example 2 ------------------------

Copy Code
Start-CsWindowsService -Name "RTCRGS"

The preceding command starts the Response Group service on the local computer. To do this, the command uses the -Name parameter followed by the service name: RTCRGS.

-------------------------- Example 3 ------------------------

Copy Code
Start-CsWindowsService -Name "RTCRGS" -ComputerName atl-cs-001.litwareinc.com

The command shown in Example 3 also starts the Response Group service; in this case, however, the service is started on the remote computer atl-cs-001.litwareinc.com. To start a service on a remote computer, include the -ComputerName parameter followed by the fully qualified domain name of the remote computer.

-------------------------- Example 4 ------------------------

Copy Code
Get-CsWindowsService | Where-Object {$_.Status -ne "Running" | Start-CsWindowsService

In Example 4, the command searches the local computer for all the Microsoft Communications Server services that are not currently running, then starts each inactive service. To do this, the command first calls Get-CsWindowsService to return a collection of all the Microsoft Communications Server services. This collection is then piped to the Where-Object cmdlet, which selects only those services where the Status property is not equal to (-ne) Running. This filtered collection is then piped to Start-CsWindowsService, which starts each service in the collection.