Lync Server 2013 cmdlets by category

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.

 

In This section:-

 

  1. User management cmdlets in Lync Server 2013
    1. Get-CsAdUser

    2. Disable-CsUser

    3. Enable-CsUser

    4. Get-CsUser

    5. Move-CsUser

    6. Set-CsUser

      ** **

  1. Client management cmdlets in Lync Server 2013
    1. Get-CsClientPolicy

    2. Get-CsClientVersionConfiguration

    3. Get-CsClientVersionPolicy

    4. Get-CsClientVersionPolicyRule

    5. New-CsClientPolicy

    6. New-CsClientVersionConfiguration

      ** **

  1. IM and Presence Cmdlets
    1. Get-CsFileTransferFilterConfiguration

    2. Get-CsPresencePolicy

    3. Get-CsPrivacyConfiguration

    4. Grant-CsPresencePolicy

    5. Set-CsPresencePolicy

    6. Test-CsGroupExpansion

    7. Test-CsGroupIM

    8. Test-CsGroupIm

    9. Test-CsIM

    10. Test-CsP2PAV

    11. Test-CsPresence

      ** **

  1. Conferencing Cmdlets
  1. Dial-In Conferencing Cmdlets
    1. Get-CsConferenceDirectory

    2. Get-CsDialInConferencingAccessNumber

    3. Get-CsDialInConferencingConfiguration

    4. New-CsConferenceDirectory

    5. New-CsDialInConferencingAccessNumber

    6. New-CSDialInConferencingConfiguration

    7. Set-CsDialInConferencingConfiguration

    8. Get-CsDialInConferencingConfiguration

    9. Set-CsDialInConferencingAccessNumber

    10. Test-CsDialInConferencing

      ** **

  1. Web Conferencing Cmdlets
    1. Disable-CsMeetingRoom

    2. Enable-CsMeetingRoom

    3. Get-CsConferencingPolicy

    4. Get-CsMeetingRoom

    5. Test-CsAVConference

      ** **

  1. Infrastructure and Deployment Cmdlets
    1. Get-CsManagementStoreReplicationStatus

    2. Get-CsManagementStoreReplicationStatus

    3. Get-CsUserReplicatorConfiguration

    4. Test-CsReplica

    5. Get-CsPool

    6. Get-CsSite

    7. Get-CsServerVersion

    8. Get-CsTopology

    9. Import-CsConfiguration

    10. Publish-CsTopology

    11. Test-CsTopology

       

       

  1. Backup and High Availability Cmdlets
    1. Get-CsBackupServiceConfiguration

    2. Get-CsBackupServiceStatus

    3. Get-CsPoolFabricState

    4. Backup-CsPool

       

       

  1. Server Roles and Services Cmdlets
  1. Address Book Server Cmdlets

    ** **

    1. Get-CsAddressBookConfiguration

    2. New-CsAddressBookConfiguration

    3. Set-CsAddressBookConfiguration

    4. Test-CsAddressBookService

       

      ** **

  1. Database and Management Server Cmdlets
    1. Get-CsConfigurationStoreLocation

    2. Get-CsDatabaseMirrorState

    3. Get-CsUserDatabaseState

    4. Install-CsDatabase

    5. Invoke-CsDatabaseFailover

    6. Invoke-CsManagementServerFailover

    7. Move-CsManagementServer

    8. Test-CsDatabase

    9. Update-CsUserDatabase

       

  1. Registrar and Director Cmdlets

    ** **

    1. Get-CsRegistrarConfiguration

    2. Reset-CsPoolRegistrarState

    3. Set-CsRegistrar

    4. Test-CsRegistration

    5. Get-CsService

    6. Get-CsWindowsService

    7. Start-CsWindowsService

    8. Stop-CsWindowsService

       

  1. Troubleshooting Server Roles and Services Cmdlets

    ** **

    1. Get-CsAudioTestServiceApplication

    2. Get-CsDiagnosticConfiguration

    3. Get-CsHealthMonitoringConfiguration

    4. Set-CsAudioTestServiceApplication

    5. Set-CsHealthMonitoringConfiguration

       

  1. Enterprise Voice Cmdlets
  1. Troubleshooting Enterprise Voice Cmdlets
    1.       Get-CsVoiceConfiguration

    2.       Get-CsVoiceTestConfiguration

    3. New-CsVoiceTestConfiguration

    4. Remove-CsVoiceConfiguration

    5. Get-CsDialPlan

    6. Get-CsVoiceNormalizationRule

    7. Get-CsVoicePolicy

    8. Get-CsVoiceRoute

    9. Test-CsVoiceUser

       

       

  1. Voice Normalization Rules Cmdlets

     

    1. Get-CsVoiceNormalizationRule

    2. Set-CsVoiceNormalizationRule

    3. Get-CsVoiceNormalizationRule

       

  1. Voice Policy Cmdlets

    ** **

    1. Get-CsDialPlan

    2. Get-CsPstnUsage

    3. Get-CsVoicePolicy

    4. Set-CsDialPlan

    5. Set-CsPstnUsage

    6. Set-CsVoicePolicy

    7. Get-CsDialPlan

       

  1. Voice Routing Cmdlets
    1. Get-CsPstnUsage

    2. Get-CsRoutingConfiguration

    3. Get-CsVoiceRoute

    4. Set-CsPstnUsage

    5. Set-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. 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. Disable-CsUser -Identity "APAC\USE5KOR"

       

       

       

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. 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.            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. 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. 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.

 

 

** **

  1. 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.

     

     

  1. Get-CsClientPolicy

    ** **

  2. Get-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.

** **

** **

  1. Get-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.

** **

** **

  1. Get-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.

** **

** **

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

    ** **

    ** **

  2. New-CsClientVersionConfiguration -Identity site:Redmond -Enabled $False

    ** **

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

    $x.DefaultAction = "Block"

    Set-CsClientVersionConfiguration -Instance $x

  1. 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.

** **

** **

    1. Get-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.

** **

** **

    1. Get-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.

** **

    1. Get-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

** **

** **

    1. Grant-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".

** **

** **

    1. Set-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.

** **

** **

    1. Test-CsGroupExpansion -TargetFqdn atl-cs-001.litwareinc.com -GroupEmailAddress FinanceGroup@litwareinc.com

      ** **

Parameter

Required

Type

Description

GroupEmailAddress

Required

System.String

Email address of the targeted distribution group. For example: -GroupEmailAddress "FinanceGroup@litwareinc.com".

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 "https://atl-cs-001.litwareinc.com/groupexpansion".

Note that you cannot use both the TargetUri parameter and the TargetFqdn parameter in the same command.

** **

** **

    1. Test-CsGroupIM

    2. Test-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.

** **

** **

    1. Test-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.

** **

** **

** **

    1. Test-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.

** **

** **

** **

** **

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

      ** **

Parameter

Required

Type

Description

PublisherCredential

Required

PSCredential

User credential object for the first of the two user accounts to be tested. The value passed to PublisherCredential 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"

** **

** **

  1. Conferencing Cmdlets

    ** **

Microsoft Lync Server 2013 enables users to join conferences in two different ways: by using a conferencing application such as Lync 2013, or by dialing in using a telephone. Dial-in users are not be able to do such things as view slides or exchange instant messages, but they are able to fully participate in the audio portion of a conference.

** **

** **

  1. Dial-In Conferencing Cmdlets

            Dial-in conferencing provides a way for users to use a "regular" telephone (that is, a device on the public switched telephone network) to join the audio portion of a conference.

 

    1. **      Get-CsConferenceDirectory -Identity 2**

** **

Parameter

Required

Description

Filter

Optional

Enables you to use wildcards to specify the Identity of the conference directory (or directories) to be retrieved. Because directory Identities are numeric, this parameter might be of minimal value. However, this syntax will return all the conference directories that have an Identity that begins with the number 3: -Filter "3*".

Identity

Optional

Numeric identifier (for example, 7) of the conference directory to be returned. If this parameter is omitted, then the Get-CsConferenceDirectory cmdlet returns information about all the conference directories in use in your organization.

