Hany Taha



Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Microsoft Lync Server 2010

Published: October 2011

 

 

 

 

 

 

 

 

 

 

 

  

 

 

 

 

[pic]

This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice.

Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred.

This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes.

Copyright © 2011 Microsoft Corporation. All rights reserved.

1. Contents

Introduction 1

Managing Archiving 2

Configuring Support for Archiving of Internal and External Communications 2

Change the Global Policy for Archiving of Internal and External Communications 2

Create a Site Policy for Archiving 2

Enable or Disable Archiving for a Site 2

Create a User Policy for Archiving 2

Enable or Disable Archiving for Users 2

Delete an Archiving Policy 3

Apply an Archiving Policy to a User or User Group 3

Enable or Disable Archiving 3

Specify the Types of Communications to Be Archived 3

Enable or Disable Purging for Archiving 4

Block or Allow IM and Web Conferencing Sessions If Archiving Fails 4

Enable or Disable Sending an Archiving Disclaimer to Federated Partners 5

Configuring Support for Clients and Devices 5

Specify the Client Versions Supported in Your Organization 5

View the Status of Services Running on a Computer 5

Modify the Default Action for Clients Not Explicitly Supported or Restricted 6

View Software Updates for Devices in Your Organization 6

Add a Device to Test Update Functionality 7

Modify Settings for Log Files of Device Update Activity 7

Configure Security Settings for Lync 2010 Phone Edition 7

Configure Voice Quality of Service for Lync 2010 Phone Edition 8

Configure Phone Lock for Lync 2010 Phone Edition 8

Configuring Incoming Call Handling Features 8

Configure Phone Number Extensions for Parking Calls 8

Create a Call Park Orbit Range 8

Change a Call Park Orbit Range 8

Delete a Call Park Orbit Range 8

Configure Routing of Unassigned Phone Numbers 9

Change an Unassigned Number Range 9

Delete an Unassigned Number Range 9

Configuring Voice Routing 9

Configuring Dial Plans and Normalization Rules 9

Create a Dial Plan 9

Modify a Dial Plan 10

Create or Modify a Normalization Rule Manually 10

Configuring Voice Policies, PSTN Usage Records, and Voice Routes 10

Configuring Voice Policies and PSTN Usage Records to Authorize Calling Features and Privileges 10

Configuring Voice Routes for Outbound Calls 11

Configuring Trunks and Translation Rules 11

Configure Media Bypass on a Trunk 11

Configure a Trunk Without Media Bypass 12

Defining Translation Rules 12

Exporting and Importing Voice Routing Configuration 12

Export a Voice Route Configuration File 12

Import a Voice Route Configuration File 12

Test Voice Routing 13

Create a Voice Routing Test Case 13

Run Voice Routing Test Cases 13

Managing External Connectivity 13

Enable or Disable External User Access for Your Organization 13

Enable or Disable Remote User Access for Your Organization 13

Enable or Disable Federation for Your Organization 13

Enable or Disable Anonymous User Access for Your Organization 14

Manage Communications with External Users 14

Manage Remote User Access 14

Manage Federated Partner Access 14

Manage IM Provider Support 15

Configure Policies to Control Access by Users of IM Service Providers 15

Specify Supported IM Service Providers 16

Configure Conferencing Policies to Support Anonymous Users 16

Apply Policies for External User Access to Users 16

Apply External User Access Policies to Users 16

Apply Conferencing Policies to Support Anonymous Users 17

Reset or Delete External User Access Policies 17

Filtering Instant Messages and Client Versions 18

Configuring Filtering for Instant Messaging (IM) 18

Modify the Default File Transfer Filter 18

Create a New File Transfer Filter for a Specific Site 18

Modify the Default URL Filter 18

Create a New URL Filter to Handle Hyperlinks in IM Conversations 18

Specify Client Versions Supported for Sign-in by a User 19

Managing Computers in Your Topology 19

View a List of Computers Running Lync Server 2010 19

View the Status of Services Running on a Computer 20

View Details About a Service 20

Start or Stop Lync Server 2010 Services 21

Prevent Sessions for Services 21

View Microsoft SIP Processing Language (MSPL) Server Applications 22

Enable or Disable a Microsoft SIP Processing Language (MSPL) Server Application 22

Mark a Microsoft SIP Processing Language (MSPL) Application as Critical or Not Critical 22

View a List of Trusted Applications 23

View the Simple URL Details 23

Managing Users 23

Search for Lync Server 2010 Users 23

Add a New User to Lync Server 2010 23

Enable or Disable Users for Lync Server 2010 24

Set, View, and Send a User's Dial-in Conferencing PIN 25

Move Users to Another Pool 25

Assign Policies to Users 26

Assign a Conferencing Policy to Modify a User's Default Meeting Experience 26

Specify Client Versions Supported for Sign-in by a User 26

Assign Specific Dial-in Conferencing PIN Security Settings to a User 26

Apply External User Access Policies to Users 27

Configure Archiving of a User's Communications 27

Assign a Location Policy to a User 27

Enable a User for Enterprise Voice 27

Configure Telephony for Users 28

Managing On-Premises Meetings 28

Configuring Conferencing Settings 28

Modify the Default Conferencing User Experience 28

Create or Modify Conferencing User Experience for a Site or Group of Users 28

Delete a Conferencing Policy for a Site or Group of Users 29

Configuring the Meeting Join Experience 29

Modify the Default Meeting Join Experience 29

Create or Modify Meeting Join Settings for a Site or Pool 30

Delete Meeting Join Settings for a Site or Pool 30

Configure Settings for a Dial-in Conferencing Access Number 30

Delete a Dial-in Conferencing Access Number 31

Configure Dial-in Conferencing Personal Identification Number (PIN) Rules 31

Modify the Default Dial-in Conferencing PIN Settings 31

Create or Modify Dial-in Conferencing PIN Settings for a Site or Group of Users 31

Delete Dial-in Conferencing PIN Settings for a Site or Group of Users 32

Managing Monitoring 32

Create a Site Policy for Call Detail Recording 32

Create a Site Policy for Quality of Experience 32

Enable Call Detail Recording 33

Enable Quality of Experience 33

Configure Call Detail Recording 33

Configure Quality of Experience 33

Delete a Site Policy for Call Detail Recording 34

Delete a Site Policy for Quality of Experience 34

Configuring Your Network 34

Enabling Call Admission Control 34

Enabling Media Bypass 35

Configuring Location Policy 35

Configuring Bandwidth Policy Profile 36

Configuring Network Regions 36

Configuring Network Sites 37

Configuring Network Subnets 38

Configuring Network Region Links 38

Configuring Network Region Routes 39

Prevent New Connections to Lync Server 2010 for Server Maintenance 40

Prevent New Connections to Lync Server 40

Delegating Control of Lync Server 2010 40

Assigning an RBAC Role to a User 40

Assigning a User to a Security Group 40

Managing Response Groups 41

Managing Agent Groups 41

Create an Agent Group 41

Change Agent Group Settings or Members 41

Delete an Agent Group 42

Managing Response Group Queues 42

Create a Response Group Queue 42

Change a Response Group Queue 42

Delete a Response Group Queue 43

Managing Response Group Workflows 43

Create a Response Group Workflow 43

Change a Response Group Workflow 44

Delete a Response Group Workflow 45

Configuring Security 45

Create a New Registrar 45

Modify an Existing Registrar 46

Delete a Registrar 46

Create a New Web Service 46

Modify an Existing Web Service 46

Delete a Web Service 47

Create a New PIN Policy 47

Modify an Existing PIN Policy 47

Delete a PIN Policy 47

Edit or Configure Simple URLs 48

Configure Simple URLs 48

Configure a New Trusted Application Server 48

Configure a Trusted Application Pool 48

Change the Web Services URL 49

Change the Web Services URL 49

Introduction

This document is provided as a supplement to the Microsoft Lync Server 2010 Administration Guide, available from the Microsoft Download Center at . The Microsoft Lync Server 2010 Administration Guide contains useful information about Lync Server management. However, there is one thing that's missing from the Administration Guide: Lync Server Windows PowerShell commands. Granted, there are a handful of commands scattered throughout the Guide, but those are primarily commands used for tasks (such as configuring an Address Book server) that can't be done using the Lync Server Control Panel. For most management activities (creating an archiving policy, removing a dial-in conferencing access number, putting a domain on the list of blocked domains) the Guide provides step-by-step instructions for performing the task using the Control Panel, but doesn't let you know how (or even if) you can do the same thing using Lync Server Windows PowerShell.

Which is exactly why we've put together this supplement to the Administration Guide. What we've done is gone through the Administration Guide, identified all the tasks that don't include a Windows PowerShell option, and provided the Windows PowerShell option. For example, the Administration Guide offers these steps for locking a Lync Phone Edition phone:

1. Open a browser window, and then enter the Admin URL to open the Lync Server Control Panel. For details about the different methods you can use to start Lync Server Control Panel, see Open Lync Server Administration Tools.

2. Click Clients, and then click Device Configuration.

3. On the Device Configuration tab, in the list of device configurations, double-click the configuration for which you want to change the phone lock settings.

4. In the Edit Device Configuration dialog box, verify that the Enforce device locking check box is selected.

5. In Minimum PIN length, accept the default value or specify a new value.

6. In Phone lock time-out, accept the default value or specify a new value.

7. Click Commit.

To supplement those instructions, we've offered a Lync Server Windows PowerShell equivalent:

Set-CsUCPhoneConfiguration -Identity global –EnforcePhoneLock $True –PhoneLockTimeout 00:30:00

Like we said, we consider this to be a supplement to the Administration Guide; it's definitely not a replacement for the Guide. The Administration Guide includes a lot of useful information that explains what phone locking is and why you might want to use it. We don't offer any of that kind of information; we just provide you with a one-sentence introduction and then a Windows PowerShell command that shows you how to do something along the lines of enabling phone locking.

The ideal way to do things here would be to download the Administration Guide, then copy our Windows PowerShell commands and paste them into the appropriate sections in that Guide. That way you'd have the best of both worlds: all the explanatory information and Control Panel steps found in the Guide, and all the Windows PowerShell commands found here. What could be better than that?

In the meantime, this document provides the management tasks discussed in the Administration Guide. It also includes links to supplemental information available online.

If you’d like to view this guide online, it’s available on the Lync Server 2010 Windows PowerShell blog at . For details about Windows PowerShell in Lync Server, see the Lync Server Windows PowerShell blog at .

Managing Archiving

Configuring Support for Archiving of Internal and External Communications

Change the Global Policy for Archiving of Internal and External Communications

➢ To change the global policy for archiving

To modify the global archiving policy, use the Set-CsArchivingPolicy cmdlet and set the Identity to global:

Set-CsArchivingPolicy -Identity global -ArchiveInternal $True –ArchiveExternal $True

Alternatively, you can leave off the Identity parameter. If you do not specify an Identity, Set-CsArchivingPolicy will automatically modify the global policy:

Set-CsArchivingPolicy -ArchiveInternal $True –ArchiveExternal $True

Create a Site Policy for Archiving

➢ To create an archiving policy for a site

To create a new archiving policy at the site scope, use the New-CsArchivingPolicy cmdlet:

New-CsArchivingPolicy -Identity "site:Redmond" -ArchiveInternal $True –ArchiveExternal $True

Enable or Disable Archiving for a Site

➢ To change a site policy

To modify an archiving policy configured at the site scope, use the Set-CsArchivingPolicy cmdlet:

Set-CsArchivingPolicy -Identity "site:Redmond" -ArchiveInternal $False –ArchiveExternal $False

Create a User Policy for Archiving

➢ To create a user policy for archiving

To create a new per-user archiving policy, use the New-CsArchivingPolicy cmdlet:

New-CsArchivingPolicy -Identity "RedmondArchivingPolicy" -ArchiveInternal $True –ArchiveExternal $True

Enable or Disable Archiving for Users

➢ To change a user policy for archiving

To modify a per-user archiving policy, use the Set-CsArchivingPolicy cmdlet:

Set-CsArchivingPolicy -Identity "RedmondArchivingPolicy" -ArchiveInternal $False

Delete an Archiving Policy

➢ To delete a user or site policy for archiving

To delete a per-user or per-site archiving policy use the Remove-CsArchivingPolicy cmdlet:

