Lync Server 2013 cmdlets by category

Microsoft Lync Server 2013 ships with almost 550 cmdlets specifically designed to allow administrators to manage Lync Server from the command line.

Below are the most commonly used CmdLets in Lync server 2013 based on the categories.

Categories are as follows

1)User management cmdlets in Lync Server 2013

1.1Get-CsAdUser

1.2Disable-CsUser

1.3Enable-CsUser

1.4Get-CsUser

1.5Move-CsUser

1.6Set-CsUser

2)Client management cmdlets in Lync Server 2013

2.1Get-CsClientPolicy

2.2Get-CsClientVersionConfiguration

2.3Get-CsClientVersionPolicy

2.4Get-CsClientVersionPolicyRule

2.5New-CsClientPolicy

2.6New-CsClientVersionConfiguration

3)IM and Presence Cmdlets

3.1Get-CsFileTransferFilterConfiguration

3.2Get-CsPresencePolicy

3.3Get-CsPrivacyConfiguration

3.4Grant-CsPresencePolicy

3.5Set-CsPresencePolicy

3.6Test-CsGroupExpansion

3.7Test-CsGroupIM

3.8Test-CsGroupIm

3.9Test-CsIM

3.10Test-CsP2PAV

3.11Test-CsPresence

4)Conferencing Cmdlets

A)Dial-In Conferencing Cmdlets

4.1Get-CsConferenceDirectory

4.2Get-CsDialInConferencingAccessNumber

4.3Get-CsDialInConferencingConfiguration

4.4New-CsConferenceDirectory

4.5New-CsDialInConferencingAccessNumber

4.6New-CSDialInConferencingConfiguration

4.7Set-CsDialInConferencingConfiguration

4.8Get-CsDialInConferencingConfiguration

4.9Set-CsDialInConferencingAccessNumber

4.10Test-CsDialInConferencing

B)Web Conferencing Cmdlets

4.11Disable-CsMeetingRoom

4.12Enable-CsMeetingRoom

4.13Get-CsConferencingPolicy

4.14Get-CsMeetingRoom

4.15Test-CsAVConference

5)Infrastructure and Deployment Cmdlets

5.1Get-CsManagementStoreReplicationStatus

5.2Get-CsManagementStoreReplicationStatus

5.3Get-CsUserReplicatorConfiguration

5.4Test-CsReplica

5.5Get-CsPool

5.6Get-CsSite

5.7Get-CsServerVersion

5.8Get-CsTopology

5.9Import-CsConfiguration

5.10Publish-CsTopology

5.11Test-CsTopology

6)Backup and High Availability Cmdlets

6.1Get-CsBackupServiceConfiguration

6.2Get-CsBackupServiceStatus

6.3Get-CsPoolFabricState

6.4Backup-CsPool

7)Server Roles and Services Cmdlets

A)Address Book Server Cmdlets

7.1Get-CsAddressBookConfiguration

7.2New-CsAddressBookConfiguration

7.3Set-CsAddressBookConfiguration

7.4Test-CsAddressBookService

B)Database and Management Server Cmdlets

7.5Get-CsConfigurationStoreLocation

7.6Get-CsDatabaseMirrorState

7.7Get-CsUserDatabaseState

7.8Install-CsDatabase

7.9Invoke-CsDatabaseFailover

7.10Invoke-CsManagementServerFailover

7.11Move-CsManagementServer

7.12Test-CsDatabase

7.13Update-CsUserDatabase

C)Registrar and Director Cmdlets

7.14Get-CsRegistrarConfiguration

7.15Reset-CsPoolRegistrarState

7.16Set-CsRegistrar

7.17Test-CsRegistration

7.18Get-CsService

7.19Get-CsWindowsService

7.20Start-CsWindowsService

7.21Stop-CsWindowsService

8)Troubleshooting Server Roles and Services Cmdlets

8.1Get-CsAudioTestServiceApplication

8.2Get-CsDiagnosticConfiguration

8.3Get-CsHealthMonitoringConfiguration

8.4Set-CsAudioTestServiceApplication