** **

 

    1. Get-CsDialInConferencingAccessNumber -Identity sip:RedmondDialIn@litwareinc.com

      ** **

      ** **

Parameter

Required

Description

EmptyRegion

Required

Returns information about the dial plans that are associated with a region that is not associated with at least one dial-in conferencing access number. For example, suppose the Bellevue dial plan is associated with the Bellevue region, but no access numbers have been configured for the Bellevue region. The Bellevue region would thus be considered an empty region.

This parameter cannot be used in conjunction with any other parameter.

Credential

Optional

Enables you to run the Get-CsDialInConferencingAccessNumber 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 contact objects.

To use the Credential parameter you must first create a PSCredential object by using the Get-Credential cmdlet. For details, see the Get-Credential cmdlet help topic.

DomainController

Optional

Enables you to connect to the specified domain controller in order to retrieve contact information. To connect to a particular domain controller, include the DomainController parameter followed by the computer name (for example, atl-mcs-001) or its fully qualified domain name (for example, atl-mcs-001.litwareinc.com).

** **

    1. Get-CsDialInConferencingConfiguration -Identity site:Redmond

      ** **

      ** **

Parameter

Required

Description

Filter

Optional

Provides a way for you to use wildcard characters when specifying dial-in conferencing configuration settings. For example, to return a collection of all the configuration settings that have been applied at the site scope use this syntax: -Filter "site:*". To return all the settings that have the term "EMEA" in their Identity use this syntax: -Filter "*EMEA*". Note that the Filter parameter acts only on the Identity of the settings; you cannot filter on other dial-in conferencing configuration properties.

Identity

Optional

Indicates the Identity of the dial-in conferencing configuration settings to be retrieved. To refer to the global settings, use this syntax: -Identity global. To refer to site settings, use syntax similar to this: -Identity site:Redmond. You cannot use wildcards when specifying an Identity. To do that, use the Filter parameter instead.

** **

    1. New-CsConferenceDirectory -Identity 42 -HomePool "atl-cs-001.litwareinc.com"

      ** **

      ** **

Parameter

Required

Description

HomePool

Required

Fully qualified domain name (FQDN) of the Registrar pool where the new conference directory will be hosted. For example: -Identity atl-cs-001.litwareinc.com.

Identity

Required

Unique numeric identifier for the new conference directory. Identities can be any integer value between 0 and 9999 inclusive; however, Identities must be unique. (For example, you cannot have two directories with the Identity 575.) You do not need to follow a numeric order when creating new directories. For example, you can create a directory with the Identity 999 followed by a directory with the Identity 2 followed by a directory with the Identity 438, and so on.

Confirm

Optional

Prompts you for confirmation before executing the command.

Force

Optional

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

WhatIf

Optional

Describes what would happen if you executed the command without actually executing the command.

** **

** **

    1. New-CsDialInConferencingAccessNumber -PrimaryUri "sip:RedmondDialIn@litwareinc.com" -DisplayNumber "1-800-555-1234" -LineUri "tel:+18005551234" -Pool atl-cs-001.litwareinc.com -PrimaryLanguage "en-US" -Regions "Redmond"

      ** **

Parameter

Required

Description

DisplayNumber

Required

Phone number as displayed in meeting invitations and on the dial-in conferencing webpage. The DisplayNumber can be formatted any way you prefer; for example 1-800-555-1234 ; 1-(800)-555-1234 ; or 1.800.555.1234 .

HostingProviderProxyFqdn

Required

Fully qualified domain name of the hosting provider that hosts your dial-in conferencing service.

LineURI

Required

The actual dial-in conferencing phone number. The LineURI must be specified using the following syntax: the tel: prefix followed by a plus sign (+) followed by the country/region calling code, area code, and phone number. For example: tel:+18005551234. Note that spaces, hyphens, parentheses and other characters are not allowed.

LineURIs must be unique throughout Active Directory.

Pool

Required

Home pool for the new contact object.

PrimaryLanguage

Required

Primary language used for making dial-in conferencing announcements. The language must be configured using one of the available dial-in conferencing language codes; for example, en-US for U.S. English; fr-FR for French; etc. To return a list of the available language codes, type the following command at the Windows PowerShell prompt:

** **

    1. New-CSDialInConferencingConfiguration -Identity site:Redmond -EnableNameRecording $False

      ** **

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

      $x.EnableNameRecording = $False

      Set-CSDialInConferencingConfiguration -Instance $x

      ** **

Parameter

Required

Type

Description

Identity

Required

XdsIdentity

Indicates the Identity of the dial-in conferencing configuration settings to be created. Because these settings can only be created at the site scope, use syntax similar to this, with the prefix "site:" followed by the name of the site: -Identity site:Redmond.

Note that there can only be one set of dial-in conferencing configuration settings per site. The sample command will fail if a collection of settings with the Identity site:Redmond already exists.

Confirm

Optional

SwitchParameter

Prompts you for confirmation before executing the command.

EnableNameRecording

Optional

Boolean

Determines whether or not users are asked to record their name before entering the conference. Set to True ($True) to require name recording; set to False ($False) to bypass name recording. The default value is True.

** **

** **

    1. Set-CsDialInConferencingConfiguration -Identity site:Redmond -EntryExitAnnouncementsType "ToneOnly"

      ** **

    2. Get-CsDialInConferencingConfiguration | Set-CsDialInConferencingConfiguration -EnableNameRecording $True

      ** **

      ** **

Parameter

Required

Description

Confirm

Optional

Prompts you for confirmation before executing the command.

EnableNameRecording

Optional

Determines whether or not users are asked to record their name before entering the conference. Set to True to enable name recording; set to False to bypass name recording. The default value is True.

EntryExitAnnouncementsEnabledByDefault

Optional

If set to True announcements will be played each time a participant enters or exits a conference. If set to False (the default value), entry and exit announcements will not be played.

** **

    1. Set-CsDialInConferencingAccessNumber -Identity "sip:RedmondDialIn@litwareinc.com" -DisplayName "Redmond Dial-In Access Number"

      ** **

      ** **

Parameter

Required

Description

Identity

Required

SIP address of the contact object that represents the dial-in conferencing number. When specifying the Identity you must include the "sip:" prefix; for example: -Identity " sip:RedmondDialIn@litwareinc.com".

Instance

Required

Allows you to pass a reference to an object to the cmdlet rather than set individual parameter values.

Priority

Required

Enables you to change the order in which dial-in conferencing numbers are presented to users in meeting invitations or when they access the Dial-In Conferencing Settings webpage. Lower numbers are given a higher priority; to have a number appear at the beginning of the list set the priority to 0. Note that if you change the priority of a given number you must also use the ReorderedRegion parameter to indicate the region where the modified priority should take effect.

** **

    1. Test-CsDialInConferencing -TargetFqdn atl-cs-001.litwareinc.com

      ** **

Parameter

Required

Description

TargetFqdn

Required

Fully qualified domain name (FQDN) of the pool to be tested.

UserCredential

Required

User credential object for the user account to be tested. The value passed to UserCredential 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. This parameter is not required if you are conducting the test using the health monitoring configuration settings.

Authentication

Optional

Type of authentication used in the test. Allowed values are:

* TrustedServer

* Negotiate

* ClientCertificate

* LiveID

Force

Optional

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

** **

** **

** **

B)          Web Conferencing Cmdlets

** **

Conferencing and online meetings are important elements in Microsoft Lync Server 2013. The CsConferencingConfiguration and CsConferencingPolicy cmdlets are the primary administrative tools for managing conferences by using Windows PowerShell.

** **

    1. Disable-CsMeetingRoom -Identity sip:RedmondMeetingRoom@litwareinc.com

      ** **

Parameter

Required

Description

Identity

Required

Indicates the Identity of the user account to be configured as a meeting room. Identities are typically 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.

You can use the asterisk (*) wildcard character when using the Display Name as the user Identity. For example, the Identity "* Smith" returns all the user who have a display name that ends with the string value " Smith".

