Topic Last Modified: 2010-10-01

Modifies the property values of an existing server application. Server applications are applications that are hosted by Microsoft Lync Server 2010.


Set-CsServerApplication [-Identity <XdsIdentity>] [-Confirm [<SwitchParameter>]] [-Critical <$true | $false>] [-Enabled <$true | $false>] [-Force <SwitchParameter>] [-Priority <Int32>] [-ScriptName <String>] [-Uri <String>] [-WhatIf [<SwitchParameter>]]
Set-CsServerApplication [-Confirm [<SwitchParameter>]] [-Critical <$true | $false>] [-Enabled <$true | $false>] [-Force <SwitchParameter>] [-Instance <PSObject>] [-Priority <Int32>] [-ScriptName <String>] [-Uri <String>] [-WhatIf [<SwitchParameter>]]


Parameter Required Type Description



Xds Identity

Unique identifier for the server application to be modified. Server application Identities are composed of the service where the application is hosted plus the application name. For example, the server application named QoEAgent might have an Identity similar to this:



ServerApplication.Application object

Allows you to pass a reference to an object to the cmdlet rather than set individual parameter values.




If set to True (the default value), then Lync Server will not start unless the application in question can be started. If False, then Lync Server will start regardless of whether or not the application can be started.




Set this value to True to enable the application. Set the value to False to disable the application.




Indicates the order of execution for server applications. The application with priority 0 is started first; the application with priority 1 is started second; and so on. Note that each service that hosts a server application has its own unique set of priorities. For example, the Registrar service might host three applications with corresponding priorities 0, 1, and 2. Similarly, the Edge Server service might have four applications; these applications will have the priorities 0, 1, 2, and 3.

If you do not specify a priority then the application will automatically be added to the bottom of the priority list. If you add or remove an application, the priorities of the other applications will be adjusted accordingly. For example, if you delete an application that has a priority of 0, then the application that previously had the priority 1 will automatically have its priority set to 0.




Path to the Microsoft SIP Processing Language (MSPL) script used by the application. MSPL is a scripting language used for filtering and routing SIP messages.




Unique Uniform Resource Identifier (URI) for the application. For example, the QoEAgent application has the URI



Switch Parameter

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



Switch Parameter

Prompts you for confirmation before executing the command.



Switch Parameter

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

Detailed Description

Server applications refer to the individual programs that run under the Lync Server 2010. The Set-CsServerApplication cmdlet provides a way for administrators to modify the property values of any application running as part Lync Server.

Who can run this cmdlet: By default, members of the following groups are authorized to run the Set-CsServerApplication cmdlet locally: RTCUniversalServerAdmins. To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Set-CsServerApplication"}

Input Types

Microsoft.Rtc.Management.WritableConfig.Settings.ServerApplication.Application object. Set-CsServerApplication accepts pipelined instances of the server application object.

Return Types

Set-CsServerApplication does not return a value or object. Instead, the cmdlet configures instances of the Microsoft.Rtc.Management.WritableConfig.Settings.ServerApplication.application object.


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

Copy Code
Set-CsServerApplication -Identity "" -Enabled $True

The command shown in Example 1 enables the server application that has the Identity Because Identities must be unique, this command will only enable a single server application.

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

Copy Code
Get-CsServerApplication | Where-Object {$_.Enabled -eq $False} | Set-CsServerApplication -Enabled $True

The preceding command enables all the server applications that are currently disabled. To do this, the command first calls Get-CsServerApplication in order to return a collection of all the server applications currently in use in the organization. This collection is then piped to the Where-Object, which picks out only those applications where the Enabled property is equal to False. In turn, the filtered collection is piped to Set-CsServerApplication, which takes each item in the collection and sets the Enabled property to True.

See Also