8.5Set-CsHealthMonitoringConfiguration

9)Enterprise Voice Cmdlets

A)Troubleshooting Enterprise Voice Cmdlets

9.1Get-CsVoiceConfiguration

9.2Get-CsVoiceTestConfiguration

9.3New-CsVoiceTestConfiguration

9.4Remove-CsVoiceConfiguration

9.5Get-CsDialPlan

9.6Get-CsVoiceNormalizationRule

9.7Get-CsVoicePolicy

9.8Get-CsVoiceRoute

9.9Test-CsVoiceUser

B)Voice Normalization Rules Cmdlets

9.10Get-CsVoiceNormalizationRule

9.11Set-CsVoiceNormalizationRule

9.12Get-CsVoiceNormalizationRule

C)Voice Policy Cmdlets

9.13Get-CsDialPlan

9.14Get-CsPstnUsage

9.15Get-CsVoicePolicy

9.16Set-CsDialPlan

9.17Set-CsPstnUsage

9.18Set-CsVoicePolicy

9.19Get-CsDialPlan

D)Voice Routing Cmdlets

9.20Get-CsPstnUsage

9.21Get-CsRoutingConfiguration

9.22Get-CsVoiceRoute

9.23Set-CsPstnUsage

9.24Set-CsVoiceRoute

  1. User management cmdlets in Lync Server 2013

The user management cmdlets included in Microsoft Lync Server 2013 allow you to enable, disable, and modify Lync Server user accounts.

1.1.Get-CsAdUser [-Identity <UserIdParameter>] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-LDAPFilter <String>] [-OU <OUIdParameter>] [-ResultSize <Unlimited>]

Parameter / Required / Description
Credential / Optional / Enables you to run the Get-CsAdUser cmdlet under alternate credentials. This might be required if the account you used to log on to Windows does not have the necessary privileges required to work with user objects.
Identity / Optional / Indicates the Identity of the user account to be retrieved. User Identities can be specified by using one of four formats: 1) the user's SIP address; 2) the user's user principal name (UPN); 3) the user's domain name and logon name, in the form domain\logon (for example, litwareinc\kenmyer); and, 4) the user's Active Directory display name (for example, Ken Myer). You can also reference a user account by using the user’s Active Directory distinguished name.

1.2.Disable-CsUser -Identity "Microsoft\abc"

Parameter / Required / Description
Identity / Required / Indicates the Identity of the user account to be disabled. User Identities can be specified by using one of four formats: 1) the user's SIP address; 2) the user's user principal name (UPN); 3) the user's domain name and logon name, in the form domain\logon (for example, litwareinc\kenmyer); and, 4) the user's Active Directory display name (for example, Ken Myer). You can also reference a user account by using the Active Directory distinguished name.

1.3.Enable-CsUser -Identity "Pilar Ackerman" -RegistrarPool "atl-cs-001.litwareinc.com" -SipAddressType SamAccountName -SipDomain litwareinc.com

Parameter / Required / Description
Identity / Required / Indicates the Identity of the user account to be enabled for Lync Server. User Identities can be specified by using one of four formats: 1) the user's SIP address; 2) the user's user principal name (UPN); 3) the user's domain name and logon name, in the form domain\logon (for example, litwareinc\kenmyer); and, 4) the user's Active Directory display name (for example, Ken Myer). You can also reference a user account by using the user’s Active Directory distinguished name.

1.4.Get-CsUser -Identity "Pilar Ackerman"

Parameter / Required / Description
Identity / Optional / Indicates the Identity of the user account to be retrieved. User Identities can be specified using one of four formats: 1) the user's SIP address; 2) the user's user principal name (UPN); 3) the user's domain name and logon name, in the form domain\logon (for example, litwareinc\kenmyer); and, 4) the user's Active Directory display name (for example, Ken Myer). You can also reference a user account by using the user’s Active Directory distinguished name.

1.5.Move-CsUser -Identity "Pilar Ackerman" -Target "atl-cs-001.litwareinc.com"