Confirm

Optional

Prompts you for confirmation before executing the command.

DomainController

Optional

Enables you to connect to the specified domain controller in order to disable a meeting room. To connect to a particular domain controller, include the DomainController parameter followed by the computer name (for example, atl-dc-001) or its fully qualified domain name (FQDN) (for example, atl-dc-001.litwareinc.com).

PassThru

Optional

Enables you to pass a meeting room object through the pipeline that represents the meeting room being disabled. By default, the Disable-CsMeetingRoom cmdlet does not pass objects through the pipeline.

** **

** **

** **

** **

** **

    1. Enable-CsMeetingRoom -Identity "Redmond Meeting room" -RegistrarPool "atl-cs-001.litwareinc.com" -SipAddress sip:RedmondMeetingRoom@litwareinc.com

      ** **

Parameter

Required

Description

Identity

Required

Indicates the Identity of the user account to be configured as a meeting room. Identities are typically 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\room14); and, 4) the user's Active Directory display name (for example, Room 14).

You can also reference a user account by using the user’s Active Directory distinguished name.

You can use the asterisk (*) wildcard character when using the Display Name as the user Identity. For example, the Identity "* Smith" returns all the user who have a display name that ends with the string value " Smith".

Confirm

Optional

Prompts you for confirmation before executing the command.

DomainController

Optional

Enables you to connect to the specified domain controller in order to enable a meeting room. To connect to a particular domain controller, include the DomainController parameter followed by the computer name (for example, atl-dc-001) or its fully qualified domain name (FQDN) (for example, atl-dc-001.litwareinc.com).

HostingProviderProxyFqdn

Optional

Fully qualified domain name of the hosting provider proxy server. This parameter is used only with Microsoft Lync Online.

** **

** **

    1. Get-CsConferencingPolicy -Identity Global

      ** **

Parameter

Required

Description

Filter

Optional

Enables you to use wildcard characters when specifying the conferencing policy (or policies) to be returned. For example, this syntax returns all the policies configured at the site scope: -Filter "site:*". To return a collection of all the policies configured at the per-user scope, use this syntax: -Filter "tag:*".

Identity

Optional

Unique identifier for the conferencing policy to be retrieved. Conferencing policies can be configured at the global, site, or per-user scopes. To retrieve the global policy, use this syntax: -Identity global. To retrieve a site policy, use syntax similar to this: -Identity site:Redmond. To retrieve a per-user policy use syntax similar to this: -Identity SalesConferencingPolicy.

If this parameter is not included, the Get-CsConferencingPolicy cmdlet will return a collection of all the conferencing policies configured for use in your organization.

** **

** **

    1. Get-CsMeetingRoom -Identity sip:RedmondMeetingRoom@litwareinc.com

       

Parameter

Required

Description

Credential

Optional

Enables you to run the Get-CsMeetingRoom 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 contact objects.

To use the Credential parameter, you must first create a PSCredential object by using the Get-Credential cmdlet. For details, see the Get-Credential cmdlet help topic.

DomainController

Optional

Enables you to connect to the specified domain controller in order to retrieve meeting room information. To connect to a particular domain controller, include the DomainController parameter followed by the computer name (for example, atl-dc-001) or its fully qualified domain name (FQDN) (for example, atl-dc-001.litwareinc.com).

Filter

Optional

Enables you to limit the returned data by filtering on Lync Server-specific attributes. For example, you can limit returned data to meeting rooms that have been assigned a specific voice policy, or rooms that have not been assigned a specific voice policy.

The Filter parameter uses much the same Windows PowerShell filtering syntax that is used by the Where-Object cmdlet. For example, a filter that returns only rooms that have been assigned the voice policy RedmondVoicePolicy would look like this:

{VoicePolicy -eq "RedmondVoicePolicy"}

** **

    1. Test-CsAVConference -TargetFqdn atl-cs-001.litwareinc.com

      ** **

      $cred1 = Get-Credential "litwareinc\pilar"

      $cred2 = Get-Credential "litwareinc\kenmyer"

      ** **

      Test-CsAVConference -TargetFqdn atl-cs-001.litwareinc.com -SenderSipAddress "sip:pilar@litwareinc.com" -SenderCredential $cred1 -ReceiverSipAddress "sip:kenmyer@litwareinc.com" -ReceiverCredential $cred2

      ** **

      ** **

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.

Authentication

Optional

SipSyntheticTransaction AuthenticationMechanism

Type of authentication used in the test. Allowed values are:

* TrustedServer

* Negotiate

* ClientCertificate

* LiveID

Force

Optional

SwitchParameter

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

OutLoggerVariable

Optional

String

When present, detailed output from running the cmdlet will be stored in the specified variable. This variable includes a pair of methods – ToHTML and ToXML – that can then be used to save that output to either an HTML or an XML file.

To store output in a logger variable named $TestOutput use the following syntax:

-OutLoggerVariable TestOutput

Note: Do not use prepend a $ character when specifying the variable name.To save the information stored in the logger variable to an HTML file, use a command similar to this:

$TestOutput.ToHTML() > C:\Logs\TestOutput.html

To save the information stored in the logger variable to an XML file, use a command similar to this:

$TestOutput.ToXML() > C:\Logs\TestOutput.xml

OutVerboseVariable

Optional

String

When present, detailed output from running the cmdlet will be stored in the specified variable. For example, to store output in a variable named $TestOutput use the following syntax:

-OutVerboseVariable TestOutput

Do not prepend a $ character when specifying the variable name.

ReceiverSipAddress

Optional

String

SIP address for the first of the two user accounts to be tested. For example: -ReceiverSipAddress "sip:pilar@litwareinc.com". The ReceiverSipAddress parameter must reference the same user account as ReceiverCredential.

The SIP address is not required if you are running the test under the health monitoring configuration settings for the pool.

RegistrarPort

Optional

Int32

SIP port used by the Registrar service. This parameter is not required if the Registrar uses the default port 5061.

SenderSipAddress

Optional

String

SIP address for the second of the two user accounts to be tested. For example: -SenderSipAddress "sip:kenmyer@litwareinc.com". The SenderSipAddress parameter must reference the same user account as SenderCredential.

The SIP address is not required if you are running the test under the health monitoring configuration settings for the pool.

TestJoinLauncher

Optional

SwitchParameter

When present, tests the ability of the Join Launcher to participate in an AV conference. The Join Launcher is used to help users of mobile devices (and, as a result, users of the Mobility Service) take part in conferences.

** **

** **

** **

  1. Infrastructure and Deployment Cmdlets

    ** **

The infrastructure and deployment cmdlets included in Microsoft Lync Server 2013 can be useful in the initial setup and deployment of the product; after Lync Server has been deployed these cmdlets can then be used to do such things as verify that components are working as expected; manage replication settings; and backup and restore the Lync Server topology, policies, and configuration settings.

 

Replication Cmdlets

 

    1. Get-CsManagementStoreReplicationStatus -ReplicaFqdn atl-cs-001.litwareinc.com

      ** **

    2. Get-CsManagementStoreReplicationStatus –CentralManagementStoreStatus

      ** **

      ** **

Parameter

Required

Description

CentralManagementStoreStatus

Optional

Returns additional information about the current status of the Central Management store, including a list of active replicas and deleted replicas, as well as the location of the Active Master and the File Transfer Agent services.

ReplicaFqdn

Optional

Fully qualified domain name (FQDN) of the computer for which the replication status is to be checked. For example: -ReplicaFqdn "atl-cs-001.litwareinc.com".

If this parameter is not included, then replication status information for all your Lync Server computers will be returned.

** **

** **

** **

    1. Get-CsUserReplicatorConfiguration

      ** **

Parameter

Required

Description

Filter

Optional

Enables you to use wildcards when specifying the collection (or collections) of User Replicator configuration settings to be returned. For example, this command returns all the settings configured at the service scope: -Filter "service:*".

Identity

Optional

