Topic Last Modified: 2013-02-21
Modifies the property values of an existing server application. Server applications are applications that are hosted by Lync Server. This cmdlet was introduced in Lync Server 2010.
Syntax
Set-CsServerApplication [-Identity <XdsIdentity>]
<COMMON PARAMETERS>
|
Set-CsServerApplication [-Instance <PSObject>]
<COMMON PARAMETERS>
|
COMMON PARAMETERS: [-Confirm [<SwitchParameter>]]
[-Critical <$true | $false>] [-Enabled <$true |
$false>] [-Force <SwitchParameter>] [-Priority
<Int32>] [-Script <String>] [-ScriptName
<String>] [-Uri <String>] [-WhatIf
[<SwitchParameter>]]
|
Examples
EXAMPLE 1
The command shown in Example 1 enables the server application that has the Identity Registrar:atl-cs-001.litwareinc.com/ExumRouting. Because Identities must be unique, this command will only enable a single server application.
Copy Code | |
---|---|
Set-CsServerApplication -Identity "Registrar:atl-cs-001.litwareinc.com/ExumRouting" -Enabled $True |
EXAMPLE 2
Example 2 enables all the server applications that are currently disabled. To do this, the command first calls the Get-CsServerApplication cmdlet 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 cmdlet, which picks out only those applications where the Enabled property is equal to False. In turn, the filtered collection is piped to the Set-CsServerApplication cmdlet, which takes each item in the collection and sets the Enabled property to True.
Copy Code | |
---|---|
Get-CsServerApplication | Where-Object {$_.Enabled -eq $False} | Set-CsServerApplication -Enabled $True |
Detailed Description
Server applications refer to the individual programs that run under the Lync Server. 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"}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Confirm |
Optional |
System.Management.Automation.SwitchParameter |
Prompts you for confirmation before executing the command. |
Critical |
Optional |
System.Boolean |
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. |
Enabled |
Optional |
System.Boolean |
Set this value to True to enable the application. Set the value to False to disable the application. |
Force |
Optional |
System.Management.Automation.SwitchParameter |
Suppresses the display of any non-fatal error message that might occur when running the command. |
Identity |
Optional |
Microsoft.Rtc.Management.Xds.XdsIdentity |
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: Registrar:atl-cs-001.litwareinc.com/QoEAgent. |
Instance |
Optional |
ServerApplication.Application object |
Allows you to pass a reference to an object to the cmdlet rather than set individual parameter values. |
Priority |
Optional |
System.Int32 |
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. |
Script |
Optional |
System.String |
Enables you to associate the server application with a script. To add a script to a server application, use syntax similar to this: -Script "Update.ps1" To remove a script, simply set the Script property to a null value: -Script $Null Each server application can only be associated with one script. |
ScriptName |
Optional |
System.String |
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. |
Uri |
Optional |
System.String |
Unique Uniform Resource Identifier (URI) for the application. For example, the QoEAgent application has the URI http://www.microsoft.com/LCS/QoEAgent. |
WhatIf |
Optional |
System.Management.Automation.SwitchParameter |
Describes what would happen if you executed the command without actually executing the command. |
Input Types
Microsoft.Rtc.Management.WritableConfig.Settings.ServerApplication.Application object. The Set-CsServerApplication cmdlet accepts pipelined instances of the server application object.
Return Types
The Set-CsServerApplication cmdlet does not return a value or object. Instead, the cmdlet configures instances of the Microsoft.Rtc.Management.WritableConfig.Settings.ServerApplication.application object.