Topic Last Modified: 2010-12-06

Enables you to assign a certificate to a Microsoft Lync Server 2010 server or server role.

Syntax

Set-CsCertificate -Reference <CertificateReference> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-NetportId <String>] [-Report <String>] [-Type <CertType[]>] [-WhatIf [<SwitchParameter>]]
Set-CsCertificate -Thumbprint <String> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-NetportId <String>] [-Report <String>] [-Type <CertType[]>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

NetportId

Optional

String

Reserved for future use. This parameter is for certificates dedicated to a specific port, a scenario not yet supported by Lync Server.

Reference

Optional

CertificateReference object

Object reference to a certificate configured for use with Lync Server. The following command returns an object reference (the variable $x) representing a certificate with the thumbprint B142918E463981A76503828BB1278391B716280987B:

$x = Get-CsCertificate | Where-Object {$_.Thumbprint –eq "B142918E463981A76503828BB1278391B716280987B".

Thumbprint

Optional

String

Unique identifier for the certificate. A certificate thumbprint looks similar to this: B142918E463981A76503828BB1278391B716280987B.

Type

Optional

String

Type of certificate being assigned. Certificate types include, but are not limited to, the following:

AccessEdgeExternal

AudioVideoAuthentication

DataEdgeExternal

Default

External

Internal

PICWebService (Microsoft Lync Online 2010 only)

ProvisionService (Microsoft Lync Online 2010 only)

WebServicesExternal

WebServicesInternal

WsFedTokenTransfer

For example, this syntax assigns the Default certificate: -Type Default.

You can specify multiple types in a single command by separating the certificate types with commas:

-Type Internal,External,Default

Force

Optional

Switch Parameter

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

Report

Optional

String

Enables you to record detailed information about the procedures carried out by Set-CsCertificate. The parameter value should be the full path to the HTML file to be generated; for example: -Report C:\Logs\Certificates.html. If the specified file already exists it will automatically be overwritten with the new information.

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 uses certificates as a way for servers and server roles to verify their identities; for example, an Edge Server uses certificates to verify that the computer it is communicating with really is a Front End Server and vice versa. In order to fully implement Lync Server, you will need to have the appropriate certificates assigned to the appropriate server roles.

The Set-CsCertificate cmdlet enables administrators to assign a certificate to a server or server role. Note that you can only assign certificates that have already been configured for use with Lync Server. To identify certificates available for assignment, use the Get-CsCertificate cmdlet.

Who can run this cmdlet: You must be a local administrator in order to run the Set-CsCertificate cmdlet locally. 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-CsCertificate"}

Input Types

Microsoft.Rtc.Management.Deployment.CertificateReference.

Return Types

Set-CsCertificate does not return any values or objects.

Example

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

Copy Code
Set-CsCertificate -Type WebServicesExternal -Thumbprint "B142918E463981A76503828BB1278391B716280987B"

The command shown in Example 1 assigns the certificate with the Thumbprint B142918E463981A76503828BB1278391B716280987B to the WebServicesExternal role on the local computer.

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

Copy Code
Set-CsCertificate -Type Default, WebServicesInternal, WebServicesExternal -Thumbprint "B142918E463981A76503828BB1278391B716280987B"

The preceding command assigns the assigns the certificate with the Thumbprint B142918E463981A76503828BB1278391B716280987B to three different roles on the local computer: Default, WebServicesInternal, and WebServicesExternal.

See Also