Unique identifier of the User Replicator configuration settings to be returned. To return settings at the service scope, use syntax similar to this: -Identity "service:Registrar:atl-cs-001.litwareinc.com". (Note that service scope settings are available only if you are running Lync Online). To return the global settings, use this syntax: -Identity global. If this parameter is not specified then all the User Replicator configurations settings currently in use in your organization will be returned.

** **

** **

    1. Test-CsReplica -Verbose -Report C:\Logs\ReplicaTest.html

      ** **

      ** **

Parameter

Required

Description

GlobalCatalog

Optional

Fully qualified domain name of a global catalog server in your domain. This parameter is not required if you are running the Test-CsReplica cmdlet on a computer with an account in your domain.

GlobalSettingsDomainController

Optional

Fully qualified domain name of a domain controller in your domain. This parameter is not required if you are running the Test-CsReplica cmdlet on a computer with an account in your domain.

Report

Optional

Enables you to specify a file path for the log file created when the cmdlet runs. For example:

-Report "C:\Logs\ReplicaTest.html"

** **

** **

Topology Cmdlets

** **

    1. Get-CsPool -Identity atl-cs-001.litwareinc.com

      ** **

Parameter

Required

Description

Filter

Optional

Enables you to use wildcards when specifying the Identity of the pool (or pools) to be returned. For example, this syntax returns all the pools that have an Identity that ends with the string value ".fabrikam.com": -Filter "*.fabrikam.com".

Note that you cannot use both the Filter and the Identity parameters in the same command.

Identity

Optional

Fully qualified domain name (FQDN) of the pool to be returned. For example: -Identity atl-cs-001.litwareinc.com.

If this parameter is not present, then all the pools in your organization will be returned.

** **

** **

    1. Get-CsSite -Identity "Redmond"

      ** **

Parameter

Required

Description

Filter

Optional

Enables you to use wildcards when specifying the Identity of the site (or sites) to be returned. For example, this syntax returns all the pools that have an Identity that include the string value "Dublin": -Filter "*Dublin*".

Note that you cannot use both Filter and Identity in the same command.

Identity

Optional

Name of the site to be returned. Note that you should specify just the site name; for example: -Identity "Redmond". Do not use the format "site:Redmond" when specifying the Identity.

** **

** **

    1. Get-CsServerVersion

      ** **

    2. Get-CsTopology -AsXML | Out-File C:\Logs\Topology.xml

      ** **

    3. Import-CsConfiguration -FileName "C:\Config.zip"

Parameter

Required

Type

Description

ByteInput

Required

System.Byte[]

Reads topology information from a byte array stored in a variable. This byte array is created by using the ByteInput parameter when calling the Export-CsConfiguration cmdlet.

You cannot use both the ByteInput parameter and the FileName parameter in the same command.

FileName

Required

System.String

Path to the .ZIP file created by Export-CsConfiguration. For example: -FileName "C:\Config.zip". Note that you must include either the FileName or the ByteInput parameter, but not both, when calling the Import-CsConfiguration cmdlet.

** **

** **

    1. (Get-CsTopology -AsXml).ToString() > C:\Topologies\Topology.xml

      Publish-CsTopology -FileName "C:\Topologies\Topology.xml"

      ** **

Parameter

Required

Description

Document

Required

Enables you to publish an XML element rather than an XML file. This XML element must be configured as a System.XML.Linq.XElement object.

FileName

Required

Full path to the XML file containing the new topology information.

FinalizeUninstall

Required

Used only when uninstall Lync Server.After the Central Management Server has been removed, use Publish-CsTopology and the FinalizeUninstall parameter to publish an empty topology. Among other things, this removes all the Active Directory entries for the Central Management Server.

** **

** **

    1. Test-CsTopology -Report "C:\Logs\Topology.xml"

      ** **

      ** **

      ** **

  1. Backup and High Availability Cmdlets

The backup and high availability cmdlets enable administrators to manage the pool backup, restore, and high availability capabilities introduced in Microsoft Lync Server 2013.

** **

    1. Get-CsBackupServiceConfiguration

Parameter

Required

Description

Filter

Optional

Enables you to use wildcard values when referencing a collection of backup service configuration settings. Because you can only have a single, global instance of these settings there is no reason to use the Filter parameter. However, if you prefer you can use the following syntax to reference the global settings:

-Filter "g*"

The preceding syntax returns all the conference backup service configuration settings that have an Identity that begins with the letter "g".

Identity

Optional

Unique Identity of the backup service configuration settings. Because you can only have a single, global instance of these settings, you do not need to specify an Identity when calling the Get-CsBackupServiceConfiguration cmdlet. You can, however, use the following syntax to reference the global settings:

-Identity global

** **

** **

    1. Get-CsBackupServiceStatus -PoolFqdn "atl-cs-001.litwareinc.com"

Parameter

Required

Description

PoolFqdn

Required

Fully qualified domain name of the pool whose backup service status is being checked. For example:

-PoolFqdn "atl-cs-001.litwareinc.com"

Category

Optional

Type of backup whose status is being checked. Allowed values are:

* CMS

* UserData

If this parameter is not specified then both backup types will be checked.

Force

Optional

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

** **

    1. Get-CsPoolFabricState -PoolFqdn "atl-cs-001.litwareinc.com"

      ** **

Parameter

Required

Description

PoolFqdn

Required

Fully qualified domain name of the pool being checked. You must supply the FQDN of a pool when calling this cmdlet; for example:

-PoolFqdn "atl-cs-001.litwareinc.com”

RoutingGroup

Required

PARAMVALUE: Guid

Tenant

Required

PARAMVALUE: Guid

UserUri

Required

PARAMVALUE: UserIdParameter

Confirm

Optional

Prompts you for confirmation before executing the command.

Force

Optional

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

Type

Optional

Specifies the service type to be returned. Allowed values are:

* All (returns information for all services)

* MCUFactory (returns information for the MCU factory service)

* ConferenceDirectory (returns information for the Conference Directory service)

LYSS (returns information for the Lync Server Storage service)

You can only specify a single type per command.

** **

** **

** **

** **

** **

** **

** **

    1. Backup-CsPool -PoolFqdn "atl-cs-001.litwareinc.com" –SteadyState

      ** **

Parameter

Required

Description

PoolFqdn

Required

Fully qualified domain name of the pool being backed up. For example:

-SourcePoolFqdn "atl-cs-001.litwareinc.com"

Category

Optional

Enables you to select the Lync Server modules that will be backed up; if this parameter is not present then all the modules will be backed up. Allowed values are:

* CMS

* UserData

Confirm

Optional

Prompts you for confirmation before executing the command.

FailedOverPoolOnly

Optional

When specified, backup will take place only if the pool is in a failed over state. If you use this parameter then you must also use the FullBackup parameter.

Force

Optional

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

** **

** **

** **

  1. Server Roles and Services Cmdlets

    Many Microsoft Lync Server 2013 components run as server roles or as services. Lync Server 2013 ships with a number of cmdlets that enable you to manage these server roles and services.

     

  1. Address Book Server Cmdlets

    ** **

    1. Get-CsAddressBookConfiguration -Identity site:Redmond

      ** **

Parameter

Required

Description

Filter

Optional

Enables you to use wildcard characters in order to return a collection (or multiple collections) of Address Book settings. For example, 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, use this syntax: -Filter *EMEA*.

Identity

Optional

Unique identifier for the collection of Address Book settings to be returned. 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.

Note that you cannot use wildcards when specifying an Identity. If you need to use wildcards, then include the Filter parameter instead.

If this parameter is not specified, then the Get-CsAddressBookConfiguration cmdlet returns a collection of all the Address Book settings in use in the organization.

** **

** **

    1. New-CsAddressBookConfiguration -Identity site:Redmond -KeepDuration 15 -SynchronizePollingInterval 00:10:00

      ** **

Parameter

Required

Description

Identity

Required

Unique identifier to be assigned to the new collection of Address Book settings. Because you can only create new collections at the site scope, the Identity will always be the prefix "site:" followed by the site name; for example "site:Redmond".

