Get-CsService
Topic Last Modified: 2012-03-23
Returns information about the services and server roles being used in your Microsoft Lync Server 2010 infrastructure. A service is an instance of a role that has been deployed in a Lync Server 2010 pool. For example, you might have a pool of computers all running the Monitoring Server service.
Syntax
Get-CsService [-Identity <XdsGlobalRelativeIdentity>] [-PoolFqdn <String>]
Get-CsService [-ApplicationServer <SwitchParameter>] [-PoolFqdn <String>]
Get-CsService [-ApplicationDatabase <SwitchParameter>] [-PoolFqdn <String>]
Get-CsService [-ArchivingServer <SwitchParameter>] [-PoolFqdn <String>]
Get-CsService [-ArchivingDatabase <SwitchParameter>] [-PoolFqdn <String>]
Get-CsService [-CentralManagement <SwitchParameter>] [-PoolFqdn <String>]
Get-CsService [-CentralManagementDatabase <SwitchParameter>] [-PoolFqdn <String>]
Get-CsService [-ConferencingServer <SwitchParameter>] [-PoolFqdn <String>]
Get-CsService [-Director <SwitchParameter>] [-PoolFqdn <String>]
Get-CsService [-EdgeServer <SwitchParameter>] [-PoolFqdn <String>]
Get-CsService [-PoolFqdn <String>] [-TrustedApplicationPool <SwitchParameter>]
Get-CsService [-FileStore <SwitchParameter>] [-PoolFqdn <String>]
Get-CsService [-ManagementServer <SwitchParameter>] [-PoolFqdn <String>]
Get-CsService [-MediationServer <SwitchParameter>] [-PoolFqdn <String>]
Get-CsService [-MonitoringServer <SwitchParameter>] [-PoolFqdn <String>]
Get-CsService [-MonitoringDatabase <SwitchParameter>] [-PoolFqdn <String>]
Get-CsService [-PoolFqdn <String>] [-PstnGateway <SwitchParameter>]
Get-CsService [-PoolFqdn <String>] [-ProvisionServer <SwitchParameter>]
Get-CsService [-PoolFqdn <String>] [-ProvisionDatabase <SwitchParameter>]
Get-CsService [-PoolFqdn <String>] [-Registrar <SwitchParameter>]
Get-CsService [-PoolFqdn <String>] [-UserServer <SwitchParameter>]
Get-CsService [-PoolFqdn <String>] [-UserDatabase <SwitchParameter>]
Get-CsService [-PoolFqdn <String>] [-WebServer <SwitchParameter>]
Get-CsService [-Filter <String>] [-PoolFqdn <String>]
Detailed Description
The capabilities found in Lync Server 2010 are typically expressed as services or as server roles. For example, you can configure Lync Server to automatically save a transcript of every instant messaging session that takes place in your organization. In order to do this, you must install the Archiving Server server role. Services and server roles can be configured at the same time you install Lync Server itself, or they can be configured after the software is up and running.
The Get-CsService cmdlet enables you to return information about the server roles and services running in your organization. Called without any additional parameters, Get-CsService returns detailed information about all your services and server roles. Alternatively, you can limit the returned data to a specified pool by using the PoolFqdn parameter. In addition, you can use any number of switch parameters to limit the returned data to a specific type of service. A switch parameter is a parameter that does not require a parameter value. For example, this command returns information about all your Archiving Servers:
Get-CsService –ArchivingServer
Note that you can only use one such switch parameter per command. The following command, which tries to return information about both Archiving Servers and Monitoring Servers, will fail:
Get-CsService –ArchivingServer –MonitoringServer
If you need to return information for multiple server roles, you can use Get-CsService to return a complete collection of service data, and then pipe that data to the Where-Object cmdlet:
Get-CsService | Where-Object {$_.Role –eq "ArchivingServer" –or $_.Role –eq "MonitoringServer"}
Who can run this cmdlet: By default, members of the following groups are authorized to run the Get-CsService cmdlet locally: RTCUniversalUserAdmins, 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 "Get-CsService"}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Identity |
Optional |
Xds Identity |
Unique identifier of the specific service or server role to be returned. For example: -Identity "Registrar:atl-cs-001.litwareinc.com". |
Filter |
Optional |
String |
Enables you to use wildcards to specify the service (or services) to be returned. You cannot use both the Identity and the Filter parameters in the same command. |
ApplicationDatabase |
Optional |
Switch Parameter |
Returns information about the Application databases used in your organization. Application databases are used by the Application service. |
ApplicationServer |
Optional |
Switch Parameter |
Returns information about the Application service. The Application service provides a way to run applications created by using the Microsoft Unified Communications Managed API (UCMA). |
ArchivingDatabase |
Optional |
Switch Parameter |
Returns information about the Archiving databases used in your organization. Archiving databases store transcripts of instant messaging sessions. |
ArchivingServer |
Optional |
Switch Parameter |
Returns information about the Archiving Servers used in your organization. Archiving Servers enable you to save the transcripts of instant messaging sessions. |
CentralManagement |
Optional |
Switch Parameter |
Returns information about the Central Management service used in your organization. The Central Management service is used to send configuration data to computers running Lync Server 2010 services. |
CentralManagementDatabase |
Optional |
Switch Parameter |
Returns information about the Central Management store used in your organization. The Central Management store maintains configuration information for Lync Server. |
ConferencingServer |
Optional |
Switch Parameter |
Returns information about the A/V Conferencing service used in your organization. The A/V Conferencing service is used to conduct meetings and conferences. |
Director |
Optional |
Switch Parameter |
Returns information about the Directors used in your organization. Directors are empowered to handle user requests and user authentication, but do not house user accounts. Directors are typically used to handle requests from external users. |
EdgeServer |
Optional |
Switch Parameter |
Returns information about the Edge Servers used in your organization. Edge Servers provide connectivity between your internal network and the Internet. |
FileStore |
Optional |
Switch Parameter |
Returns information about the File Stores used in your organization. The File Store is used to maintain Lync Server files, such as audio files used by the Announcement service. |
ManagementServer |
Optional |
Switch Parameter |
Returns information about the Central Management Server used in your organization. The Central Management Server is commonly collocated with the Front End Servers and is responsible for accessing information in the Central Management store. |
MediationServer |
Optional |
Switch Parameter |
Returns information about the Mediation Servers used in your organization. Mediation Servers help provide a bridge between your Enterprise Voice network and the public switched telephone network (PSTN). |
MonitoringServer |
Optional |
Switch Parameter |
Returns information about the Monitoring Servers used in your organization. Monitoring Servers are used to track Enterprise Voice phone usage and call quality. |
MonitoringDatabase |
Optional |
Switch Parameter |
Returns information about the monitoring databases used in your organization. Monitoring databases store Enterprise Voice phone usage and call quality information. |
PoolFqdn |
Optional |
String |
Fully qualified domain name (FQDN) of the pool hosting the service or server role. If you use the PoolFqdn parameter without specifying a service-specific parameter, then all the services and server roles found on that pool will be returned. |
ProvisionServer |
Optional |
Switch Parameter |
Returns information about the Provision Server service used in your organization. The Provision Server service is used to manage Lync Server certificates. |
ProvisionDatabase |
Optional |
Switch Parameter |
Returns information about the provision databases used in your organization. Provision databases maintain information about Lync Server certificates. |
PstnGateway |
Optional |
Switch Parameter |
Returns information about the public switched telephone network (PSTN) gateways used in your organization. PSTN gateways translate signals from Enterprise Voice devices to signals that can be understood by PSTN devices, and vice-versa. |
Registrar |
Optional |
Switch Parameter |
Returns information about the Registrars used in your organization. Registrars are used to authenticate users and to keep track of a user’s current status. |
TrustedApplicationPool |
Optional |
Switch Parameter |
Returns information about the trusted application pools used in your organization. Trusted applications pools host computers that run trusted applications. |
UserDatabase |
Optional |
Switch Parameter |
Returns information about the User database used in your organization. User databases store data needed by the User Server service. |
UserServer |
Optional |
Switch Parameter |
Returns information about the User Services service used in your organization. The User Services service provides such things as user replication, in-band provisioning, presence publication and notification, and contact card exchange. |
WebServer |
Optional |
Switch Parameter |
Returns information about the Web Services service used in your organization. The Web Services service host web-based applications such as the Address Book service. |
Input Types
None. Get-CsService does not accept pipelined input.
Return Types
Get-CsService returns different objects based on the parameters used when calling the cmdlet. For example, if you include the MonitoringDatabase parameter, Get-CsService returns instances of the Microsoft.Rtc.Management.Xds.DisplayMonitoringDatabase object. To determine the objects returned using other parameters, call Get-CsService using one of those parameters, and then pipe the returned object to the Get-Member cmdlet. For example: Get-CsService -Registrar | Get-Member.
Example
-------------------------- Example 1 ------------------------
Get-CsService
The command shown in Example 1 returns information about all the Lync Server 2010 services and server roles currently running in your organization.
-------------------------- Example 2 ------------------------
Get-CsService -ApplicationServer
Example 2 returns information only about the Application service. You can return information for other services/server roles simply by using the appropriate parameter. For example, this command returns information about the file store:
Get-CsService -FileStore
-------------------------- Example 3 ------------------------
Get-CsService -PoolFqdn "atl-cs-001.litwareinc.com" | Select-Object Identity
The preceding command reports back the Identity for each service located on the pool atl-cs-001.litwareinc.com. To carry out this task, the command first calls Get-CsService and the PoolFqdn parameter to return only those services and server roles found on the pool atl-cs-001.litwareinc.com. This collection is then piped to the Select-Object cmdlet, which reports back the Identity of each item in the collection.
-------------------------- Example 4 ------------------------
Get-CsService | Where-Object {$_.SiteID -eq "site:Redmond"}
In Example 4, information is returned for all the services/server roles found on the Redmond site. This is done by first calling Get-CsService without any parameters in order to return a collection of all the services and server roles currently in use in the organization. This data is then piped to the Where-Object cmdlet, which picks out only those items where the SiteID property is equal to site:Redmond.
-------------------------- Example 5 ------------------------
Get-CsService | Where-Object {$_.DependentServiceList -like "*Registrar*"}
The command shown in Example 5 returns information about all the services that list the Registrar as a dependent service. To do this, Get-CsService is called in order to return a collection of all the services and server roles currently in use. This collection is then piped to Where-Object, which selects each item where the DependentServiceList property includes the string value "Registrar". The Where-Object criteria is specified by using the -like operator and the wildcard value "*Registrar*".