Remove-CsArchivingPolicy -Identity "RedmondArchivingPolicy"

This command removes all the archiving policies configured at the site scope:

Get-CsArchivingPolicy –Filter "site:*" | Remove-CsArchivingPolicy

And this one removes all the archiving policies configured at the per-user scope:

Get-CsArchivingPolicy –Filter "tag:*" | Remove-CsArchivingPolicy

Apply an Archiving Policy to a User or User Group

➢ To apply an archiving user policy to a user account

To assign a per-user archiving policy to a user, use the Grant-CsArchivingPolicy cmdlet:

Grant-CsArchivingPolicy –Identity "Ken Myer" –PolicyName "RedmondArchiving"

To unassign a per-user archiving policy, use the Grant-CsArchivingPolicy cmdlet and set the value of the PolicyName property to null:

Grant-CsArchivingPolicy –Identity "Ken Myer" –PolicyName $Null

For More Information

• Haiku #53: The CsArchivingPolicy Cmdlets at

• The Edit Archiving Policy Dialog at

Enable or Disable Archiving

➢ To enable or disable archiving for a policy

To disable archiving, use the Set-CsArchivingConfiguration cmdlet and set the EnableArchiving property to None:

Set-CsArchivingConfiguration –Identity global –EnableArchiving None

For More Information

• Haiku #70: The CsArchivingConfiguration Cmdlets at

• The Archiving Setting Dialog at

Specify the Types of Communications to Be Archived

➢ To specify the communications to be archived

To archive only instant message sessions, use the Set-CsArchivingConfiguration cmdlet and set the EnableArchiving property to ImOnly:

Set-CsArchivingConfiguration –Identity global –EnableArchiving ImOnly

To archive both instant message sessions and conferences, set EnableArchiving to ImAndWebConf:

Set-CsArchivingConfiguration –Identity global –EnableArchiving ImAndWebConf

To disable archiving altogether, set EnableArchiving to None:

Set-CsArchivingConfiguration –Identity global –EnableArchiving None

For More Information

• Haiku #70: The CsArchivingConfiguration Cmdlets at

• The Archiving Setting Dialog at

Enable or Disable Purging for Archiving

➢ To enable or disable purging for archiving

To enable the purging of old records from the archiving database, use the Set-CsArchivingConfiguration cmdlet to set the EnablePurging property to True:

Set-CsArchivingConfiguration –Identity global –EnablePurging $True –KeepArchivingDataForDays 30

As shown above, you can also use the KeepArchivingDataForDays parameter to specify the number of days that records should be kept in the database.

To disable purging, set the EnablePurging property to False:

Set-CsArchivingConfiguration –Identity global –EnablePurging $False

For More Information

• Haiku #70: The CsArchivingConfiguration Cmdlets at

• The Archiving Setting Dialog at

Block or Allow IM and Web Conferencing Sessions If Archiving Fails

➢ To enable or disable blocking of IM and web conferencing sessions if archiving fails

To disable instant message sessions and conferences if archiving fails, use the Set-CsArchivingConfiguration cmdlet and set the BlockOnArchiveFailure property to True:

Set-CsArchivingConfiguration –Identity global –BlockOnArchiveFailure $True

To allow instant message sessions and conferences if archiving fails set the BlockOnArchiveFailure property to False:

Set-CsArchivingConfiguration –Identity global –BlockOnArchiveFailure $False

For More Information

• Haiku #70: The CsArchivingConfiguration Cmdlets at

• The Archiving Setting Dialog at

Enable or Disable Sending an Archiving Disclaimer to Federated Partners

➢ To enable or disable sending an archiving disclaimer to federated partners

To display an archiving disclaimer to federated partners at the beginning of an instant messaging session, use the Set-CsAccessEdgeConfiguration cmdlet and set the EnableArchivingDisclaimer property to True:

Set-CsAccessEdgeConfiguration –Identity global -EnableArchivingDisclaimer $True

To prevent the display of the archiving disclaimer, set the EnableArchivingDisclaimer property to False:

Set-CsAccessEdgeConfiguration –Identity global -EnableArchivingDisclaimer $False

For More Information

• Haiku #83: The CsAccessEdgeConfiguration Cmdlets at

• The Access Edge Configuration Dialog at

Configuring Support for Clients and Devices

Specify the Client Versions Supported in Your Organization

➢ To edit the default client version policy

As a general rule, client version policies are most-easily edited by modifying the client version policy rules associated with those policies. However, there might be times when you find it useful to use the Set-CsClientVersionPolicy cmdlet to directly modify a policy. For example, the following set of commands removes all the current client version policy rules from the Redmond site policy, copies the client version policy rules from the Dublin site policy, and then assigns those same rules to the Redmond site:

Set-CsClientVersionPolicy -Identity site:Redmond -Rules $Null

$x = Get-CsClientVersionPolicy -Identity site:Dublin | Select-Object -ExpandProperty Rules

Set-CsClientVersionPolicy -Identity site:Redmond -Rules $x

For More Information

• Haiku #125: The CsClientVersionPolicy Cmdlets at

• The Edit Client Version Policy Dialog at

View the Status of Services Running on a Computer

➢ To view the status of services running on a computer

To view the status of all the Lync Server services running on all of your computers, use the following command:

Get-CsService | Select-Object Role, PoolFqdn | Sort-Object PoolFqdn, Role

To view the services running on a specific computer, use this command, replacing atl-cs-001. with the fully qualified domain name of the computer to be viewed:

Get-CsService | Where-Object {$_.PoolFqdn –eq "atl-cs-001."} | Select-Object Role, PoolFqdn | Sort-Object PoolFqdn, Role

For More Information

• Haiku #71: The CsService Cmdlets at

Modify the Default Action for Clients Not Explicitly Supported or Restricted

➢ To modify the default action for clients not explicitly supported or restricted

To modify the default action for client applications that do not appear in a client version policy, use the Set-CsClientVersionConfiguration cmdlet and set the value of the DefaultAction property.

Set-CsClientVersionConfiguration –Identity global -DefaultAction "BlockWithUrl" -DefaultURL ""

➢ To disable client version control

To disable client version control, use the Set-CsClientVersionConfiguration cmdlet and set the Enabled property to False:

Set-CsClientVersionConfiguration –Identity global –Enabled $False

To enable client version control, set the Enabled property to True:

Set-CsClientVersionConfiguration –Identity global –Enabled $True

For More Information

• Haiku #115: The CsClientVersionConfiguration Cmdlets at

• The Edit Client Version Configuration Dialog at

View Software Updates for Devices in Your Organization

➢ To view software updates for UC devices

To review all the device update rules currently in use in your organization, use the Get-CsDeviceUpdateRule cmdlet:

Get-CsDeviceUpdateRule

This command returns all the device update rules assigned to a specified Web Server:

Get-CsDeviceUpdateRule -Filter "service:WebServer:atl-cs-001.*"

To approve a device update rule for widespread use, use the Approve-CsDeviceUpdate cmdlet:

Approve-CsDeviceUpdateRule -Identity service:WebServer:atl-cs-001.d5ce3c10-2588-420a-82ac-dc2d9b1222ff9

To reject a device update rule, use the Reset-CsDeviceUpdateRule cmdlet:

Reset-CsDeviceUpdateRule -Identity service:WebServer:atl-cs-001.d5ce3c10-2588-420a-82ac-dc2d9b1222ff9

To rollback a previously-approved device update rule, use the Restore-CsDeviceUpdateRule cmdlet:

Restore-CsDeviceUpdateRule -Identity service:WebServer:atl-cs-001.d5ce3c10-2588-420a-82ac-dc2d9b1222ff9

For More Information

• The Device Update Dialog at

• Approve-CsDeviceUpdateRule Cmdlet at

• The Reset-CsDeviceUpdateRule Cmdlet at

• The Restore-CsDeviceUpdateRule Cmdlet at

Add a Device to Test Update Functionality

➢ To add a test device

The New-CsTestDevice cmdlet enables you to create a new test device. The following command creates a new test device, using the serial number of the device as the unique identifier:

New-CsTestDevice -Identity site:Redmond/UCPhone -IdentifierType SerialNumber -Identifier "07823-A345"

For More Information

• Haiku #40: The CsTestDevice Cmdlets at

• The New Test Device Dialog

Modify Settings for Log Files of Device Update Activity

➢ To change logging settings

To modify logging settings for the device update service, use the Set-CsDeviceUpdateConfiguration cmdlet:

Set-CsDeviceUpdateConfiguration -Identity global -MaxLogFileSize 2048000 -MaxLogCacheLimit 1024000

For More Information

• Haiku #127: The CsDeviceUpdateConfiguration Cmdlets at

• The Log Setting Dialog at .

Configure Security Settings for Lync 2010 Phone Edition

➢ To configure security settings for Lync 2010 Phone Edition

To change the security mode for Lync 2010 Phone Edition, use the Set-CsUCPhoneConfiguration cmdlet:

Set-CsUCPhoneConfiguration -Identity global -SIPSecurityMode "Medium"

For More Information

• Haiku #15: The CsUCPhoneConfiguration Cmdlets at

Configure Voice Quality of Service for Lync 2010 Phone Edition

➢ To configure Voice Quality of Service for Lync 2010 Phone Edition

To modify the quality of service settings for Lync 2010 Phone Edition, use the Set-CsUCPhoneConfiguration cmdlet and the VoiceDiffServTag property:

Set-CsUCPhoneConfiguration -Identity global –VoiceDiffServTag 50

For More Information

• Haiku #15: The CsUCPhoneConfiguration Cmdlets at

Configure Phone Lock for Lync 2010 Phone Edition

➢ To configure the phone lock

To enforce phone locking for Lync 2010 Phone Edition, use the Set-CsUCPhoneConfiguration cmdlet and set the EnforcePhoneLock property to True. If desired, you can also change the value of the PhoneLockTimeout property:

Set-CsUCPhoneConfiguration -Identity global –EnforcePhoneLock $True –PhoneLockTimeout 00:30:00

For More Information

• Haiku #15: The CsUCPhoneConfiguration Cmdlets at

Configuring Incoming Call Handling Features

Configure Phone Number Extensions for Parking Calls

Create a Call Park Orbit Range

➢ To create a new range of numbers for parking calls

To create a new Call Park orbit range use the New-CsCallParkOrbit cmdlet and specify both the start and end numbers in the range:

New-CsCallParkOrbit -Identity "Redmond CPO 1" -NumberRangeStart 100 -NumberRangeEnd 199 -CallParkService ApplicationServer:pool0.

Change a Call Park Orbit Range

➢ To change a range of numbers for parking calls

To modify a Call Park Orbit range use the Set-CsCallParkOrbit cmdlet:

Set-CsCallParkOrbit -Identity "Redmond CPO 1" -NumberRangeStart 500 -NumberRangeEnd 699

Delete a Call Park Orbit Range

➢ To delete a Call Park orbit range

To delete a Call Park Orbit range, use the Remove-CsCallParkOrbit cmdlet:

Remove-CsCallParkOrbit -Identity "Redmond CPO 1"

Use this command to remove all your Call Park orbit ranges:

Get-CsCallParkOrbit | Remove-CsCallParkOrbit

For More Information

• Haiku #27: The CsCallParkOrbit Cmdlets at

Configure Routing of Unassigned Phone Numbers

➢ To configure routing of unassigned phone numbers

The New-CsUnassignedNumber cmdlet enables you to create a new unassigned number range:

New-CsUnassignedNumber -Identity UNSet1 -NumberRangeStart "+14255551000" -NumberRangeEnd "+14255551100" -AnnouncementService ApplicationServer:redmond. -AnnouncementName "Welcome Announcement"

Change an Unassigned Number Range

➢ To change routing of unassigned phone numbers

To change an existing unassigned number range, use the Set-CsUnassignedNumber cmdlet. This command changes both the starting number and ending number for an unassigned number range:

Set-CsUnassignedNumber -Identity UNSet1 -NumberRangeStart "+14255551000" -NumberRangeEnd "+14255551900"

Delete an Unassigned Number Range

➢ To delete an unassigned number range

To delete an unassigned number range, use the Remove-CsUnassignedNumber cmdlet:

Remove-CsUnassignedNumber -Identity UNSet1