Confirm

Optional

Prompts you for confirmation before executing the command.

EnableFileGeneration

Optional

When set to True (the default value) the Address Book server generates Address Book index files that can be downloaded by clients. When set to False, these index files are not generated. That means that client applications will have to use the Address Book Web Query service when searching for contacts.

** **

    1. Set-CsAddressBookConfiguration -identity site:Redmond -RunTimeOfDay 23:00

      ** **

Parameter

Required

Description

Confirm

Optional

Prompts you for confirmation before executing the command.

EnableFileGeneration

Optional

When set to True (the default value) the Address Book server generates Address Book index files that can be downloaded by clients. When set to False, these index files are not generated. That means that client applications will have to use the Address Book Web Query service when searching for contacts.

EnableSearchByDialPad

Optional

When set to True, enables mobile users to use their telephone keypads to search for contacts.

Force

Optional

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

Identity

Optional

Unique identifier assigned to the collection of Address Book settings. 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 wildcard characters when specifying an Identity.

If this parameter is omitted, then the Set-CsAddressBookConfiguration cmdlet will modify the global settings.

** **

    1. Test-CsAddressBookService -TargetFqdn atl-cs-001.litwareinc.com

      ** **

Parameter

Required

Type

Description

TargetFqdn

Required

String

Fully qualified domain name (FQDN) of the Registrar pool where the Address Book Download Web service is to be tested. For example: -TargetFqdn "atl-cs-001.litwareinc.com".

You cannot use both the TargetUri parameter and the TargetFqdn parameter in the same command.

TargetUri

Required

String

Uniform Resource Identifier (URI) of the Address Book Web Query service. For example: -TargetUri "https://atl-cs-001.litwareinc.com/abs/handler".

You cannot use both the TargetUri parameter and the TargetFqdn parameter in the same command.

** **

** **

** **

** **

Database and Management Server Cmdlets

** **

The database and Management Server cmdlets are used to manage both your Microsoft Lync Server 2013 back-end databases and your front-end management services. You can use these cmdlets to install or uninstall any of the databases used by Lync Server 2013, in addition to configuring the Active Directory service control point for the Central Management store.

** **

    1. Get-CsConfigurationStoreLocation -Report "C:\Logs\ConfigurationStore.html"

      ** **

Parameter

Required

Description

GlobalSettingsDomainController

Optional

Fully qualified domain name (FQDN) of a domain controller where global settings are stored. If global settings are stored in the Active Directory System container, then this parameter must point to the root domain controller. If global settings are stored in the Configuration container, then any domain controller can be used and this parameter can be omitted.

Report

Optional

Enables you to specify a file path for the log file created when the cmdlet runs. For example: -Report "C:\Logs\ConfigurationStore.html"

** **

    1. Get-CsDatabaseMirrorState -PoolFqdn "atl-cs-001.litwareinc.com" -DatabaseType Monitoring

      ** **

Parameter

Required

Description

PoolFqdn

Required

Fully qualified domain name of the pool whose database mirroring state is being checked. For example:

-PoolFqdn "atl-cs-001.litwareinc.com"

DatabaseType

Optional

Type of database whose mirror state is being checked. Allowed values are:

ActiveMonitoring

Application

Archiving

CentralMgmt

Edge

Lyss

Monitoring

PersistentChat

PersistentChatCompliance

Provision

Registrar

SigninTelemetry

User

LocalStore

Optional

Retrieves the backup mirror state from the local replica of the Central Management store rather than from the Central Management store itself.

Report

Optional

Enables you to specify a file path for the log file created when the cmdlet runs. For example:

-Report "C:\Logs\DatabaseMirrorState.html"

** **

** **

** **

    1. Get-CsUserDatabaseState -Identity "UserDatabase:atl-sql-001.litwareinc.com"

      ** **

Parameter

Required

Description

Identity

Optional

Unique identifier of the user database whose online status is to be returned. For example: -Identity "UserDatabase:atl-sql-001.litwareinc.com".

You cannot use both Identity and RegistrarPool in the same command, nor can you use wildcards with either parameter. If both parameters are omitted the Get-CsUserDatabaseState cmdlet returns information about all the user databases currently in use.

RegistrarPool

Optional

Fully qualified domain name of the Registrar pool hosting the user databases whose online status is to be returned. For example: -RegistrarPool "atl-cs-001.litwareinc.com".

You cannot use both Identity and RegistrarPool in the same command, nor can you use wildcards with either parameter. If both parameters are omitted the Get-CsUserDatabaseState cmdlet returns information about all of the user databases currently in use.

** **

** **

    1. Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn atl-sql-001.litwareinc.com -DatabasePaths "E:\CSLog","F:\CSLog","G:\CSDB"

      ** **

      ** **

    2. Invoke-CsDatabaseFailover -PoolFqdn atl-cs-001.litwareinc.com -DatabaseType "User" -NewPrincipal "Mirror"

      ** **

Parameter

Required

Description

DatabaseType

Required

Type of database being failed over. Valid values are:

* ActiveMonitoring

* Application

* Archiving

* CentralMgmt

* Cls

* Edge

* Lyss

* Monitoring

* PersistentChat

* PersistentChatCompliance

* Provision

* Registrar

* SigninTelemetry

* User

NewPrincipal

Required

Specifies whether failover will be to the primary database or to the mirror database. Valid values are:

* * Mirror

Primary

PoolFqdn

Required

Fully qualified domain name of the pool containing the database to be failed over.

Confirm

Optional

Prompts you for confirmation before executing the command.

ExcludeDatabaseList

Optional

List of databases that should not be failed over. For example:

-ExcludeDatabaseList "LcsCDR"

To prevent multiple databases from being failed over, separate the database names using commas:

-ExcludeDatabaseList "LcsCDR", "LcsLog"

** **

    1. Invoke-CsManagementServerFailover -BackupSqlServerFqdn "redmond-cs-001.litwareinc.com" - BackupSqlInstanceName "RTC" –Force

      ** **

Parameter

Required

Description

BackupSqlServerFqdn

Optional

Fully qualified domain name of the computer hosting the SQL Server backup database. This parameter is required if you are running the Invoke-CsManagementServerFailover cmdlet in disaster recovery mode.

Force

Optional

Suppresses the display of any non-fatal error message that might occur when running the command. This parameter is required if you are running the Invoke-CsManagementServerFailover cmdlet in disaster recovery mode.

BackupMirrorSqlInstanceName

Optional

SQL Server instance for the mirror database.

BackupMirrorSqlServerFqdn

Optional

Fully qualified domain name of the computer hosting the SQL Server mirror database.

BackupSqlInstanceName

Optional

SQL Server instance for the backup database.

Confirm

Optional

Prompts you for confirmation before executing the command.

** **

** **

    1. Move-CsManagementServer -ConfigurationFileName "C:\CsConfiguration.zip" -LisConfigurationFileName "C:\CsLisConfiguration.zip" –Force

      ** **

Parameter

Required

Description

ConfigurationFileName

Optional

Full path to the Lync Server configuration backup file created by running the Export-CsConfiguration cmdlet. This parameter should only be used in a disaster recovery scenario.

Confirm

Optional

Prompts you for confirmation before executing the command.

Force

Optional

Forces the Central Management Server move even if the existing store is offline; this parameter is required in a disaster recovery scenario. Note that there is the potential for some data loss any time you force the movement of the Central Management Server.

The Force parameter can also be used if your previous attempts at calling the Move-CsManagementServer cmdlet have failed.

** **

** **

    1. Test-CsDatabase -ConfiguredDatabases -SqlServerFqdn "atl-sql-001.litwareinc.com"

      ** **

Parameter

Required

Description

CentralManagementDatabase

Required

Tests the configuration of the Central Management database. This parameter cannot be used in conjunction with the ConfiguredDatabases parameter or the DatabaseType parameter.

ConfiguredDatabases

Required