Parameter / Required / Description
Identity / Required / Indicates the Identity of the user account to be moved. User Identities can be specified using one of four formats: 1) the user's SIP address; 2) the user's user principal name (UPN); 3) the user's domain name and logon name, in the form domain\logon (for example, litwareinc\kenmyer); and, 4) the user's Active Directory display name (for example, Ken Myer). User Identities can also be referenced by using the user’s Active Directory distinguished name.

1.6.Set-CsUser -Identity "Pilar Ackerman" -EnterpriseVoiceEnabled $True

Parameter / Required / Type / Description
Identity / Required / UserIdParameter / Indicates the Identity of the user account to be modified. User Identities can be specified using one of four formats: 1) the user's SIP address; 2) the user's user principal name (UPN); 3) the user's domain name and logon name, in the form domain\logon (for example, litwareinc\kenmyer); and, 4) the user's Active Directory display name (for example, Ken Myer). User Identities can also be referenced by using the user’s Active Directory distinguished name.

2)Client management cmdlets in Lync Server 2013

Client management consists primarily of determining which client applications (such as Microsoft Lync 2013) will be allowed to log on to Lync Server 2013 and determining the capabilities available to those client applications after they have logged on.

2.1Get-CsClientPolicy

2.2Get-CsClientVersionConfiguration

Parameter / Required / Description
Filter / Optional / Enables you to use wildcard characters in order to return a collection (or collections) of client version configuration settings. To return a collection of all the settings configured at the site scope, use this syntax: -Filter site:*. To return a collection of all the settings that have the string value "EMEA" somewhere in their Identity (the only property you can filter for) use this syntax: -Filter *EMEA*.
Identity / Optional / Indicates the unique identifier for the collection of client version configuration settings you want to return. To refer to the global settings, use this syntax: -Identity global. To refer to a collection configured at the site scope, use syntax similar to this: -Identity site:Redmond. You cannot use wildcards when specifying an Identity. If you need to use wildcards, then include the Filter parameter instead.

2.3Get-CsClientVersionPolicy

Parameter / Required / Description
Filter / Optional / Enables you to use wildcards when specifying the policy (or policies) to be retrieved. For example, this syntax returns all the policies that have been configured at the site scope: -Filter "site:*". This syntax returns all the policies that have been configured at the per-user scope: -Filter "tag:*".
You cannot use both the Filter and the Identity parameters in the same command.
Identity / Optional / Unique identifier for the policy to be returned. To return the global policy, use this syntax: -Identity global. To return a policy configured at the site scope, use syntax similar to this: -Identity "site:Redmond". To return a policy configured at the service scope, use syntax similar to this: -Identity "Registrar:atl-cs-001.litwareinc.com". The Registrar service is the only service that can host a client version policy.

2.4Get-CsClientVersionPolicyRule

Parameter / Required / Description
Filter / Optional / Enables you to use wildcard characters when specifying the client version policy rules to be returned. For example, to return all the rules configured for the Redmond site, use this syntax: -Filter "site:Redmond/*".
You cannot use both the Filter and the Identity parameters in the same command.
Identity / Optional / Unique identifier for the client version policy rule to be retrieved. The Identity of a client version rule consists of the scope where the rule has been configured plus a globally unique identifier (GUID). That means that a rule will have an Identity similar to this: site:Redmond/1987d3c2-4544-489d-bbe3-59f79f530a83. Because GUIDs are difficult to remember and to work with, the Examples section in this Help topic lists alternate ways that you can identify the rules to be returned.

2.5New-CsClientPolicy -Identity RedmondClientPolicy -DisableCalendarPresence $True -DisablePhonePresence $True -DisplayPhoto "PhotosFromADOnly"

2.6New-CsClientVersionConfiguration -Identity site:Redmond -Enabled $False

$x = New-CsClientVersionConfiguration -Identity site:Redmond -InMemory

$x.DefaultAction = "Block"

Set-CsClientVersionConfiguration -Instance $x

3)IM and Presence Cmdlets

Instant Messaging (IM) and presence cmdlets allow you to manage those client features through Windows PowerShell. You can set presence policies that apply to users at the global, site, or per-user scope. You can also configure various privacy and IM features.