The following command enables you to delete all your unassigned number ranges:

Get-CsUnassignedNumber | Remove-CsUnassignedNumber

For More Information

• Haiku #4: The CsUnassignedNumber Cmdlets at

• The New Unassigned Number Range Dialog (Announcement) at

• The New Unassigned Number Range Dialog (Exchange UM) at

Configuring Voice Routing

Configuring Dial Plans and Normalization Rules

Create a Dial Plan

➢ To create a dial plan

To create a new dial plan, use the New-CsDialPlan cmdlet:

New-CsDialPlan -Identity site:Redmond -SimpleName RedmondSiteDialPlan

The following command creates a new dial plan, then uses the New-CsVoiceNormalizationRule cmdlet to immediately add a new normalization rule to that dial plan:

New-CsDialPlan -Identity site:Redmond -SimpleName RedmondSiteDialPlan

New-CsVoiceNormalizationRule -Identity "site:Redmond/SeattlePrefix" -Pattern "^9(\d*){1,5}$" -Translation "+1206$1"

Modify a Dial Plan

➢ To modify a dial plan

To modify a dial plan, use the Set-CsDialPlan cmdlet:

Set-CsDialPlan -Identity RedmondDialPlan –ExternalAccessPrefix 8

For More Information

• Haiku #92: The CsDialPlan Cmdlets at

• The Edit Dial Plan Dialog at

• The New Normalization Rule Dialog at

Create or Modify a Normalization Rule Manually

➢ To define a normalization rule manually

To create a new voice normalization rule, use the New-CsVoiceNormalizationRule cmdlet. The following rule has the name SeattleFourDigit and will be assigned to the dial plan SeattleUser:

New-CsVoiceNormalizationRule -Parent SeattleUser -Name SeattleFourDigit -Description "Dialing with internal four-digit extension" -Pattern '^(\d{4})$' -Translation '+1206555$1'

For More Information

• The New Normalization Rule Dialog at

Configuring Voice Policies, PSTN Usage Records, and Voice Routes

Configuring Voice Policies and PSTN Usage Records to Authorize Calling Features and Privileges

Create a Voice Policy and Configure PSTN Usage Records

➢ To create a voice policy

To create a new voice policy, use the New-CsVoicePolicy cmdlet:

New-CsVoicePolicy –Identity UserVoicePolicy2 -AllowSimulRing $False -PstnUsages @{Add = "Local"}

Modify a Voice Policy and Configure PSTN Usage Records

➢ To modify a voice policy

To modify an existing voice policy, use the Set-CsVoicePolicy cmdlet:

Set-CsVoicePolicy UserVoicePolicy2 -AllowSimulRing $False -PstnUsages @{add = "Long Distance"}

View PSTN Usage Records

➢ To view a PSTN usage record

To view all your PSTN usage records, use the Get-CsPstnUsage cmdlet:

Get-CsPstnUsage | Select-Object –ExpandProperty Usage

Configuring Voice Routes for Outbound Calls

Create a Voice Route

➢ To create a voice route

To create a new voice route, use the New-CsVoiceRoute cmdlet:

New-CsVoiceRoute -Identity Route1 -PstnUsages @{add="Long Distance"} -PstnGatewayList @{add="PstnGateway:redmondpool."}

Modify a Voice Route

➢ To modify a voice route

To modify a voice route, use the Set-CsVoiceRoute cmdlet:

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

The following commands use both the Get-CsVoiceRoute and Set-CsVoiceRoute cmdlets to add a new PSTN gateway to a voice route:

$y = Get-CsVoiceRoute -Identity Route1

$y.PstnGatewayList.Add("PstnGateway:192.168.0.100")

Set-CsVoiceRoute -Instance $y

For More Information

• Haiku #36: The CsVoicePolicy Cmdlets at

• Haiku #78: The CsPstnUsage Cmdlets at

• The Edit Voice Policy Dialog at

• The Edit Voice Route Dialog at

• The Edit PSTN Usage Record Dialog at

Configuring Trunks and Translation Rules

Configure Media Bypass on a Trunk

➢ To configure media bypass on a trunk

To enable media bypass for a new SIP trunk, use the New-CsTrunkConfiguration cmdlet and set the EnableBypass property to True:

New-CsTrunkConfiguration -Identity site:Redmond -EnableBypass $True –MaxEarlyDialogs 40 –SRTPMode Required

Configure a Trunk Without Media Bypass

➢ To configure a trunk without media bypass

To disable media bypass for a new SIP trunk, use the New-CsTrunkConfiguration cmdlet and set the EnableBypass property to False:

New-CsTrunkConfiguration -Identity site:Redmond -EnableBypass $False –MaxEarlyDialogs 40 –SRTPMode Required

Defining Translation Rules

Create or Modify a Translation Rule Manually

➢ To define a translation rule manually

To create a new translation rule use the New-CsSipResponseCodeTranslationRule cmdlet:

New-CsSipResponseCodeTranslationRule -Identity "PstnGateway:192.168.0.240/Rule404" -ReceivedResponseCode 434 -TranslatedResponseCode 404

For More Information

• Haiku #2: The CsTrunkConfiguration Cmdlets at

• Haiku #45: The CsSipResponseCodeTranslationRule Cmdlets at

• The Edit Trunk Configuration Dialog at

Exporting and Importing Voice Routing Configuration

Export a Voice Route Configuration File

➢ To export a voice routing configuration

With Windows PowerShell you cannot directly export a voice route in the VCFG file format used by the Lync Server Control Panel. However, it is possible to export a voice route in an XML format that can later be imported using Windows PowerShell:

Get-CsVoiceRoute –Identity "RedmondRoute" | Export-Clixml –Path "C:\Routes\RedmondRoute.xml"

Import a Voice Route Configuration File

➢ To import a voice routing configuration

To import a voice route that was previously exported using the Export-Clixml cmdlet, use the following command:

Import-Clixml –Path "C:\Routes\RedmondRoute.xml" | Set-CsVoiceRoute

For More Information

• The Get-CsVoiceRoute Cmdlet at

• The Edit Voice Route Dialog at

• The Import-Clixml Cmdlet at

• The Export-Clixml Cmdlet at

Test Voice Routing

Create a Voice Routing Test Case

➢ To create a test case

To create a new test case for voice routing, use the New-CsVoiceTestConfiguration cmdlet:

New-CsVoiceTestConfiguration -Identity TestConfig1 -DialedNumber 5551212 -ExpectedTranslatedNumber +5551212

Run Voice Routing Test Cases

➢ To run all voice routing test cases

Use the following command to run all your voice routing test cases, one after another:

Get-CsVoiceTestConfiguration | Test-CsVoiceTestConfiguration

➢ To run one or more selected voice routing test cases

Use the following command to run a specific voice routing test case:

Get-CsVoiceTestConfiguration -Identity TestConfig1 | Test-CsVoiceTestConfiguration

For More Information

• The Test-CsVoiceTestConfiguration Cmdlet at

Managing External Connectivity

Enable or Disable External User Access for Your Organization

Enable or Disable Remote User Access for Your Organization

➢ To enable or disable remote user access for your organization

To enable remote user access, use the Set-CsAccessEdgeConfiguration cmdlet to set the AllowOutsideUsers property to True:

Set-CsAccessEdgeConfiguration –Identity global –AllowOutsideUsers $True

To disable remote user access, set the AllowOutsideUsers property to False:

Set-CsAccessEdgeConfiguration –Identity global –AllowOutsideUsers $False

Enable or Disable Federation for Your Organization

➢ To enable or disable federated user access for your organization

To enable federated user access, use the Set-CsAccessEdgeConfiguration cmdlet to set the AllowFederatedUsers property to True:

Set-CsAccessEdgeConfiguration –Identity global –AllowFederatedUsers $True

To disable federated user access, set the AllowFederatedUsers property to False:

Set-CsAccessEdgeConfiguration –Identity global –AllowFederatedUsers $False

Enable or Disable Anonymous User Access for Your Organization

➢ To enable or disable anonymous user access for your organization

To enable anonymous user access, use the Set-CsAccessEdgeConfiguration cmdlet to set the AllowAnonymousUsers property to True:

Set-CsAccessEdgeConfiguration –Identity global –AllowAnonymousUsers $True

To disable anonymous user access, set the AllowAnonymousUsers property to False:

Set-CsAccessEdgeConfiguration –Identity global –AllowAnonymousUsers $False

For More Information

• Haiku #83: The CsAccessEdgeConfiguration Cmdlets at

• The Access Edge Configuration Dialog at

Manage Communications with External Users

Manage Remote User Access

➢ To configure an external access policy to support remote user access

To create an external user access policy that allows access by remote users, use the New-CsExternalAccessPolicy cmdlet and set the EnableOutsideAccess property to True:

New-CsExternalAccessPolicy –Identity "RedmondExternalAccess" –EnableOutsideAccess $True

Manage Federated Partner Access

Configure Policies to Control Federated User Access

➢ To configure a policy to support access by users of federated domains

To create an external user access policy that allows access by federated users, use the New-CsExternalAccessPolicy cmdlet and set the EnableFederationAccess property to True:

New-CsExternalAccessPolicy –Identity "RedmondExternalAccess" –EnableFederationAccess $True

Enable or Disable Discovery of Federation Partners

➢ To enable or disable automatic discovery of federated domains for your organization

To enable automatic discovery of federated domains, use the Set-CsAccessEdgeConfiguration cmdlet and the UseDnsSrvRouting parameter, and set EnablePartnerDiscovery to True:

Set-CsAccessEdgeConfiguration -UseDnsSrvRouting -EnablePartnerDiscovery $True

To disable automatic routing, use the UseDefaultRouting parameter, and set DefaultRouteFqdn to the fully qualified domain name of the Edge Server used for federation requests:

Set-CsAccessEdgeConfiguration -UseDefaultRouting -DefaultRouteFqdn "atl-edge-001."

Control Access by Individual Federated Domains

➢ To add an external domain to the list of allowed domains

To add a domain to the list of domains your users are allowed to communicate with, use the New-CsAllowedDomain cmdlet followed by the fully qualified domain name of the allowed domain:

New-CsAllowedDomain -Identity ""

➢ To add an external domain to the list of blocked domains

To add a domain to the list of domains your users are not allowed to communicate with, use the New-CsBlockedDomain cmdlet followed by the fully qualified domain name of the "outlawed" domain:

New-CsBlockedDomain -Identity ""

Enable or Disable Sending an Archiving Disclaimer to Federated Partners

➢ To enable or disable sending an archiving disclaimer to federated partners

To display an archiving disclaimer to federated partners at the beginning of an instant messaging session, use the Set-CsAccessEdgeConfiguration cmdlet and set the EnableArchivingDisclaimer property to True:

Set-CsAccessEdgeConfiguration –Identity global -EnableArchivingDisclaimer $True

To prevent the display of the archiving disclaimer, set the EnableArchivingDisclaimer property to False:

Set-CsAccessEdgeConfiguration –Identity global -EnableArchivingDisclaimer $False

For More Information

• Haiku #107: The CsExternalAccessPolicy Cmdlets at

• Haiku # 83: The CsAccessEdgeConfiguration Cmdlets at

• Haiku #3: The CsBlockedDomain Cmdlets at

• The Edit External Access Policy Dialog at

• The Access Edge Configuration Dialog at

• The New Federated Domains Dialog (Allowed Domains) at

• The New Federated Domains Dialog (Blocked Domains) at

Manage IM Provider Support

Configure Policies to Control Access by Users of IM Service Providers

➢ To configure an external access policy to support public user access

To enable users to communicate with a public provider such as MSN or AOL, use the Set-CsExternalAccessPolicy cmdlet to set the EnablePublicCloudAccess property of the appropriate external access policy to True:

New-CsExternalAccessPolicy -Identity site:Redmond -EnablePublicCloudAccess $True

Specify Supported IM Service Providers

➢ To configure support for an IM service provider

To enable users to communicate with a new public provider, use the New-CsPublicProvider cmdlet to add the new organization to the list of approved providers:

New-CsPublicProvider -Identity "Fabrikam" -ProxyFqdn "proxyserver." -Enabled $True -VerificationLevel "AlwaysUnverifiable"

Configure Conferencing Policies to Support Anonymous Users