Tests the configuration of all the Lync Server databases installed on the specified computer. You must include the SqlServerFqdn parameter when using the ConfiguredDatabases parameter. In addition, this parameter cannot be used in the same command as the CentralManagementDatabase or the DatabaseType parameters.

** **

    1. Update-CsUserDatabase -Fqdn atl-cs-001.litwareinc.com

      ** **

Parameter

Required

Description

Force

Optional

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

Fqdn

Optional

Fully qualified domain name (FQDN) of the computer hosting the user database. If this parameter is not specified then the Update-CsUserDatabase cmdlet will update the user database for the pool that the local computer belongs to.

** **

** **

** **

** **

  1. Registrar and Director Cmdlets

    ** **

    Registrars and Directors are used to authenticate logon requests and to maintain information about user status and availability. The Registrar and Director cmdlets enable you to manage configuration settings for these servers.

    ** **

    ** **

    1. Get-CsRegistrarConfiguration -Identity site:Redmond

      ** **

Parameter

Required

Description

Filter

Optional

Enables you to use wildcards in order to return one or more collections of Registrar configuration settings. For example, to return all the settings configured at the site scope, 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 Registrar configuration settings to be returned. 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 return settings at the service level, use syntax like this: -Identity service:Registrar:atl-cs-001.litwareinc.com.

If this parameter is omitted then the Get-CsRegistrarConfiguration cmdlet returns all of the Registrar configuration settings currently in use in your organization.

** **

** **

    1. Reset-CsPoolRegistrarState -PoolFqdn "atl-cs-001.litwareinc.com" -ResetType ServiceReset

      ** **

Parameter

Required

Description

PoolFqdn

Required

Fully qualified domain name of the Registrar pool being reset. For example:

-PoolFqdn "atl-cs-001.litwareinc.com"

Confirm

Optional

Prompts you for confirmation before executing the command.

Force

Optional

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

** **

** **

    1. Set-CsRegistrar -Identity "Registrar:atl-cs-001.litwareinc.com" -BackupRegistrar "Registrar:dublin-cs-001.litwareinc.com" -EnableAutomaticFailover $True

      ** **

Parameter

Required

Description

ArchivingDatabase

Optional

Service Identity of the database used by the Archiving service.

ArchivingServer

Optional

Service location of the Archiving Server to be associated with the Registrar. For example: -ArchivingServer "ArchivingServer:atl-cs-001.litwareinc.com".

BackupRegistrar

Optional

Service location of the Registrar to be used if this Registrar is not available. For example: -BackupRegistrar "Registrar:dublin-cs-001.litwareinc.com".

Confirm

Optional

Prompts you for confirmation before executing the command.

EdgeServer

Optional

Service location of the Edge Server to be associated with the Registrar. For example: -EdgeServer "EdgeServer:atl-edge-001.litwareinc.com".

** **

    1. Test-CsRegistration -TargetFqdn atl-cs-001.litwareinc.com

      ** **

Parameter

Required

Type

Description

TargetFqdn

Required

String

Fully qualified domain name (FQDN) of the pool to be tested.

UserCredential

Required

PSCredential

User credentials object for the account to be tested. The value passed to UserCredential must be an object reference obtained by using the Get-Credential cmdlet. For example, this code returns a credential 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. This parameter is not required if you are conducting the test under the health monitoring configuration settings for the pool.

** **

** **

    1. Get-CsService -PoolFqdn "atl-cs-001.litwareinc.com" | Select-Object Identity

      ** **

Parameter

Required

Description

ApplicationDatabase

Optional

Returns information about the Application databases used in your organization. Application databases are used by the Application service.

ApplicationServer

Optional

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

Returns information about the Archiving databases used in your organization. Archiving databases store transcripts of instant messaging sessions.

ArchivingServer

Optional

Returns information about the Archiving Servers used in your organization. Archiving Servers enable you to save the transcripts of instant messaging sessions.

BackupServer

Optional

Returns information about the backup servers used in your organization.

CentralManagement

Optional

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 services.

CentralManagementDatabase

Optional

Returns information about the Central Management store used in your organization. The Central Management store maintains configuration information for Lync Server.

ConferencingServer

Optional

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

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

Returns information about the Edge Servers used in your organization. Edge Servers provide connectivity between your internal network and the Internet.

FileStore

Optional

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.

Filter

Optional

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.

Identity

Optional

Unique identifier of the specific service or server role to be returned. For example: -Identity "Registrar:atl-cs-001.litwareinc.com".

ManagementServer

Optional

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.

MediaProcessor

Optional

Returns information about the media processor service used in your organization.

MediationServer

Optional

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).

MonitoringDatabase

Optional

Returns information about the monitoring databases used in your organization. Monitoring databases store Enterprise Voice phone usage and call quality information.

MonitoringServer

Optional

Returns information about the Monitoring Servers used in your organization. Monitoring Servers are used to track Enterprise Voice phone usage and call quality.

PersistentChatComplianceDatabase

Optional

Returns information about the databases used for maintaining Persistent Chat compliance information.

PersistentChatDatabase

Optional

Returns information about the databases used for maintaining Persistent Chat information.

PersistentChatServer

Optional

Returns information about the Persistent Chat servers used in your organization.

PoolFqdn

Optional

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.

PstnGateway

Optional

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

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

Returns information about the trusted application pools used in your organization. Trusted applications pools host computers that run trusted applications.

UserDatabase

Optional

Returns information about the User database used in your organization. User databases store data needed by the User Server service.

UserServer

Optional

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.

VideoInteropServer

Optional

Returns information about the Video Interoperability Server used in your organization. This server provides interoperability with third-party SIP-based video conferencing , and without the need for partner gateways.

WacServer

Optional

Returns information about the Office Web Apps servers used with Microsoft Lync Server. Office Web Apps server was previously known as "WacServer".

WebServer

Optional

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.

** **

    1. Get-CsWindowsService -Name "RTCSrv"

      ** **

    2. Start-CsWindowsService -Name "RTCRGS"

      Or

      Start-CsWindowsService -Name "RTCRGS" -ComputerName atl-cs-001.litwareinc.com

      ** **

Parameter

Required

Description

ComputerName

Optional

Name of the remote computer hosting the service to be started; if this parameter is not included, then the Start-CsWindowsService cmdlet will start the specified service (or services) on the local computer. The remote computer should be referenced using its FQDN; for example, atl-cs-001.litwareinc.com.

Confirm

Optional

Prompts you for confirmation before executing the command.

Force

Optional

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

** **

    1. Stop-CsWindowsService -Name "RTCRGS" -ComputerName atl-cs-001.litwareinc.com

      ** **

      ** **

      ** **

      ** **

      ** **

      ** **

  1. Troubleshooting Server Roles and Services Cmdlets

    ** **

    The troubleshooting cmdlets provide different ways to verify that Microsoft Lync Server 2013 is working as expected. For example, the CsHealthMonitoringConfiguration cmdlets enable you to set up test accounts for Registrar and Director pools. In turn, you can then use those test accounts to verify that users are able to successfully complete common tasks such as logging on to the system, exchanging instant messages, or making calls to a phone located on the public switched telephone network (PSTN).

     

    1. Get-CsAudioTestServiceApplication -Identity sip:RedmondAudioTest@litwareinc.com

Parameter

Required

Description

Credential

Optional

Enables you to run the 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 contact objects.

To use the Credential parameter, you must first create a PSCredential object by using the Get-Credential cmdlet. For details, see the Get-Credential cmdlet help topic.

DomainController

Optional

Enables you to connect to the specified domain controller in order to retrieve contact information. To connect to a particular domain controller, include the DomainController parameter followed by the computer name (for example, atl-cs-001) or its fully qualified domain name (FQDN) (for example, atl-cs-001.litwareinc.com).

 

    1. Get-CsDiagnosticConfiguration -Identity site:Redmond

Parameter

Required

Description

Filter

Optional

Enables you to use wildcard characters when specifying the settings collection (or collections) to be returned. For example, this syntax returns all the settings configured at the site scope: -Filter "site:*".

