Topic Last Modified: 2010-10-01

Modifies one or more of the Web Server services used by Microsoft Lync Server 2010.

Syntax

Set-CsWebServer [-Identity <XdsGlobalRelativeIdentity>] [-AppSharingPortCount <UInt16>] [-AppSharingPortStart <UInt16>] [-Confirm [<SwitchParameter>]] [-ExternalFqdn <Fqdn>] [-ExternalHttpPort <UInt16>] [-ExternalHttpsPort <UInt16>] [-Force <SwitchParameter>] [-InternalFqdn <Fqdn>] [-PrimaryHttpPort <UInt16>] [-PrimaryHttpsPort <UInt16>] [-PublishedExternalHttpPort <UInt16>] [-PublishedExternalHttpsPort <UInt16>] [-PublishedPrimaryHttpPort <UInt16>] [-PublishedPrimaryHttpsPort <UInt16>] [-ReachExternalPsomServerPort <UInt16>] [-ReachPrimaryPsomServerPort <UInt16>] [-UserServer <String>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

Xds Identity

Unique identifier for the Web Services pool. For example: -Identity "WebServer:atl-cs-001.litwareinc.com".

Note that you can leave off the prefix "WebServer:" when specifying a Web server. For example: -Identity "atl-cs-001.litwareinc.com".

AppSharingPortCount

Optional

Integer

Total number of ports allocated for application sharing. The actual ports to be opened will start with the value configured for AppSharingPortStart and continue through the number of ports specified for AppSharingPortCount. For example, if the AppSharingPortStart is set to 60000 and the AppSharingPortCount is set to 100 then ports 60000 through 60099 will be used for application sharing. The default value is 16383.

AppSharingPortStart

Optional

Integer

First port in the range of ports allocated for application sharing. The default value is 49152.

ExternalFqdn

Optional

String

Fully qualified domain name (FQDN) used by people connecting to the Web Services pool from outside the internal network. For example: -ExternalFqdn "www.litwareinc.com".

ExternalHttpPort

Optional

Integer

Port number for external web connections made using the HTTP protocol. The default value is port 8080.

ExternalHttpsPort

Optional

Integer

Port number for external web connections made using the HTTPS protocol. The default value is port 4443.

PrimaryHttpPort

Optional

Integer

Port number for internal web connections made using the HTTP protocol. The default value is port 80.

PrimaryHttpsPort

Optional

Integer

Port number for internal web connections made using the HTTPS protocol. The default value is port 443.

ReachExternalPsomServerPort

Optional

Integer

External port number for the Persistent Shared Object Model Protocol, a Microsoft protocol used for conferences. The default port number is 8061.

ReachPrimaryPsomServerPort

Optional

Integer

Primary port number for the Persistent Shared Object Model (PSOM) Protocol, a Microsoft protocol used for conferences. The default port number is 8060.

UserServer

Optional

String

Service ID for the User Services pool associated with the Web Services pool. For example: -UserServer "UserServer:atl-cs-001.litwareinc.com".

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

Lync Server 2010 makes extensive use of Web servers and web services. For example, Address Book queries can be conducted using web services (the Address Book Query Web service). Lync Server also hosts webpages that enable users to do such things as configure their dial-in conferencing personal identification number (PINs). Considering the important role played by Web servers and web services, it is critical that administrators know how these servers and services are configured. That information that can be returned using the following command:

Get-CsService –WebServer

There are also times where it is critical that administrators be able to change the way their Web servers are configured. For example, you might need to modify the port used for external HTTP or HTTPS connections. Port changes like these (and other modifications) can be made using the Set-CsWebServer cmdlet.

Who can run this cmdlet: By default, members of the following groups are authorized to run the Set-CsWebServer 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-CsWebServer"}

Input Types

None. Set-CsWebServer does not accept pipelined input.

Return Types

None. Instead, Set-CsWebServer modifies instances of the Microsoft.Rtc.Management.Xds.DisplayWebServer object.

Example

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

Copy Code
Set-CsWebServer -Identity "WebServer:atl-cs-001.litwareinc.com" -PrimaryHttpPort 89

The command shown in Example 1 changes the PrimaryHttpPort for a single Web Service pool: the pool with the Identity WebServer:atl-cs-001.litwareinc.com. In this example, the port is changed to port number 89.

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

Copy Code
Get-CsService -WebServer | ForEach-Object {Set-CsWebServer -Identity $_.Identity -PrimaryHttpPort 89}

The command shown in Example 2 is a variation of the command shown in Example 1. In this case, the PrimaryHttpPort is modified for all the Web Service pools in the organization. To do this, the command starts off by using Get-CsService and the WebServer parameter to return a collection of all the Web Services pools currently in use. This collection is then piped to the ForEach-Object cmdlet, which takes each pool in the collection and sets the PrimaryHttpPort to port 89. The data must be piped to ForEach-Object because the Set-CsWebServer cmdlet cannot accept pipelined data itself.

See Also

Other Resources

Get-CsService