➢ To configure policies to allow anonymous participation in meetings

To allow users to host meetings that include anonymous users, use the Set-CsConferencingPolicy cmdlet to set the AllowAnonymousParticipantsInMeetings property of the appropriate conferencing policy to True:

Set-CsConferencingPolicy –Identity global -AllowAnonymousParticipantsInMeetings $True

For More Information

• Haiku #107: The CsExternalAccessPolicy Cmdlets at

• Haiku #128: The CsPublicProvider Cmdlets at

• No Conferencing Policy is an Island at

• The Edit External Access Policy Dialog at

• The Edit Provider Dialog at

• The Edit Conferencing Policy Dialog at

Apply Policies for External User Access to Users

Apply External User Access Policies to Users

➢ To apply an external user policy to a user account

To assign a per-user external access policy to a user, use the Grant-CsExternalAccessPolicy cmdlet.

Grant-CsExternalAccessPolicy –Identity "Ken Myer" –PolicyName "RedmondExternalAccess"

To unassign a per-user policy, use Grant-CsExternalUserAccess and set the PolicyName to a null value:

Grant-CsExternalAccessPolicy –Identity "Ken Myer" –PolicyName $null

Apply Conferencing Policies to Support Anonymous Users

➢ To configure a user policy for anonymous participation in meetings

To allow users to host meetings that include anonymous participants, use the Set-CsConferencingPolicy cmdlet and set AllowAnonymousParticipantsInMeetings to True:

Set-CsConferencingPolicy –Identity site:Redmond -AllowAnonymousParticipantsInMeetings $True

To prevent users from hosting meetings that include anonymous participants, set AllowAnonymousParticipantsInMeetings to False:

Set-CsConferencingPolicy –Identity site:Redmond -AllowAnonymousParticipantsInMeetings $False

Reset or Delete External User Access Policies

Delete a Site or User Policy for External User Access

➢ To delete a site or user policy for external user access

To delete a per-site external access policy, use the Remove-CsExternalAccessPolicy cmdlet followed by the policy Identity:

Remove-CsExternalAccessPolicy –Identity site:Redmond

You can also use this command to remove all the per-site policies:

Get-CsExternalAccessPolicy –Filter "site:*" | Remove-CsExternalAccessPolicy

To delete a per-user policy, use the Remove-CsExternalAccessPolicy cmdlet followed by the policy Identity:

Remove-CsExternalAccessPolicy –Identity "RedmondExternalAccessPolicy"

This command removes all the per-user policies:

Get-CsExternalAccessPolicy –Filter "tag:*" | Remove-CsExternalAccessPolicy

Reset the Global Policy for External User Access

➢ To reset the global policy to the default settings

To reset all the properties in the global external user access policy to their default values, use the Remove-CsExternalAccessPolicy cmdlet:

Remove-CsExternalAccessPolicy –Identity global

Note that this command will not remove the global policy. However, all the properties in that policy will be reset to their default values.

For More Information

• Haiku #107: The CsExternalAccessPolicy Cmdlets at

• No Conferencing Policy is an Island at

• The Edit Conferencing Policy Dialog at

• The Edit External Access Policy Dialog at

Filtering Instant Messages and Client Versions

Configuring Filtering for Instant Messaging (IM)

Modify the Default File Transfer Filter

➢ To modify the default file transfer filter

To modify the default file transfer filter, use the Set-CsFileTransferFilterConfiguration cmdlet and set the Identity to global. For example, this command adds the file extension .ps1 (the file extension used for Windows PowerShell scripts) to the set of file types that cannot be transferred using Lync:

Set-CsFileTransferFilterConfiguration -Identity global -Extensions @{Add=".ps1"}

And this command removes the .ps1 file extension from the list of file types that cannot be transferred using Lync:

Set-CsFileTransferFilterConfiguration -Identity global -Extensions @{Remove=".ps1"}

Create a New File Transfer Filter for a Specific Site

➢ To create a file transfer filter for a specific site

To create a new collection of file transfer filter configuration settings, use the New-CsFileTransferFilterConfiguration cmdlet:

New-CsFileTransferFilterConfiguration -Identity site:Redmond -Extensions @{Add=".ps1"}

Modify the Default URL Filter

To modify the default URL filter, use the Set-CsFileTransferFilterConfiguration cmdlet and set the Identity to global. For example, this command adds the prefix .urn to the set of Uniform Resource Identifiers (URIs) that either cannot be included in an instant message or cannot be configured as a clickable link within an instant message:

Set-CsImFilterConfiguration -Identity global -Prefixes @{Add="urn:"}

This command removes the prefix .urn from the collection of blocked URIs:

Set-CsImFilterConfiguration -Identity global -Prefixes @{Remove="urn:"}

Create a New URL Filter to Handle Hyperlinks in IM Conversations

➢ To create a new URL filter

To create a new collection of URL filter configuration settings use the New-CsImFilterConfiguration cmdlet:

Set-CsImFilterConfiguration -Identity "site:Redmond" -Prefixes @{Add="urn:"}

For More Information

• Haiku #77: The CsImFilterConfiguration Cmdlets at

• Haiku #56: The CsFileTransferFilterConfiguration Cmdlets at

• The Edit File Filter Dialog at

• The Edit URL Filter Dialog (Allow) at

• The Edit URL Filter Dialog (Block) at

• The Edit URL Filter Dialog (Allow With Warning) at .

Specify Client Versions Supported for Sign-in by a User

➢ To assign a per-user client version policy

To assign a per-user client version policy, use the Grant-CsClientVersionPolicy cmdlet:

Grant-CsClientVersionPolicy –Identity "Ken Myer" –PolicyName "RedmondClientVersionPolicy"

To unassign a per-user policy, use the Grant-CsClientVersionPolicy cmdlet and set the PolicyName parameter to a null value:

Grant-CsClientVersionPolicy –Identity "Ken Myer" –PolicyName $Null

For More Information

• Haiku #125: The CsClientVersionPolicy Cmdlets at

• The Edit Client Version Policy Dialog at

Managing Computers in Your Topology

View a List of Computers Running Lync Server 2010

➢ To view a list of computers running Lync Server

Although not quite a perfect match, the following script largely replicates the information found on the Status area on the Topology page in the Lync Server Control Panel:

$errorPref = $errorActionPreference

$errorActionPreference = "SilentlyContinue"

$arrObjects = @()

$computers = Get-CsComputer | Sort-Object Identity

foreach ($objComputer in $computers)

{

$objSite = Get-CsPool -Identity $objComputer.pool | Select-Object Site

$objReplication = $Null

$objReplication = Get-CsManagementStoreReplicationStatus -ReplicaFqdn `

$objComputer.Identity | Select-Object UpToDate

$strReplication = $objSite.site -replace("Site:","")

$objDisplayObject = New-Object PSObject

Add-Member -InputObject $objDisplayObject -memberType NoteProperty `

-Name Identity -Value $objComputer.Identity

Add-Member -InputObject $objDisplayObject -memberType NoteProperty `

-Name Pool -Value $objComputer.Pool

Add-Member -InputObject $objDisplayObject -memberType NoteProperty `

-Name Site -Value $strReplication

Add-Member -InputObject $objDisplayObject -memberType NoteProperty `

-Name UpToDate -Value $objReplication.UpToDate

$arrObjects += $objDisplayObject

}

$labels = @{Expression={$_.Identity};Label="Computer"}, `

@{Expression={$_.Pool};Label="Pool"}, `

@{Expression={$_.Site};Label="Site"}, `

@{Expression={$_.UpToDate};Label="Replication"}

$arrObjects | Format-Table $labels

$errorActionPreference = $errorPref

To use this script, copy the code, paste it into a text editor, and then save the file using a .ps1 file extension (for example, C:\Scripts\Status.ps1). From there all you have to do is run the script from within the Lync Server Management Shell. For example:

 C:\Scripts\Status.ps1

For More Information

• Haiku #81: The CsPool Cmdlets at

• Haiku #67: The CsManagementStoreReplicationStatus Cmdlets at

• Get-CsComputer Cmdlet at

View the Status of Services Running on a Computer

➢ To view the status of services running on a computer

To view the status of all the Lync Server services running on all your computers, use the following command:

Get-CsService | Select-Object Role, PoolFqdn | Sort-Object PoolFqdn, Role

To view the services running on a specific computer, use this command, replacing atl-cs-001. with the fully qualified domain name of the computer to be checked:

Get-CsService | Where-Object {$_.PoolFqdn –eq "atl-cs-001."} | Select-Object Role, PoolFqdn | Sort-Object PoolFqdn, Role

For More Information

• Haiku #71: The CsService Cmdlets at

View Details About a Service

➢ To view details for a service

To view detailed information for a particular Lync Server service or server role, use the Get-CsService cmdlet followed by the service Identity:

Get-CsService –Identity service:Registrar:atl-cs-001.

To view detailed information for all your Lync Server services or server roles, call Get-CsService without any parameters:

Get-CsService

For More Information

• Haiku #71: The CsService Cmdlets at

Start or Stop Lync Server 2010 Services

➢ To start or stop all Lync Server services on a computer

To start all the Lync Server services on a computer, use the Start-CsWindowsService cmdlet:

Start-CsWindowsService -ComputerName atl-cs-001.

Note that the ComputerName parameter is not required if you are starting the Lync Server services on the local computer.

To stop all the Lync Server services on a computer, use the Stop-CsWindowsService cmdlet:

Stop-CsWindowsService -ComputerName atl-cs-001.

➢ To start or stop a specific service

To start a specific service, use the Start-CsWindowsService cmdlet along with the Name parameter:

Start-CsWindowsService –Name "RTCRGS" -ComputerName atl-cs-001.

Use the Stop-CsWindowsService cmdlet to stop a specified service:

Stop-CsWindowsService –Name "RTCRGS" -ComputerName atl-cs-001.

For More Information

• Haiku #51: The CsWindowsService Cmdlets at

Prevent Sessions for Services

➢ To prevent new sessions for all Lync Server services on a computer

To prevent new sessions for all the Lync Server services on a computer use the following command:

Get-CsWindowsService | Stop-CsWindowsService -ComputerName atl-cs-001. –Graceful

The Graceful parameter used with the Stop-CsWindowsService cmdlet ensures that all existing sessions will be honored but no new sessions will be allowed.

➢ To prevent new sessions for a specific service

To prevent new sessions for a specific Lync Server service, use the following command:

Stop-CsWindowsService -Name "RTCRGS" -ComputerName atl-cs-001. -Graceful

For More Information

• Haiku #51: The CsWindowsService Cmdlets at

View Microsoft SIP Processing Language (MSPL) Server Applications

To return information for all of your MSPL server applications, use the Get-CsServerApplication cmdlet:

Get-CsServerApplication

The following command returns information for a specific application:

Get-CsServerApplication -Identity "service:Registrar:atl-cs-001.ExumRouting"

And this command returns information about all the applications running under a specific service:

Get-CsServerApplication -Identity "service:EdgeServer:atl-edge-001."

For More Information

• The Server Application Dialog at

Enable or Disable a Microsoft SIP Processing Language (MSPL) Server Application

➢ To enable or disable an MSPL server application

To enable an MPSL server application, use the Set-CsServerApplication cmdlet and set the Enabled property to True:

Set-CsServerApplication -Identity "Registrar:atl-cs-001.ExumRouting" -Enabled $True

To disable an MPSL server application, set the Enabled property to False:

Set-CsServerApplication -Identity "Registrar:atl-cs-001.ExumRouting" -Enabled $False

For More Information

• The Server Application Dialog at

Mark a Microsoft SIP Processing Language (MSPL) Application as Critical or Not Critical

➢ To mark or unmark an MSPL server application as critical

To mark an MPSL server application as critical, use the Set-CsServerApplication cmdlet and set the Critical property to True:

Set-CsServerApplication -Identity "Registrar:atl-cs-001.QoEAgent" -Critical $True

To mark an MPSL server application as not being critical, set the Critical property to False:

Set-CsServerApplication -Identity "Registrar:atl-cs-001.QoEAgent" -Critical $False

For More Information

• The Server Application Dialog at

View a List of Trusted Applications

➢ To view a list of trusted applications

To return information for all your trusted applications, call Get-CsTrustedApplication without any parameters:

Get-CsTrustedApplication

To return information about a single application, use the Identity parameter followed by the application Identity:

Get-CsTrustedApplication -Identity TrustPool.tapp2

For More Information

• The Trusted Application Dialog at

View the Simple URL Details

➢ To view Simple URL details

To return information about the Simple URLs configured for use in your organization, use the following command:

Get-CsSimpleUrlConfiguration | Select-Object –Expand SimpleUrl

For More Information

• Haiku #29: The CsSimpleUrlConfiguration Cmdlets at

Managing Users

Search for Lync Server 2010 Users

➢ To search for one or more users

To search for a user based on the value of a Lync Server-specific attribute, use the Get-CsUser cmdlet and the Filter parameter. For example, this command searches for all users who have not been assigned a per-user voice policy:

Get-CsUser -Filter {VoicePolicy -eq $Null}

To search for a user based on the value of a generic Active Directory attribute, use the Get-CsUser cmdlet and the LdapFilter parameter. For example, this command searches for all users who are members of the Finance department:

Get-CsUser -LDAPFilter "Department=Finance"

For More Information

• 21 User Information Cmdlets to Run Before You Die at

Add a New User to Lync Server 2010

➢ To create a new Lync Server user

To enable a user to use Lync Server, use the Enable-CsUser cmdlet:

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

The preceding command includes the SipAddressType and SipDomain parameters; this causes Lync Server to automatically create a SIP address for the user based (in this case) on the user's SamAccountName and the domain name . Alternatively, you can use the SipAddress parameter to assign a specific SIP address to a user:

Enable-CsUser -Identity "Pilar Ackerman" -RegistrarPool "atl-cs-001." –SipAddress "sip:pilar@"

For More Information

• 21 User Information Cmdlets to Run Before You Die at

• Enabling a User for Microsoft Lync Server 2010 at

• Enabling a User for Microsoft Lync Server 2010 and Enterprise Voice at

• The New Communications Server User Dialog at

• Enable-CsUser Cmdlet at

Enable or Disable Users for Lync Server 2010

➢ To disable or re-enable a previously enabled user account for Lync Server

To permanently disable a Lync Server user account, use the Disable-CsUser cmdlet:

Disable-CsUser –Identity "Ken Myer"

When you run the preceding command, the user's Lync account will be disabled and all Lync Server-related attributes (including the policies assigned to that user) will be deleted from the user account. (Note that the user's Active Directory user account will not be deleted.) If you later decide to once more give the user access to Lync Server you will need to re-run the Enable-CsUser cmdlet, reassign any per-user policies, and reset property values such as the user's line URI and SIP address.