Note that you cannot use both the Filter and the Identity parameters in the same command.

Identity

Optional

Unique identifier for the diagnostic configuration settings to be returned. To return settings configured at the site scope, use syntax similar to this: -Identity "site:Redmond". To return the global settings, use this syntax: -Identity global.

If this parameter is not specified, then all of the diagnostics configuration settings currently in use will be returned.

** **

    1. Get-CsHealthMonitoringConfiguration -Identity atl-cs-001.litwareinc.com

      ** **

Parameter

Required

Description

Filter

Optional

Enables you to use wildcard characters when specifying the health monitoring configuration settings to be retrieved. For example, this syntax returns all the settings configured for the litwareinc.com domain: -Filter "*.litwareinc.com".

Identity

Optional

Fully qualified domain name (FQDN) of the pool where the health monitoring configuration settings have been assigned. For example: -Identity atl-cs-001.litwareinc.com.

If this parameter is not included, then the Get-CsHealthMonitoringConfiguration cmdlet will return information about all the health monitoring configuration settings currently in use.

** **

    1. Set-CsAudioTestServiceApplication -Identity "sip:RedmondAudioTest@litwareinc.com" -PrimaryLanguage "en-US"

Enables you to modify the property values for any of the Audio Test service application contacts currently in use in your organization. This cmdlet was introduced in Lync Server 2010.

 

Parameter

Required

Description

Identity

Required

SIP address of the audio test service contact to be modified.

Confirm

Optional

Prompts you for confirmation before executing the command.

DisplayName

Optional

Active Directory display name of the contact object.

DisplayNumber

Optional

Although a valid property, DisplayNumber is not actually used with the Audio Test service.

 

** **

    1. Set-CsHealthMonitoringConfiguration -Identity atl-cs-001.litwareinc.com -FirstTestUserSipUri "sip:kenmyer@litwareinc.com" -FirstTestSamAccountName "litwareinc\kenmyer"

      ** **

Parameter

Required

Description

Confirm

Optional

Prompts you for confirmation before executing the command.

FirstTestSamAccountName

Optional

SamAccountName of the first test user. The FirstTestSamAccountName must be entered using the format domain\username; for example:

-FirstTestSamAccountName litwareinc\kenmyer

FirstTestUserSipUri

Optional

SIP address of the first test user to be configured for use by this collection of health monitoring settings. Note that the SIP address must include the sip: prefix. For example: -FirstTestUserSipUri "sip:kenmyer@litwareinc.com".

Force

Optional

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

Identity

Optional

Fully qualified domain name (FQDN) of the pool where the health monitoring configuration settings to be modified have been assigned. For example: -Identity atl-cs-001.litwareinc.com.

** **

  1. Enterprise Voice Cmdlets

    ** **

    Enterprise Voice is the Microsoft implementation of Voice over IP (VoIP). The cmdlets available for managing Enterprise Voice in Microsoft Lync Server 2013 will allow you to create and modify dial plans (formerly known as location profiles), voice policies, routes, and normalization rules.

    ** **

  1. Troubleshooting Enterprise Voice Cmdlets

    ** **

    1. Get-CsVoiceConfiguration

Parameter

Required

Description

Filter

Optional

There can only be one instance of this object, so this parameter does nothing.

Identity

Optional

The scope of the voice configuration to retrieve. The only possible value is Global.

LocalStore

Optional

Retrieves the voice configuration from the local replica of the Central Management store, rather than the Central Management store itself.

    1. Get-CsVoiceTestConfiguration

Parameter

Required

Description

Filter

Optional

This parameter provides a way to do a wildcard search of the defined voice test configurations. (For details, see the examples in this topic.)

Identity

Optional

A string uniquely identifying the test configuration you want to retrieve.

LocalStore

Optional

Retrieves the voice test configuration from the local replica of the Central Management store, rather than the Central Management store itself.

** **

    1. New-CsVoiceTestConfiguration -Identity TestConfig1

Parameter

Required

Description

Identity

Required

A string uniquely identifying this test scenario.

This string can be up to 32 characters in length and may contain any alphanumeric characters plus the backslash (\), period (.) or underscore (_).

The value of this parameter does not include scope because this object can be created only at the global scope. Therefore only a unique name is required.

Name

Required

This parameter contains the same value as the Identity. If the Identity parameter is specified, you cannot include the Name parameter in your command. Likewise, if the Name parameter is specified, you cannot specify an Identity.

Confirm

Optional

Prompts you for confirmation before executing the command.

DialedNumber

Optional

The phone number you want to use to test the policies, usages, etc.

Must be 512 characters or fewer.

Default: 1234

    1. Remove-CsVoiceConfiguration -Identity Global –Confirm

Parameter

Required

Description

Identity

Required

The scope of the voice configuration to remove. This value must be Global.

Confirm

Optional

Prompts you for confirmation before executing the command.

Force

Optional

Suppresses any confirmation prompts that would otherwise be displayed before making changes.

WhatIf

Optional

Describes what would happen if you executed the command without actually executing the command.

    1. Get-CsDialPlan -Identity site:Redmond | Test-CsDialPlan -DialedNumber 14255559999 | Format-List

Parameter

Required

Type

Description

DialedNumber

Required

PhoneNumber

The phone number against which you want to test the dial plan specified in the Dialplan parameter.

Full Data Type: Microsoft.Rtc.Management.Voice.PhoneNumber

Dialplan

Required

LocationProfile

An object containing a reference to the dial plan against which you want to test the number specified in the DialedNumber parameter.

Full Data Type: Microsoft.Rtc.Management.WritableConfig.Policy.Voice.LocationProfile

** **

    1. Get-CsVoiceNormalizationRule -Identity "global/11 digit number rule" | Test-CsVoiceNormalizationRule -DialedNumber 14255559999

Parameter

Required

Description

DialedNumber

Required

The phone number against which you want to test the normalization rule specified in the NormalizationRule parameter.

Full Data Type: Microsoft.Rtc.Management.Voice.PhoneNumber

NormalizationRule

Required

An object containing a reference to the normalization rule against which you want to test the number specified in the DialedNumber parameter.

You can retrieve voice normalization rules by calling the Get-CsVoiceNormalizationRule cmdlet.

 

 

    1. Get-CsVoicePolicy -Identity site:Redmond | Test-CsVoicePolicy -TargetNumber "+14255559999"

Parameter

Required

Type

Description

TargetNumber

Required

PhoneNumber

The phone number against which to run the test. This number should be in E.164 format (such as +14255551212).

VoicePolicy

Required

VoicePolicy

A reference to the voice policy object against which to run the test. Voice policy objects can be retrieved by calling the Get-CsVoicePolicy cmdlet.

Force

Optional

SwitchParameter

Suppresses any confirmation prompts or non-fatal error messages that might occur when you run the cmdlet.

** **

    1. Get-CsVoiceRoute -Identity testroute | Test-CsVoiceRoute -TargetNumber "+14255551212"

Parameter

Required

Description

Route

Required

An object containing a reference to the voice route against which you want to test the number specified in the TargetNumber parameter. You can retrieve a voice route object by calling the Get-CsVoiceRoute cmdlet.

Full Data Type: Microsoft.Rtc.Management.WritableConfig.Policy.Voice.Route

TargetNumber

Required

The phone number against which you want to test the voice route specified in the Route parameter. This number should be in E.164 format (such as +14255551212).

Full Data Type: Microsoft.Rtc.Management.Voice.PhoneNumber

** **

 

    1. Test-CsVoiceUser -DialedNumber "+14255559999" -SipUri "sip:kmyer@litwareinc.com" –Verbose

Parameter

Required

Description

DialedNumber

Required

The phone number to test.

Full data type: Microsoft.Rtc.Management.Voice.PhoneNumber

SipUri

Required

The SIP URI of the user against which the test is taking place. This is the Identity of the user as used in the CsUser cmdlets. You can specify a user's identity 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). Note that the SamAccountName cannot be used as an identity.