3.1Get-CsFileTransferFilterConfiguration -Identity site:Redmond

Parameter / Required / Description
Filter / Optional / Enables you to use wildcards when specifying the file transfer filter configurations to be returned. For example, to return all the file transfer filter configurations at the site scope, use this syntax: -Filter "site:*". By design, file transfer filter configurations that have an Identity (the only property you can filter for) that begins with the string value "site:" were configured at the site scope.
Identity / Optional / Unique identifier for the file transfer filter configuration you want to retrieve. To refer to the global settings, use this syntax: -Identity global. To refer to settings configured at the site scope, use syntax similar to this: -Identity site:Redmond. Note that you cannot use wildcard values when specifying an Identity. If you want to use wildcards, use the Filter parameter instead.

3.2Get-CsPresencePolicy -Identity "RedmondPresencePolicy"

Parameter / Required / Description
Filter / Optional / Enables you to use wildcards when specifying the policy (or policies) to be returned. For example, this syntax returns all the presence policies configured at the site scope: -Filter "site:*".
The Filter and Identity parameters cannot be used in the same command.
Identity / Optional / Unique identifier of the presence policy to be retrieved. To return the global policy, use this syntax: -Identity global. To return a policy configured at the site scope, use syntax similar to this: -Identity "site:Redmond". To return a policy configured at the per-user scope, use syntax like this: -Identity "RedmondPresencePolicy". You cannot use wildcard characters when specifying the Identity.

3.3Get-CsPrivacyConfiguration -Identity site:Redmond

Parameter / Required / Description
Filter / Optional / Enables you to use wildcards to return one or more collections of privacy configuration settings. For example, to return all the settings configured at the site scope, you can use this syntax: -Filter "site:*". To return all the settings configured at the service scope, use this syntax: -Filter "service:*".
Identity / Optional / Unique identifier for the privacy configuration settings to be retrieved. To return the global settings, use this syntax: -Identity global. To return settings configured at the site scope, use syntax similar to this: -Identity site:Redmond. To modify settings at the service level, use syntax like this: -Identity service:UserServer:atl-cs-001.litwareinc.com

3.4Grant-CsPresencePolicy -Identity "Ken Myer" -PolicyName "RedmondPresencePolicy"

Parameter / Required / Description
Identity / Required / Indicates the Identity of the user account to be assigned the presence policy. User Identities can be specified using one of four formats: 1) the user's SIP address; 2) the user's user principal name (UPN); 3) the user's domain name and logon name, in the form domain\logon (for example, litwareinc\kenmyer); and, 4) the user's Active Directory display name (for example, Ken Myer). User Identities can also be specified by using the user’s Active Directory distinguished name.
In addition, you can use the asterisk (*) wildcard character when using the Display Name as the user Identity. For example, the Identity "* Smith" returns all the users with display name that ends with the string value "Smith".
PolicyName / Required / Identity of the per-user policy to be assigned; for example: -PolicyName "RedmondPresencePolicy". The PolicyName is the Identity of the policy minus the "tag:" prefix. For example, a policy with the Identity "tag:NorthAmericaPresencePolicy" has a PolicyName equal to "NorthAmericaPresencePolicy".

3.5Set-CsPresencePolicy -Identity "RedmondPresencePolicy" -MaxPromptedSubscriber 300

Parameter / Required / Description
Confirm / Optional / Prompts you for confirmation before executing the command.
Description / Optional / Enables administrators to provide additional text to accompany a presence policy. For example, the Description might include information about the users the policy should be assigned to.
Force / Optional / Suppresses the display of any non-fatal error message that might occur when running the command.
Identity / Optional / Unique identifier of the presence policy to be modified. To modify the global policy, use this syntax: -Identity global. To modify a policy at the site scope, use syntax similar to this: -Identity "site:Redmond". To modify a per-user policy, use syntax like this: -Identity "RedmondPresencePolicy".
Instance / Optional / Allows you to pass a reference to an object to the cmdlet rather than set individual parameter values.