To temporarily disable a Lync Server user account, use the Set-CsUser cmdlet to set the account's Enabled property to False:

Set-CsUser –Identity "Ken Myer" –Enabled $False

When you run the preceding command the user will still have a valid Lync Server account, and that account will retain all its current settings (including any per-user policies that have been assigned to the user). However, the user will not be able to log on to Lync Server until his or her account has been re-enabled.

To re-enable a user whose Lync Server account has been temporarily disabled, use the Set-CsUser cmdlet to set the account's Enabled property to True:

Set-CsUser –Identity "Ken Myer" –Enabled $True

For More Information

• When is a Boolean Not a Boolean? at

• Disable-CsUser at

• Set-CsUser at

Set, View, and Send a User's Dial-in Conferencing PIN

➢ To set a user’s PIN

Lync Server Windows PowerShell provides two different ways to assign a PIN number to a user. To have Lync Server randomly generate a PIN number for the user, use a command similar to this one:

Set-CsClientPin -Identity "Ken Myer"

The assigned PIN number will appear onscreen, like this:

Identity Pin PinReset

-------- --- --------

Sip:kmyer@ 55279 True

Note. It will be up to you to notify the user of his or her new PIN number; Lync Server will not automatically send these notifications for you.

Alternatively, you can include the Pin parameter and assign a specific PIN number to a user:

Set-CsClientPin -Identity "Ken Myer" -Pin 18723834

You can also pipe multiple user accounts to Set-CsClientPin and Lync Server will automatically assign a new PIN number to each of those accounts. For example:

Get-CsUser –LdapFilter "Department=IT" | Set-CsClientPin

For More Information

• Haiku #95: The CsClientPin Cmdlets at

Move Users to Another Pool

➢ To move selected users to a different server or pool

To move a user from one Registrar pool to another, use the Move-CsUser cmdlet:

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

You can also move multiple users by piping more than one user Identity (in this case, the Active Directory display name) to the Move-CsUser cmdlet:

"Ken Myer", "Pilar Ackerman", "Aidan Delaney" | Move-CsUser -Target "atl-cs-001."

➢ To move all users from one server or pool to a different server or pool

To move all the users from a specified pool to a different pool, first use the Get-CsUser cmdlet to retrieve all the users from that pool; in the following command, the Filter value {RegistrarPool –eq "dublin-cs-001."} limits the returned user accounts to those users homed on the pool dublin-cs-001.. That collection of user accounts can then be piped to the Move-CsUser cmdlet:

Get-CsUser -Filter {RegistrarPool –eq "dublin-cs-001."}| Move-CsUser -Target "atl-cs-001."

➢ To move users from one pool to a different pool by using a filter

To move a selected group of users (based on an Active Directory attribute) first use the Get-CsUser cmdlet and the LdapFilter parameter to retrieve the desired set of users. After retrieving the appropriate user accounts you can then pipe all those accounts to the Move-CsUser cmdlet:

Get-CsUser -LdapFilter "Department=Finance" | Move-CsUser -Target "atl-cs-001."

For More Information

• Haiku #10: The CsUser Cmdlets at

Assign Policies to Users

Assign a Conferencing Policy to Modify a User's Default Meeting Experience

➢ To assign a per-user conferencing policy

To assign a per-user conferencing policy to a user, use a command similar to this, specifying the Identity of the per-user policy as the parameter value for the PolicyName parameter:

Grant-CsConferencingPolicy –Identity "Ken Myer" –PolicyName "RedmondConferencingPolicy"

If you later decide to remove that conferencing policy (and thus have the user managed by the global policy or his or her site policy) use the following command, which sets the PolicyName property to a null value:

Grant-CsConferencingPolicy –Identity "Ken Myer" –PolicyName $Null

Specify Client Versions Supported for Sign-in by a User

➢ To assign a per-user client version policy

To assign a per-user client version policy to a user, use a command similar to this, specifying the Identity of the per-user policy as the parameter value for the PolicyName parameter:

Grant-CsClientVersionPolicy –Identity "Ken Myer" –PolicyName "RedmondClientVersionPolicy"

If you later decide to remove that client version policy (and thus have the user managed by the global policy, a service policy, or his or her site policy) use the following command, which sets the PolicyName property to a null value:

Grant-CsClientVersionPolicy –Identity "Ken Myer" –PolicyName $Null

Assign Specific Dial-in Conferencing PIN Security Settings to a User

➢ To assign a per-user PIN policy

To assign a per-user PIN policy to a user, use a command similar to this, specifying the Identity of the per-user policy as the parameter value for the PolicyName parameter:

Grant-CsPinPolicy –Identity "Ken Myer" –PolicyName "RedmondPinPolicy"

If you later decide to remove that PIN policy (and thus have the user managed by the global policy or his or her site policy) use the following command, which sets the PolicyName property to a null value:

Grant-CsPinPolicy –Identity "Ken Myer" –PolicyName $Null

Apply External User Access Policies to Users

➢ To apply an external user policy to a user account

To assign a per-user external access policy to a user, use a command similar to this, specifying the Identity of the per-user policy as the parameter value for the PolicyName parameter:

Grant-CsExternalAccessPolicy –Identity "Ken Myer" –PolicyName "RedmondExternalAccessPolicy"

If you later decide to remove that external access policy (and thus have the user managed by the global policy or his or her site policy) use the following command, which sets the PolicyName property to a null value:

Grant-CsExternalAccessPolicy –Identity "Ken Myer" –PolicyName $Null

Configure Archiving of a User's Communications

➢ To assign a per-user archiving policy

To assign a per-user archiving policy to a user, use a command similar to this, specifying the Identity of the per-user policy as the parameter value for the PolicyName parameter:

Grant-CsArchivingPolicy –Identity "Ken Myer" –PolicyName "RedmondArchivingPolicy"

If you later decide to remove that archiving policy (and thus have the user managed by the global policy or his or her site policy) use the following command, which sets the PolicyName property to a null value:

Grant-CsArchivingPolicy –Identity "Ken Myer" –PolicyName $Null

Assign a Location Policy to a User

➢ To assign a per-user location policy

To assign a per-user conferencing policy to a user, use a command similar to this, specifying the Identity of the per-user policy as the parameter value for the PolicyName parameter:

Grant-CsLocationPolicy –Identity "Ken Myer" –PolicyName "RedmondLocationPolicy"

For More Information

• Assigning Policies at

Enable a User for Enterprise Voice

➢ To enable a user account for Enterprise Voice

To enable a user for Enterprise Voice, use Set-CsUser to set the EnterpriseVoiceEnabled property to True and to assign the user a unique line URI:

Set-CsUser –Identity "Ken Myer" -EnterpriseVoiceEnabled $True –LineUri "TEL:+14255551297"

For More Information

• Enabling a User for Microsoft Lync Server 2010 and Enterprise Voice at

• How Can I Configure the Telephony Options for a User? at

Configure Telephony for Users

➢ To configure telephony for a specific user account

To configure telephony options for a user, use the Set-CsUser cmdlet. The following command enables a user for Enterprise Voice and assigns that user a line URI:

Set-CsUser –Identity "Ken Myer" –EnterpriseVoiceEnabled $True –LineUri "TEL:+14255551219"

To enable remote call control for a user, use the following command:

Set-CsUser –Identity "Ken Myer" -RemoteCallControlTelephonyEnabled $True –LineUri "TEL:+14255551219"

This command enables PC-to-PC audio communications for the user, but without enabling either remote call control or Enterprise Voice:

Set-CsUser –Identity "Ken Myer" –EnterpriseVoiceEnabled $False -RemoteCallControlTelephonyEnabled $False –LineUri "TEL:+14255551219"

For More Information

• How Can I Configure the Telephony Options for a User? at

Managing On-Premises Meetings

Configuring Conferencing Settings

Modify the Default Conferencing User Experience

➢ To modify the global conferencing policy

To modify the global policy, use the Set-CsConferencingPolicy cmdlet and set the Identity to global:

Set-CsConferencingPolicy –Identity global -AllowAnonymousParticipantsInMeetings $False -EnableDialInConferencing $False

Note that you can also modify the global policy by leaving out the Identity parameter altogether:

Set-CsConferencingPolicy -AllowAnonymousParticipantsInMeetings $False -EnableDialInConferencing $False

Create or Modify Conferencing User Experience for a Site or Group of Users

➢ To create a new user or site conferencing policy

To create a per-site conferencing policy, use the site: prefix and the name of the site as the Identity:

New-CsConferencingPolicy –Identity site:Redmond -AllowAnonymousParticipantsInMeetings $False -EnableDialInConferencing $False

To create a per-user conferencing policy, simply use a unique name for the policy Identity:

New-CsConferencingPolicy –Identity "RedmondConferencingPolicy" -AllowAnonymousParticipantsInMeetings $False -EnableDialInConferencing $False

➢ To modify an existing user or site policy

Use the Set-CsConferencingPolicy cmdlet to modify a per-user or per-site policy:

Set-CsConferencingPolicy –Identity site:Redmond -AllowAnonymousParticipantsInMeetings $True -EnableDialInConferencing $True

Be sure to specify a policy Identity. If you leave off the Identity Set-CsConferencingPolicy will modify the global policy instead.

To make the same modification to all your conferencing policies (including the global policy), use a command similar to this one:

Get-CsConferencingPolicy | Set-CsConferencingPolicy -AllowAnonymousParticipantsInMeetings $True

This command modifies only your per-user conferencing policies:

Get-CsConferencingPolicy –Filter "tag:*" | Set-CsConferencingPolicy -AllowAnonymousParticipantsInMeetings $True

Delete a Conferencing Policy for a Site or Group of Users

➢ To delete a user or site conferencing policy