** **

  1. Voice Normalization Rules Cmdlets

    Voice normalization rules are used to convert a telephone dialing requirement (for example, dialing 9 to access an outside line) to the E.164 phone number format used by Microsoft Lync Server 2013.

    1. Get-CsVoiceNormalizationRule

Parameter

Required

Description

Filter

Optional

Uses wildcard strings to return a collection of normalization rules based on Identity. Note that Filter works only on the scope portion of the Identity, not on the name. For example, the filter value *lob* will return all rules at the global scope (scopes that contain the letters lob), but not a rule with the identity site:Redmond/lobby, where lob is only in the name portion of the identity, not the scope.

Identity

Optional

A unique identifier for the rule. If a value is specified for this parameter, it must be in the format scope/name; for example, site:Redmond/Rule1, where site:Redmond is the scope and Rule1 is the name.

** **

    1. Set-CsVoiceNormalizationRule -Identity "site:Redmond/Prefix Redmond" -Description "Add a prefix to all numbers on site Redmond"

      ** **

Parameter

Required

Description

Confirm

Optional

Prompts you for confirmation before executing the command.

Description

Optional

A friendly description of the normalization rule.

Maximum string length: 512 characters.

Force

Optional

Suppresses any confirmation prompts that would otherwise be displayed before making changes.

Identity

Optional

A unique identifier for the rule. The Identity specified must include the scope followed by a slash followed by the name; for example: site.Rule1, where site:Redmond is the scope and Rule1 is the name.

    1. Get-CsVoiceNormalizationRule -Identity "global/11 digit number rule" | Test-CsVoiceNormalizationRule -DialedNumber 14255559999

      ** **

Parameter

Required

Description

DialedNumber

Required

The phone number against which you want to test the normalization rule specified in the NormalizationRule parameter.

Full Data Type: Microsoft.Rtc.Management.Voice.PhoneNumber

NormalizationRule

Required

An object containing a reference to the normalization rule against which you want to test the number specified in the DialedNumber parameter.

You can retrieve voice normalization rules by calling the Get-CsVoiceNormalizationRule cmdlet.

** **

** **

  1. Voice Policy Cmdlets
    1. Get-CsDialPlan -Identity RedmondDialPlan

Parameter

Required

Description

Filter

Optional

Performs a wildcard search that allows you to narrow down your results to only dial plans with identities that match the given wildcard string.

Identity

Optional

The unique identifier designating the scope, and for per-user scope a name, to identify the dial plan you want to retrieve.

** **

    1. Get-CsPstnUsage

Parameter

Required

Description

Filter

Optional

The Filter parameter allows you to retrieve only those PSTN usages with an Identity matching a particular wildcard string. However, the only Identity available to PSTN usages is Global, so this parameter is not useful for this cmdlet.

Identity

Optional

The level at which these settings are applied. The only identity that can be applied to PSTN usages is Global.

    1. Get-CsVoicePolicy -Identity UserPolicy1

Parameter

Required

Description

Filter

Optional

This parameter accepts a wildcard string and returns all voice policies with identities matching that string. For example, a Filter value of site:* will return all voice policies defined at the site level.

Identity

Optional

A unique identifier specifying the scope, and in some cases the name, of the policy. If this parameter is omitted, all voice policies for the organization are returned.

LocalStore

Optional

Retrieves the voice policy from the local replica of the Central Management store, rather than the Central Management store itself.

    1. Set-CsDialPlan -Identity RedmondDialPlan -Description "This plan is for Redmond-based users only."

Parameter

Required

Description

City

Optional

This parameter is not used with this cmdlet.

Confirm

Optional

Prompts you for confirmation before executing the command.

CountryCode

Optional

This parameter is not used with this cmdlet.

Description

Optional

A description of this dial plan--what it’s for, what type of user it applies to, or any other information that will be helpful in identifying the purpose of the dial plan.

Maximum characters: 512

** **

    1. Set-CsPstnUsage -Identity global -Usage @{add="International"}

Parameter

Required

Description

Confirm

Optional

Prompts you for confirmation before executing the command.

Force

Optional

Suppresses any confirmation prompts that would otherwise be displayed before making changes.

Identity

Optional

The scope at which these settings are applied. The Identity for this cmdlet is always Global.

Instance

Optional

A reference to a PSTN usage object. This object must be of type PstnUsages and can be retrieved by calling the Get-CsPstnUsage cmdlet.

Usage

Optional

Contains a list of allowable usage strings. These entries can be any string value.

** **

    1. Set-CsVoicePolicy UserVoicePolicy2 -AllowSimulRing $false -PstnUsages @{remove="Local"}

Parameter

Required

Type

Description

AllowCallForwarding

Optional

Boolean

If this parameter is set to True, users assigned to this policy can forward calls. If this parameter is set to False, calls cannot be forwarded.

AllowPSTNReRouting

Optional

Boolean

When this parameter is set to True, calls made to internal numbers homed on another pool will be routed through the public switched telephone network (PSTN) when the pool or WAN is unavailable.

AllowSimulRing

Optional

Boolean

Simultaneous ring is a feature that allows multiple phones to ring when a single number is dialed. Setting this parameter to True enables simultaneous ring. If this parameter is set to False, simultaneous ring cannot be configured for any user assigned to this policy.

** **

    1. Get-CsDialPlan -Identity site:Redmond | Test-CsDialPlan -DialedNumber 14255559999 | Format-List

Parameter

Required

Type

Description

DialedNumber

Required

PhoneNumber

The phone number against which you want to test the dial plan specified in the Dialplan parameter.

Full Data Type: Microsoft.Rtc.Management.Voice.PhoneNumber

Dialplan

Required

LocationProfile

An object containing a reference to the dial plan against which you want to test the number specified in the DialedNumber parameter.

Full Data Type: Microsoft.Rtc.Management.WritableConfig.Policy.Voice.LocationProfile

** **

Voice Routing Cmdlets

** **

    1. Get-CsPstnUsage

Parameter

Required

Description

Filter

Optional

The Filter parameter allows you to retrieve only those PSTN usages with an Identity matching a particular wildcard string. However, the only Identity available to PSTN usages is Global, so this parameter is not useful for this cmdlet.

Identity

Optional

The level at which these settings are applied. The only identity that can be applied to PSTN usages is Global.

** **

    1. Get-CsRoutingConfiguration

Parameter

Required

Description

Filter

Optional

There can be only one instance of this object, so this parameter does nothing.

Identity

Optional

The scope of the routing configuration to retrieve. The only possible value is Global.

** **

    1. Get-CsVoiceRoute -Identity Route1

Parameter

Required

Description

Filter

Optional

This parameter filters the results of the Get operation based on the wildcard value passed to this parameter.

Identity

Optional

A string that uniquely identifies the voice route. If no identity is provided, all voice routes for the organization are returned.

** **

    1. Set-CsPstnUsage -Identity global -Usage @{add="International"}

Parameter

Required

Description

Confirm

Optional

Prompts you for confirmation before executing the command.

Force

Optional

Suppresses any confirmation prompts that would otherwise be displayed before making changes.

Identity

Optional

The scope at which these settings are applied. The Identity for this cmdlet is always Global.

Instance

Optional

A reference to a PSTN usage object. This object must be of type PstnUsages and can be retrieved by calling the Get-CsPstnUsage cmdlet.

Usage

Optional

Contains a list of allowable usage strings. These entries can be any string value.

** **

    1. Set-CsVoiceRoute -Identity Route1 -Description "Test Route"

      Get-CsVoiceRoute -Identity testroute | Test-CsVoiceRoute -TargetNumber "+14255551212"

Parameter

Required

Description

Route

Required

An object containing a reference to the voice route against which you want to test the number specified in the TargetNumber parameter. You can retrieve a voice route object by calling the Get-CsVoiceRoute cmdlet.

Full Data Type: Microsoft.Rtc.Management.WritableConfig.Policy.Voice.Route

TargetNumber

Required

The phone number against which you want to test the voice route specified in the Route parameter. This number should be in E.164 format (such as +14255551212).

** **