3.6Test-CsGroupExpansion -TargetFqdn atl-cs-001.litwareinc.com -GroupEmailAddress

Parameter / Required / Type / Description
GroupEmailAddress / Required / System.String / Email address of the targeted distribution group. For example: -GroupEmailAddress "".
TargetFqdn / Required / System.String / Fully qualified domain name (FQDN) of the Registrar pool where group expansion is to be tested. For example: -TargetFqdn "atl-cs-001.litwareinc.com".
Note that you cannot use both the TargetUri parameter and the TargetFqdn parameter in the same command.
TargetUri / Required / System.String / Uniform Resource Identifier (URI) of the Group Expansion Web service. For example: -TargetUri "
Note that you cannot use both the TargetUri parameter and the TargetFqdn parameter in the same command.

3.7Test-CsGroupIM

3.8Test-CsGroupIm -TargetFqdn atl-cs-001.litwareinc.com

Parameter / Required / Type / Description
ReceiverCredential / Required / PSCredential / User credential object for the first of the two user accounts to be tested. The value passed to ReceiverCredential should be an object reference obtained by using the Get-Credential cmdlet. For example, this code returns a credentials object for the user litwareinc\pilar and stores that object in a variable named $y:
$y = Get-Credential "litwareinc\pilar"
You need to supply the user password when running this command.
The receiver credential is not required if you are running the test under the health monitoring configuration settings for the pool.
SenderCredential / Required / PSCredential / User credential object for the second of the two user accounts to be tested. The value passed to SenderCredential should be an object reference obtained by using the Get-Credential cmdlet. For example, this code returns a credentials object for the user litwareinc\kenmyer and stores that object in a variable named $x:
$x = Get-Credential "litwareinc\kenmyer"
You need to supply the user password when running this command.
The sender credential is not required if you are running the test under the health monitoring configuration settings for the pool.
TargetFqdn / Required / String / Fully qualified domain name (FQDN) of the pool to be tested.

3.9Test-CsIM

Test-CsIm -TargetFqdn atl-cs-001.litwareinc.com

Parameter / Required / Type / Description
ReceiverCredential / Required / PSCredential / User credential object for the first of the two user accounts to be tested. The value passed to ReceiverCredential should be an object reference obtained by using the Get-Credential cmdlet. For example, this code returns a credentials object for the user litwareinc\pilar and stores that object in a variable named $y:
$y = Get-Credential "litwareinc\pilar"
You need to supply the user password when running this command.
The receiver credential is not required if you are running the test under the health monitoring configuration settings for the pool.
SenderCredential / Required / PSCredential / User credential object for the second of the two user accounts to be tested. The value passed to SenderCredential should be an object reference obtained by using the Get-Credential cmdlet. For example, this code returns a credentials object for the user litwareinc\kenmyer and stores that object in a variable named $x:
$x = Get-Credential "litwareinc\kenmyer"
You need to supply the user password when running this command.

3.10Test-CsP2PAV -TargetFqdn atl-cs-001.litwareinc.com

Parameter / Required / Type / Description
ReceiverCredential / Required / PSCredential / User credential object for the first of the two user accounts to be tested. The value passed to ReceiverCredential should be an object reference obtained by using the Get-Credential cmdlet. For example, this code returns a credentials object for the user litwareinc\pilar and stores that object in a variable named $y:
$y = Get-Credential "litwareinc\pilar"
You need to supply the user password when running this command.
The receiver credential is not required if you are running the test under the health monitoring configuration settings for the pool.
SenderCredential / Required / PSCredential / User credential object for the second of the two user accounts to be tested. The value passed to SenderCredential should be an object reference obtained by using the Get-Credential cmdlet. For example, this code returns a credentials object for the user litwareinc\kenmyer and stores that object in a variable named $x:
$x = Get-Credential "litwareinc\kenmyer"
You need to supply the user password when running this command.
The sender credential is not required if you are running the test under the health monitoring configuration settings for the pool.
TargetFqdn / Required / String / Fully qualified domain name (FQDN) of the pool to be tested.

3.11Test-CsPresence -TargetFqdn atl-cs-001.litwareinc.com