To delete a per-user or per-site policy, using a command similar to this:

Remove-CsConferencingPolicy –Identity site:Redmond

If you try to remove a per-user policy that is currently assigned to one or more users you will be prompted to first unassign the policy from each user and then delete the policy. (You can remove a policy without unassigning it, but, from then on, any time you call a user management cmdlet you will receive warnings about policies that can no longer be found.) To unassign a per-user policy and then remove that policy use commands similar to these:

Get-CsUser -Filter {ConferencingPolicy -eq "RedmondConferencingPolicy"} | Grant-CsConferencingPolicy -PolicyName $Null

Remove-CsConferencingPolicy –Identity "RedmondConferencingPolicy"

For More Information

• No Conferencing Policy is an Island at

• The Edit Conferencing Policy Dialog at

Configuring the Meeting Join Experience

Modify the Default Meeting Join Experience

➢ To modify the default meeting join settings

To modify the default meeting join settings use the Set-CsMeetingConfiguration cmdlet and set the Identity to global:

Set-CsMeetingConfiguration -Identity global -DesignateAsPresenter Everyone

Alternatively, you can omit the Identity altogether:

Set-CsMeetingConfiguration -DesignateAsPresenter Everyone

If you leave off the Identity, Set-CsMeetingConfiguration will automatically modify the global settings.

Create or Modify Meeting Join Settings for a Site or Pool

➢ To create new meeting join settings

To create new meeting configuration settings for a site, use a command similar to this:

New-CsMeetingConfiguration -Identity site:Redmond -DesignateAsPresenter Everyone

To create new meeting configuration settings for a pool, set the Identity parameter to the service location for the User Server used in that pool:

New-CsMeetingConfiguration -Identity "service:UserServer:atl-cs-001." -DesignateAsPresenter Everyone

➢ To modify an existing site or pool meeting join configuration

To modify an existing collection of meeting configuration settings, use the Set-CsMeetingConfiguration cmdlet:

Set-CsMeetingConfiguration -Identity site:Redmond -DesignateAsPresenter None

When calling Set-CsMeetingConfiguration, be sure to include the Identity for the meeting configuration settings to be modified. If you do not, Set-CsMeetingConfiguration will automatically modify the global settings instead.

Delete Meeting Join Settings for a Site or Pool

➢ To delete meeting join settings for a site or pool

To remove the meeting configuration settings for a site, use a command similar to this:

Remove-CsMeetingConfiguration -Identity site:Redmond

To remove the meeting configuration settings for a pool, use a command similar to this one, which specifies the identity of the User Server in the pool:

Remove-CsMeetingConfiguration -Identity "service:UserServer:atl-cs-001."

For More Information

• Haiku #84: The CsMeetingConfiguration Cmdlets at

• The Edit Meeting Configuration Dialog at

Configure Settings for a Dial-in Conferencing Access Number

➢ To create or modify a dial-in access number

To create a new dial-in conferencing access number, use the New-CsDialInConferencingAccessNumber cmdlet:

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

Use the Set-CsDialInConferencingAccessNumber cmdlet to modify an existing access number:

Set-CsDialInConferencingAccessNumber -Identity "sip:RedmondDialIn@" -Regions "Redmond", "Seattle"

Delete a Dial-in Conferencing Access Number

➢ To delete a dial-in conferencing access number

To delete a dial-in access number, use the Remove-CsDialInConferencingAccessNumber cmdlet and specify the number's SIP address as the Identity:

Remove-CsDialInConferencingAccessNumber -Identity "sip:RedmondDialIn@"

You can also use a command like this one to delete all your dial-in access numbers:

Get-CsDialInConferencingAccessNumber | Remove-CsDialInConferencingAccessNumber

For More Information

• Haiku #126: The CsDialInConferencingAccessNumber Cmdlets at

• The New Dial-in Access Number Dialog at

Configure Dial-in Conferencing Personal Identification Number (PIN) Rules

Modify the Default Dial-in Conferencing PIN Settings

➢ To modify the global PIN policy

To modify the global PIN policy, use the Set-CsPinPolicy cmdlet and set the Identity to global:

Set-CsPinPolicy -Identity global -MinPasswordLength 10

Alternatively, you can leave out the Identity parameter altogether:

Set-CsPinPolicy -MinPasswordLength 10

If you do not specify an Identity, Set-CsPinPolicy will modify the global policy.

Create or Modify Dial-in Conferencing PIN Settings for a Site or Group of Users

➢ To create a user or site PIN policy

To create a per-site policy, set the Identity to the prefix site: followed by the name of the site:

New-CsPinPolicy -Identity "site:Redmond" -MinPasswordLength 10

To create a per-user policy, simply use a unique policy name as the Identity:

New-CsPinPolicy -Identity "RedmondPinPolicy" -MinPasswordLength 10

➢ To change a user or site PIN policy

To modify a per-user or per-site PIN policy, use the Set-CsPinPolicy cmdlet:

Set-CsPinPolicy -Identity "site:Redmond" -MinPasswordLength 6

Delete Dial-in Conferencing PIN Settings for a Site or Group of Users

➢ To delete a user or site PIN policy

To delete a per-user or per-site policy, use the Remove-CsPinPolicy cmdlet:

Remove-CsPinPolicy –Identity site:Redmond

This command removes all the per-site PIN policies:

Get-CsPinPolicy –Filter "site:*" | Remove-CsPinPolicy

And this one removes all the per-user PIN policies:

Get-CsPinPolicy –Filter "tag:*" | Remove-CsPinPolicy

For More Information

• Haiku #72: The CsPinPolicy Cmdlets at

• The Edit PIN Policy Dialog at

Managing Monitoring

Create a Site Policy for Call Detail Recording

➢ To create a CDR policy for a site

To enable call detail recording (CDR) for a site, use the New-CsCdrConfiguration cmdlet:

New-CsCdrConfiguration -Identity site:Redmond -EnableCDR $True –EnablePurging $True –KeepCallDetailForDays 30 –KeepErrorReportForDays 30

For More Information

• Haiku #28: The CsCdrConfiguration Cmdlets at

• The Call Detail Recording Setting Dialog at

Create a Site Policy for Quality of Experience

➢ To create a QoE policy for a site

To enable Quality of Experience monitoring for a site, use the New-CsQoEConfiguration cmdlet:

New-CsQoEConfiguration -Identity site:Redmond –EnableQoE $True –EnablePurging $True -KeepQoEDataForDays 30

For More Information

• Haiku #11: The CsQoEConfiguration Cmdlets at

• The Quality of Experience Setting Dialog at

Enable Call Detail Recording

➢ To enable CDR

To enable Call Detail Recording for a site, set the value of the EnableCDR property to True:

Set-CsCdrConfiguration -Identity site:Redmond -EnableCDR $True

For More Information

• Haiku #28: The CsCdrConfiguration Cmdlets at

• The Call Detail Recording Setting Dialog at

Enable Quality of Experience

➢ To enable QoE

To enable Quality of Experience monitoring for a site, set the value of the EnableQoE property to True:

Set-CsQoEConfiguration -Identity site:Redmond –EnableQoE $True

For More Information

• Haiku #11: The CsQoEConfiguration Cmdlets at

• The Quality of Experience Setting Dialog at

Configure Call Detail Recording

➢ To specify retention of CDR data

To specify the number of days CDR data will be retained, use the Set-CsCdrConfiguration cmdlet and the KeepCallDetailForDays and KeepErrorReportForDays parameters:

Set-CsCdrConfiguration -Identity site:Redmond –EnablePurging $True –KeepCallDetailForDays 30 –KeepErrorReportForDays 30

For More Information

• Haiku #28: The CsCdrConfiguration Cmdlets at

• The Call Detail Recording Setting Dialog at

Configure Quality of Experience

➢ To specify retention of QoE data

To specify the number of days QoE data will be retained, use the Set-CsQoEConfiguration cmdlet and the KeepQoEDataForDays parameter:

Set-CsQoEConfiguration -Identity site:Redmond –EnablePurging $True -KeepQoEDataForDays 30

For More Information

• Haiku #11: The CsQoEConfiguration Cmdlets at

• The Quality of Experience Setting Dialog at

Delete a Site Policy for Call Detail Recording

➢ To delete a CDR policy

To delete the Call Detail Recording configuration settings for site, use the Remove-CsCdrConfiguration cmdlet:

Remove-CsCdrConfiguration -Identity site:Redmond

To delete all the per-site settings, use this command:

Get-CsCdrConfiguration –Filter "site:*" | Remove-CsCdrConfiguration

For More Information

• Haiku #28: The CsCdrConfiguration Cmdlets at

• The Call Detail Recording Setting Dialog at

Delete a Site Policy for Quality of Experience

➢ To delete a QoE policy

To delete the Quality of Experience configuration settings for site, use the Remove-CsQoEConfiguration cmdlet:

Remove-CsQoEConfiguration -Identity site:Redmond

To delete all the per-site settings, use this command:

Get-CsQoEConfiguration –Filter "site:*" | Remove-CsQoEConfiguration

For More Information

• Haiku #11: The CsQoEConfiguration Cmdlets at

• The Quality of Experience Setting Dialog at

Configuring Your Network

Enabling Call Admission Control

➢ To enable CAC

To enable Call Admission Control, use the Set-CsNetworkConfiguration cmdlet and set the EnableBandwidthPolicyCheck parameter to True:

Set-CsNetworkConfiguration –Identity global –EnableBandwidthPolicyCheck $True

To disable Call Admission Control, set the EnableBandwidthPolicyCheck parameter to False:

Set-CsNetworkConfiguration –Identity global –EnableBandwidthPolicyCheck $False

For More Information

• The Set-CsNetworkConfiguration Cmdlet at

• Haiku #147: The CsNetworkConfiguration Cmdlets at

Enabling Media Bypass

➢ To enable and configure media bypass

To enable media bypass for Call Admission Control, you must first use the Get-CsNetworkConfiguration cmdlet to create an object reference to your current media bypass settings. You can modify those bypass settings in memory, then use the Set-CsNetworkConfiguration cmdlet to write the changes to Lync Server:

$x = (Get-CsNetworkConfiguration).MediaBypassSettings

$x.AlwaysBypass = $True

$x.Enabled = $True

$x.InternalBypassMode = "Any"

Set-CsNetworkConfiguration -MediaBypassSettings $x

A similar process is used to disable media bypass for Call Admission Control:

$x = (Get-CsNetworkConfiguration).MediaBypassSettings

$x.AlwaysBypass = $False

$x.Enabled = $False

$x.InternalBypassMode = $Null

Set-CsNetworkConfiguration -MediaBypassSettings $x

For More Information

• The Set-CsNetworkConfiguration Cmdlet at

• Haiku #147: The CsNetworkConfiguration Cmdlets at

Configuring Location Policy

➢ To view location policies

To view all your location policies, use the Set-CsLocationPolicy cmdlet:

Get-CsLocationPolicy

This command retrieves all the location policies configured at the site scope:

Get-CsLocationPolicy –Filter "site:*"

And this command retrieves the specified per-user location policy:

Get-CsLocationPolicy –Identity "RedmondLocationPolicy"

➢ To create a new location policy

To create a new location policy, use the New-CsLocationPolicy cmdlet:

New-CsLocationPolicy -Identity site:Redmond -EnhancedEmergencyServicesEnabled $True

Location policies can be created at either the site or the per-user scope.

➢ To modify a location policy

To modify a location policy, use the Set-CsLocationPolicy cmdlet:

Set-CsLocationPolicy -Identity site:Redmond -EnhancedEmergencyServicesEnabled $False

➢ To delete a location policy

To delete a location policy, use the Remove-CsLocationPolicy cmdlet:

Remove-CsLocationPolicy -Identity site:Redmond

The following command removes all the location policies configured at the site scope:

Get-CsLocationPolicy –Filter "site:*" | Remove-CsLocationPolicy

And this command removes all the location policies configured at the per-user scope:

Get-CsLocationPolicy –Filter "tag:*" | Remove-CsLocationPolicy

For More Information

• Haiku #14: The CsLocationPolicy Cmdlets at

• The Edit Location Policy Dialog at

Configuring Bandwidth Policy Profile

➢ To create a new bandwidth policy profile

