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

Returns information about certificates on the local computer that have been configured for use with Microsoft Communications Server 2010.

Syntax

Get-CsCertificate [-Confirm [<SwitchParameter>]] [-NetportId <String>] [-Report <String>] [-Type <String[]>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Type

Optional

String

Enables you to specify the type of certificate to be returned. Certificate types include (but are not limited to):

Default

WebServicesInternal

WebServicesExternal

ProvisionService

PICWebService

Internal

AccessEdgeExternal

DataEdgeExternal

BandwidthPolicyToken

MediaRelayEdgeToken

For example, this syntax returns all the ProvisionService certificates found on the local computer: -Type ProvisionService. If this parameter is not included then Get-CsCertificate returns all the Communications Server certificates from the local computer.

NetportId

Optional

String

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

Report

Optional

String

Enables you to record (in an XML file) detailed information about the procedures carried out by Get-CsCertificate. The parameter value should be the full path to the XML file; for example: -Report C:\Logs\Certificates.xml. If the specified file already exists it will automatically be overwritten with the new information.

Force

Optional

Switch Parameter

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

Communications Server 2010 uses certificates as a way for servers and server roles to verify their identities; for example, Edge Servers use certificates to verify that the computer they are communicating with really is a Front End Server and vice versa. In order to fully implement Communications Server you will need to have the appropriate certificates assigned to the appropriate server roles.

The Get-CsCertificate cmdlet provides a way for you to retrieve detailed information about the certificates that have been configured for use with Communications Server. Note that the cmdlet only returns information about Communications Server certificates. If a certificate has not been configured for use with Communications Server (either by using the Request-CsCertificate cmdlet or the Import-CsCertificate cmdlet) then that certificate will not be returned when you run Get-CsCertificate.

Return Types

Get-CsCertificate returns instances of the Microsoft.Rtc.Management.Deployment.CertificateReference object.

Examples

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

Copy Code
Get-CsCertificate

The command shown in Example 1 returns information about all the certificates currently assigned the Communications Servercomponents. This is done by calling Get-CsCertificate without any additional parameters.

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

Copy Code
Get-CsCertificate -Type WebServicesInternal

Example 2 retrieves all the Communications Server certificates used for internal Web services. To do this, the Type parameter is included, along with the parameter value WebServicesInternal.

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

Copy Code
Get-CsCertificate | Where-Object {$_.NotAfter -lt "9/1/2011"}

The preceding command returns all the Communications Server certificates that expire before September 1, 2011. To carry out this task, the command first uses Get-CsCertificate to return a collection of all the Communications Server certificates currently in use. This collection is then piped to the Where-Object cmdlet, which selects only those certificates that expire before (that is, have an expiration date less than: -lt) September 1, 2011 (9/1/2011).

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

Copy Code
Get-CsCertificate | Where-Object {$_.Issuer -eq "Cn=MyCa"}

Example 4 returns information about all the Communications Server certificates issued by the Certificate Authority MyCa. To do this, the command first calls Get-CsCertificate, without any parameters, in order to return a collection of all the certificates currently in use. This collection is then piped to Where-Object, which picks out all the certificates where the Issuer property is equal to (-eq) "Cn=MyCa".

-------------------------- Example 5 ------------------------

Copy Code
Get-CsCertificate | Where-Object {$_.Subject -eq "atl-cs-001.litwareinc.com"}

The command shown in Example 5 returns all the Communications Server cmdlets where the Subject property has been set to atl-cs-001.litwareinc.com. This is done by using Get-CsCertificate to return a collection of all the Communications Server certificates, then piping that collection to the Where-Object cmdlet. In turn, Where-Object selects only those certificates where the Subject property is equal to atl-cs-001.litwareinc.com.