To create a new bandwidth policy profile use the New-CsNetworkBandwidthPolicyProfile cmdlet:

New-CsNetworkBandwidthPolicyProfile -Identity LowBWLimits -AudioBWLimit 2000 -AudioBWSessionLimit 200 -VideoBWLimit 1400 -VideoBWSessionLimit 500

➢ To modify a bandwidth policy profile

To modify a bandwidth policy profile, use the Set-CsNetworkBandwidthPolicyProfile cmdlet:

Set-CsNetworkBandwidthPolicyProfile -Identity LowBWLimits -AudioBWLimit 1000

➢ To delete a bandwidth policy profile

To delete a bandwidth policy profile, use the Remove-CsNetworkBandwidthPolicyProfile cmdlet:

Remove-CsNetworkBandwidthPolicyProfile -Identity LowBWLimits

This command deletes all your bandwidth policy profiles:

Get-CsNetworkBandwidthPolicyProfile | Remove-CsNetworkBandwidthPolicyProfile

For More Information

• Get-CsNetworkBandwidthPolicyProfile Cmdlet at

• New-CsNetworkBandwidthPolicyProfile at

• Remove-CsNetworkBandwidthPolicyProfile at

• Set-CsNetworkBandwidthPolicyProfile at

Configuring Network Regions

➢ To create a network region

To create a network region use the New-CsNetworkRegion cmdlet. Note that each new region must be associated with a central site:

New-CsNetworkRegion -Identity NorthAmerica -Description "All North American Locations" -CentralSite Redmond-NA-MLS -AudioAlternatePath $False -VideoAlternatePath $False

➢ To modify a network region

To modify an existing network region, use the Set-CsNetworkRegion cmdlet:

Set-CsNetworkRegion -Identity EMEA -VideoAlternatePath $False

➢ To delete a network region

To remove a network region, use the Remove-CsNetworkRegion cmdlet:

Remove-CsNetworkRegion -Identity NorthAmerica

This command removes all the network regions configured for use in your organization:

Get-CsNetworkRegion | Remove-CsNetworkRegion

And this command removes all the network regions associated with the Redmond central site:

Get-CsNetworkRegion | Where-Object {$_.CentralSite -eq "site:Redmond"} | Remove-CsNetworkRegion

For More Information

• Haiku #123: The CsNetworkRegion Cmdlets at

Configuring Network Sites

➢ To create a network site

To create a new network site, use the New-CsNetworkSite cmdlet:

New-CsNetworkSite -Identity Paris -NetworkRegionID EMEA -BWPolicyProfileID LowBWLimits

➢ To modify a network site

To modify an existing network site, use the Set-CsNetworkSite cmdlet:

Set-CsNetworkSite -Identity Vancouver -BWPolicyProfileID LowBWLimits

➢ To delete a network site

To remove a network site, use the Remove-CsNetworkSite cmdlet:

Remove-CsNetworkSite -Identity Vancouver

This command removes all the network sites configured for use in your organization:

Get-CsNetworkSite | Remove-CsNetworkSite

And this one removes all the network sites associated with the Northwest region:

Get-CsNetworkSite | Where-Object {$_.NetworkRegionID –eq "Northwest"} | Remove-CsNetworkSite

For More Information

• Get-CsNetworkSite at

• New-CsNetworkSite at

• Remove-CsNetworkSite at

• Set-CsNetworkSite at

Configuring Network Subnets

➢ To create a network subnet

To create a new network subnet, use the New-CsNetworkSubnet cmdlet:

New-CsNetworkSubnet -Identity 172.11.15.0 -MaskBits 24 -NetworkSiteID Vancouver

➢ To modify a network subnet

To modify a network subnet, use the Set-CsNetworkSubnet cmdlet:

Set-CsNetworkSubnet -Identity 172.11.15.0 -MaskBits 25 -NetworkSiteID Chicago

➢ To delete a network subnet

To delete a network subnet, use the Remove-CsNetworkSubnet cmdlet:

Remove-CsNetworkSubnet -Identity 172.11.15.0

To delete all your subnets, use this command:

Get-CsNetworkSubnet | Remove-CsNetworkSubnet

Or use this command to delete all the subnets on the network segment 192.168.*.*:

Get-CsNetworkSubnet –Filter "192.168.*" | Remove-CsNetworkSubnet

For More Information

• Haiku #129: The CsNetworkSubnet Cmdlets at

Configuring Network Region Links

To create a network region link

To create a new network region link, use the New-CsNetworkRegionLink cmdlet, specifying the two regions to be connected by the link. Note that it does not matter which region is listed as NetworkRegionID1 and which region is listed as NetworkRegionID2:

New-CsNetworkRegionLink -Identity NA_EMEA -NetworkRegionID1 NorthAmerica -NetworkRegionID2 EMEA -BWPolicyProfileID LowBWLimits

➢ To modify a network region link

To modify a network region link, use the Set-CsNetworkRegionLink cmdlet:

Set-CsNetworkRegionLink -Identity NA_EMEA -BWPolicyProfileID HighBWLimits

➢ To delete a network region link

To delete a network region link use the Remove-CsNetworkRegionLink cmdlet:

Remove-CsNetworkRegionLink -Identity NA_EMEA

This command removes all the network region links configured for use in your organization:

Get-CsNetworkRegionLink | Remove-CsNetworkRegionLink

For More Information

• Haiku #134: The CsNetworkRegionLink Cmdlets at

Configuring Network Region Routes

➢ To create a network region route

To create a new network region route, use the New-CsNetworkInterRegionRoute cmdlet, specifying the two regions to be connected by the route. Note that it does not matter which region is listed as NetworkRegionID1 and which region is listed as NetworkRegionID2:

New-CsNetworkInterRegionRoute -Identity NA_APAC_Route -NetworkRegionID1 NorthAmerica -NetworkRegionID2 APAC -NetworkRegionLinkIDs "NA_EMEA,EMEA_APAC"

➢ To modify a network region route

To modify a network region route, use the Set-CsNetworkInterRegionRoute cmdlet:

Set-CsNetworkInterRegionRoute -Identity NA_APAC_Route -NetworkRegionLinkIDs "NA_SA,SA_APAC"

➢ To delete a network region route

To remove a network region route, use the Remove-CsNetworkInterRegionRoute cmdlet:

Remove-CsNetworkInterRegionRoute -Identity NA_APAC_Route

This command removes all the network region routes configured for use in your organization:

Get-CsNetworkInterRegionRoute | Remove-CsNetworkInterRegionRoute

And this one removes all the region routes associated with the NorthAmerica region:

Get-CsNetworkInterRegionRoute | Where-Object {$_.NetworkRegionID1 -eq "NorthAmerica" -or $_.NetworkRegionID2 -eq "NorthAmerica"} | Remove-CsNetworkInterRegionRoute

For More Information

• Get-CsNetworkInterRegionRoute at

• New-CsNetworkInterRegionRoute at

• Remove-CsNetworkInterRegionRoute at

• Set-CsNetworkInterRegionRoute at

Prevent New Connections to Lync Server 2010 for Server Maintenance

Prevent New Connections to Lync Server

➢ To prevent new connections to Lync Server 2010

To prevent new connections to Lync Server, use the Set-Service cmdlet to pause the RTCSRV service (that is, the Front End service):

Set-Service –Name RTCSRV –Status Paused

For More Information

• The Set-Service Cmdlet at

Delegating Control of Lync Server 2010

Assigning an RBAC Role to a User

Assigning a User to a Security Group

To assign an RBAC role to a user you simply make that user a member of the security group associated with the RBAC role; for example, to assign a user to the CsHelpDesk role all you have to do is make that user a member of the CsHelpDesk group. Lync Server 2010 does not provide any cmdlets that can be used to assign a user to a security group. However, you can assign a user to a security group by using the following Windows PowerShell script:

$strFilter = "(&(objectCategory=Group)(SamAccountName=" + $args[0] +"))"

 

$objDomain = New-Object System.DirectoryServices.DirectoryEntry

 

$objSearcher = New-Object System.DirectoryServices.DirectorySearcher

$objSearcher.SearchRoot = $objDomain

$objSearcher.Filter = $strFilter

$objSearcher.SearchScope = "Subtree"

 

$colProplist = "distinguishedName"

foreach ($i in $colPropList)

{[void] $objSearcher.PropertiesToLoad.Add($i)}

 

$colResults = $objSearcher.FindAll()

 

foreach ($objResult in $colResults)

{$groupDN = $objResult.Path}

 

$userDN = (Get-CsUser -Identity $args[1]).DistinguishedName

$user = [ADSI] "LDAP://$userDN"

 

$group = [ADSI] $groupDN

 

$group.Add($user.PsBase.Path)

To use this script, copy the code, paste it into a text editor, and then save the file using a .ps1 file extension (for example, C:\Scripts\Assign-RBACRole.ps1). From there all you have to do is run the script, taking care to supply the RBAC role name (e.g., CsHelpDesk) and the Identity of the user being assigned the role (e.g., Ken Myer):

 C:\Scripts\Assign-RBACRole.ps1 "CsHelpDesk" "Ken Myer"

For More Information

• Add a User to an RBAC Group at

Managing Response Groups

Managing Agent Groups

Create an Agent Group

➢ To create an agent group

To create a new Response Group agent group, use the New-CsRgsAgentGroup cmdlet. This command uses the AgentsByUri parameter to add individual users to the agent group:

New-CsRgsAgentGroup -Parent service:ApplicationServer:atl-cs-001. -Name "Help Desk Group" -AgentsByUri "sip:kenmyer@","sip:pilarackerman@"

By comparison, this command uses the DistributionGroupAddress parameter to add all the members of the helpdesk@ distribution group to the agent group:

New-CsRgsAgentGroup -Parent service:ApplicationServer:atl-cs-001. -Name "Help Desk Group" -DistributionGroupAddress "helpdesk@"

Change Agent Group Settings or Members

➢ To change agent group settings or membership

To change a Response Group agent group you must first use the Get-CsRgsAgentGroup cmdlet to retrieve an object reference to the agent group to be changed. After making your changes in memory, use the Set-CsRgsAgentGroup cmdlet to write those changes to Lync Server.

These commands change the routing method for an agent group:

$x = Get-CsRgsAgentGroup -Identity service:ApplicationServer:atl-cs-001. -Name "Help Desk"

$x.RoutingMethod = "RoundRobin"

Set-CsRgsAgentGroup -Instance $x

This set of commands changes the distribution address for an agent group:

$x = Get-CsRgsAgentGroup -Identity service:ApplicationServer:atl-cs-001. -Name "Help Desk"

$x.DistributionGroupAddress = "helpdesk@"

Set-CsRgsAgentGroup -Instance $x

The following commands add a new agent to an agent group:

$x = Get-CsRgsAgentGroup -Identity service:ApplicationServer:atl-cs-001. -Name "Help Desk"

$x.AgentsByUri.Add("sip:kenmyer@")

Set-CsRgsAgentGroup -Instance $x

And these commands remove an agent from an agent group:

$x = Get-CsRgsAgentGroup -Identity service:ApplicationServer:atl-cs-001. -Name "Help Desk"

$x.AgentsByUri.Remove("sip:kenmyer@")

Set-CsRgsAgentGroup -Instance $x

Delete an Agent Group

➢ To delete an agent group

To remove a Response Group agent group, use the Remove-CsRgsAgentGroup cmdlet:

Get-CsRgsAgentGroup -Identity service:ApplicationServer:atl-cs-001. -Name "Help Desk" | Remove-CsRgsAgentGroup

This command deletes all the agent groups currently configured for use in your organization:

Get-CsRgsAgentGroup | Remove-CsRgsAgentGroup

For More Information

• Haiku #12: The CsRgsAgentGroup Cmdlets at

Managing Response Group Queues

Create a Response Group Queue

➢ To create a queue

To create a new Response Group queue, use the New-CsRgsQueue cmdlet. The following set of commands creates a new queue, and uses the New-CsRgsCallAction cmdlet to specify what should happen if the queue receives too many calls at the same time:

$x = New-CsRgsCallAction -Action TransferToVoicemailUri -Uri "sip:+14255551298@"

New-CsRgsQueue -Parent service:ApplicationServer:atl-cs-001. -Name "Help Desk" -OverflowCandidate "OldestCall" -OverflowAction $x -OverflowThreshold 2

Change a Response Group Queue

➢ To change a queue

To modify a Response Group queue, you must first use the Get-CsRgsQueue cmdlet to retrieve an object reference to the queue to be changed. After making your changes in memory, use the Set-CsRgsQueue cmdlet to write those changes to Lync Server:

$x = Get-CsRgsQueue -Identity Service:ApplicationServer:atl-cs-001. -Name "Help Desk"

$x.OverflowCandidate = "NewestCall"

Set-CsRgsQueue -Instance $x

Delete a Response Group Queue

➢ To delete a queue

To delete a Response Group queue, use the Remove-CsRgsQueue cmdlet:

Get-CsRgsQueue -Identity service:ApplicationServer:atl-cs-001. -Name "Help Desk Queue" | Remove-CsRgsQueue

The following command removes all the Response Group queues configured for use in your organization:

Get-CsRgsQueue | Remove-CsRgsQueue

For More Information

• Haiku #23: The CsRgsQueue Cmdlets at

Managing Response Group Workflows

Create a Response Group Workflow

Create a Hunt Group Workflow

➢ To create a hunt group workflow

To create a hunt group workflow, use the New-CsRgsWorkflow cmdlet:

$prompt = New-CsRgsPrompt -TextToSpeechPrompt "Welcome to the help desk."

$queue = (Get-CsRgsQueue -Identity service:ApplicationServer:atl-cs-001. -Name "Help Desk").Identity

$callAction = New-CsRgsCallAction -Prompt $prompt -Action TransferToQueue -QueueId $queue

New-CsRgsWorkflow -Parent service:ApplicationServer:atl-cs-001. -Name "Help Desk" -PrimaryUri "sip:helpdesk@" -DefaultAction $callAction

Create an Interactive Workflow

➢ To create an Interactive workflow

To create an interactive workflow, use the New-CsRgsWorkflow cmdlet:

$ServiceId = "service:ApplicationServer:rtc."

$Group_Sales = New-CsRgsAgentGroup -Parent $ServiceId -Name "Contoso Sales" -AgentAlertTime 20 -ParticipationPolicy Informal -RoutingMethod LongestIdle -AgentsByUri("sip:franz@","sip:marco@")

$Group_Support = New-CsRgsAgentGroup -Parent $ServiceId -Name "Contoso Support" -AgentAlertTime 20 -ParticipationPolicy Informal -RoutingMethod LongestIdle -AgentsByUri("sip:david@","sip:john@")

$Queue_Sales = New-CsRgsQueue -Parent $ServiceId -Name "Contoso Sales"

-AgentGroupIDList($Group_Sales.Identity)

$Queue_Support = New-CsRgsQueue -Parent $ServiceId -Name "Contoso Support" -AgentGroupIDList($Group_Support.Identity)

$PromptA1 = New-CsRgsPrompt -TextToSpeechPrompt "Please wait while we're connecting you with the Contoso Sales department."

$ActionA1 = New-CsRgsCallAction -Prompt $PromptA1 -Action TransferToQueue -QueueID $Queue_Sales.Identity

$Answer1 = New-CsRgsAnswer -Action $ActionA1 -DtmfResponse 1

$PromptA2 = New-CsRgsPrompt -TextToSpeechPrompt "Please wait while we're connecting you with the Contoso Support department."

$ActionA2 = New-CsRgsCallAction -Prompt $PromptA2 -Action TransferToQueue -QueueID $Queue_Support.Identity

$Answer2 = New-CsRgsAnswer -Action $ActionA2 -DtmfResponse 2

$PromptQ = New-CsRgsPrompt -TextToSpeechPrompt "Thank you for calling Contoso. To speak with a Sales representative, press 1. To be connected with our Support line, press 2."

$Question = New-CsRgsQuestion -Prompt $PromptQ -AnswerList ($Answer1, $Answer2)

$ActionWM = New-CsRgsCallAction -Action TransferToQuestion -Question $Question

$Workflow = New-CsRgsWorkflow -Parent $ServiceId -Name "Contoso Helpdesk" -Description "The Contoso Helpdesk line." -PrimaryUri "sip:helpdesk@" -LineUri "tel:+14255554321" -DisplayNumber "+1 (425) 555-4321" -Active $true -Anonymous $true -DefaultAction $ActionWM

Change a Response Group Workflow

Change a Hunt Group Workflow

➢ To change settings for a hunt group workflow

To modify a hunt group workflow, use the Get-CsRgsWorkflow cmdlet to create an object reference to the workflow to be modified, make your changes in memory, and then use the Set-CsRgsWorfklow cmdlet to write those changes to Lync Server:

$businessHours = Get-CsRgsHoursOfBusiness service:ApplicationServer:atl-cs-001. -Name "US Business Hours"

$y = Get-CsRgsWorkflow service:ApplicationServer:atl-cs-001. -Name "Help Desk"

$y.BusinessHoursId = $businessHours.Identity

Set-CsRgsWorkflow -Instance $y

Change an Interactive Workflow

➢ To change an interactive workflow

To modify an interactive workflow, use the Get-CsRgsWorkflow cmdlet to create an object reference to the workflow to be modified, make your changes in memory, and then use the Set-CsRgsWorfklow cmdlet to write those changes to Lync Server:

$musicFile = Get-Content -ReadCount 0 -Encoding Byte C:\MediaFiles\Hold.wav | Import-CsRgsAudioFile -Identity Service:ApplicationServer:atl-cs-001. -FileName "HelpDeskHoldMusic.wav"

$y = Get-CsRgsWorkflow -Identity Service:ApplicationServer:atl-cs-001. -Name "Help Desk"

$y.CustomMusicOnHoldFile = $musicFile

Set-CsRgsWorkflow -Instance $y

Delete a Response Group Workflow

➢ To delete a workflow

To delete a Response Group workflow use the Get-CsRgsWorkflow cmdlet to return an instance of the workflow to be deleted, then pipe that instance to the Remove-CsRgsWorkflow cmdlet:

Get-CsRgsWorkflow service:ApplicationServer:atl-cs-001. -Name "Help Desk Workflow" | Remove-CsRgsWorkflow

This command deletes all the workflows configured for use in your organization

Get-CsRgsWorkflow | Remove-CsRgsWorkflow

For More Information

• Get-CsRgsWorkflow at

• New-CsRgsWorkflow at

• Remove-CsRgsWorkflow at

• Set-CsRgsWorkflow at

Configuring Security

Create a New Registrar

➢ To create a Registrar

To create a new collection of proxy configuration settings, use the New-CsProxyConfiguration cmdlet:

New-CsProxyConfiguration -Identity "service:Registrar:atl-cs-001." -UseCertificateForClientToProxyAuth $True –UseKerberosForClientToProxyAuth $True –UseNtlmForClientToProxyAuth $True

For More Information

• The Edit Registrar Setting Dialog at

Modify an Existing Registrar

➢ To modify an existing Registrar

To modify an existing collection of proxy configuration settings, use the Set-CsProxyConfiguration cmdlet:

Set-CsProxyConfiguration -Identity "service:Registrar:atl-cs-001." -UseCertificateForClientToProxyAuth $False

For More Information

• The Edit Registrar Setting Dialog at

Delete a Registrar

➢ To delete a Registrar

To delete a collection of proxy configuration settings, use the Remove-CsProxyConfiguration cmdlet:

Remove-CsProxyConfiguration -Identity "service:Registrar:atl-cs-001."

This command removes all the proxy configuration settings assigned to the service scope:

Get-CsProxyConfiguration –Filter "service:*" | Remove-CsProxyConfiguration

And this command removes all the proxy configuration settings assigned to your Registrars:

Get-CsProxyConfiguration –Filter "service:Registrar:*" | Remove-CsProxyConfiguration

For More Information

• The Edit Registrar Setting Dialog at

Create a New Web Service

➢ To create a Web Service

To create a new collection of Web Service configuration settings, use the New-CsWebServiceConfiguration cmdlet:

New-CsWebServiceConfiguration -Identity site:Redmond –UseWindowsAuth Negotiate –UsePinAuth $False

For More Information

• Haiku #122: The CsWebServiceConfiguration Cmdlets at

Modify an Existing Web Service

➢ To modify an existing Web Service

To modify an existing collection of Web Service configuration settings, use the Set-CsWebServiceConfiguration cmdlet:

Set-CsWebServiceConfiguration -Identity site:Redmond –UseWindowsAuth None –UsePinAuth $True

For More Information

• Haiku #122: The CsWebServiceConfiguration Cmdlets at

Delete a Web Service

➢ To delete a Web Service policy

To delete an existing collection of Web Service configuration settings, use the Remove-CsWebServiceConfiguration cmdlet:

Remove-CsWebServiceConfiguration -Identity site:Redmond

This command deletes all the Web Service configuration settings assigned to the site scope:

Get-CsWebServiceConfiguration –Filter "site:*" | Remove-CsWebServiceConfiguration

For More Information

• Haiku #122: The CsWebServiceConfiguration Cmdlets at

Create a New PIN Policy

➢ To create a user or site PIN policy

To create a new per-user or per-site PIN policy, use the New-CsPinPolicy cmdlet:

New-CsPinPolicy –Identity "site:Redmond" –MinPasswordLength 8

For More Information

• Haiku #72: The CsPinPolicy Cmdlets at

Modify an Existing PIN Policy

➢ To modify an existing PIN policy

To modify an existing PIN policy, use the Set-CsPinPolicy cmdlet:

Set-CsPinPolicy –Identity "site:Redmond" –MinPasswordLength 6

For More Information

• Haiku #72: The CsPinPolicy Cmdlets at

Delete a PIN Policy

➢ To delete a PIN policy

To remove a PIN policy, use the Remove-CsPinPolicy cmdlet:

Remove-CsPinPolicy –Identity "site:Redmond"

This command removes all the PIN policies configured at the site scope:

Get-CsPinPolicy –Filter "site:*" | Remove-CsPinPolicy

And this command removes all the per-user PIN policies:

Get-CsPinPolicy –Filter "tag:*" | Remove-CsPinPolicy

For More Information

• Haiku #72: The CsPinPolicy Cmdlets at

Edit or Configure Simple URLs

Configure Simple URLs

➢ To configure simple URLs

To define simple URLs for dial-in conferencing and meetings, use the following set of commands:

$urlEntry = New-CsSimpleUrlEntry -Url ""

$simpleUrl = New-CsSimpleUrl -Component "dialin" -Domain "*" -SimpleUrl $urlEntry -ActiveUrl ""

$urlEntry2 = New-CsSimpleUrlEntry -Url ""

$simpleUrl2 = New-CsSimpleUrl -Component "meet" -Domain "" -SimpleUrl $urlEntry2

New-CsSimpleUrlConfiguration -Identity "site:Redmond" -SimpleUrl @{Add=$simpleUrl,$simpleUrl2}

➢ To define the optional Admin simple URL

To define an Admin simple URL use the following set of commands:

$urlEntry = New-CsSimpleUrlEntry -Url ""

$simpleUrl = New-CsSimpleUrl -Component "admin" -Domain "*" -SimpleUrl $urlEntry -ActiveUrl ""

New-CsSimpleUrlConfiguration -Identity "site:Redmond" -SimpleUrl @{Add=$simpleUrl }

For More Information

• Haiku #29: The CsSimpleUrlConfiguration Cmdlets at

Configure a New Trusted Application Server

Configure a Trusted Application Pool

➢ To configure a trusted application server

To create a new trusted application pool, use the New-CsTrustedApplicationPool cmdlet:

New-CsTrustedApplicationPool -Identity TrustPool. -Registrar pool0. -Site Redmond

Enable-CsTopology

For More Information

• The New-CsTrustedApplicationPool Cmdlet at

Change the Web Services URL

Change the Web Services URL

➢ Configure Web Services

To modify the Web Services URL used by external users, use the Set-CsWebServer cmdlet and set the value of the ExternalFqdn property:

Set-CsWebServer –Identity WebServer:atl-cs-001. –ExternalFqdn atl-ext-001.

For More Information

• The Set-CsWebServer Cmdlet at

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download

To fulfill the demand for quickly locating and searching documents.

It is intelligent file search solution for home and business.

Literature Lottery

Related searches