64
Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement Microsoft Lync Server 2010 Published: October 2011

LS Admin Windows PowerShell Supplement

Embed Size (px)

DESCRIPTION

LS Admin Windows PowerShell Supplement

Citation preview

Page 1: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementMicrosoft Lync Server 2010

Published: October 2011

 

 

 

 

 

 

 

 

 

 

 

  

 

 

 

 

Page 2: LS Admin Windows PowerShell Supplement

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.

Page 3: LS Admin Windows PowerShell Supplement

ContentsIntroduction.................................................................................................................................................. 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.............................................5Configuring 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................................................................................8Configuring 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.................................................................................................9Configuring 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

Page 4: LS Admin Windows PowerShell Supplement

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............................................................................................................13Managing 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...................................................................................17Filtering 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........................................................................19Managing 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.................................................................................................................. 23Managing Users......................................................................................................................................... 23

Search for Lync Server 2010 Users........................................................................................................23

Add a New User to Lync Server 2010....................................................................................................23

Page 5: LS Admin Windows PowerShell Supplement

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...............................................................................................................28Managing 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...............................................32Managing 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........................................................................................34Configuring 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

Page 6: LS Admin Windows PowerShell Supplement

Configuring Network Region Routes......................................................................................................39Prevent New Connections to Lync Server 2010 for Server Maintenance..................................................40

Prevent New Connections to Lync Server..............................................................................................40Delegating Control of Lync Server 2010....................................................................................................40

Assigning an RBAC Role to a User........................................................................................................40

Assigning a User to a Security Group.................................................................................................40Managing 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...................................................................................................45Configuring 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................................................................................................................................ 47Edit or Configure Simple URLs..................................................................................................................48

Configure Simple URLs.......................................................................................................................... 48Configure a New Trusted Application Server.............................................................................................48

Configure a Trusted Application Pool.....................................................................................................48Change the Web Services URL................................................................................................................. 49

Change the Web Services URL..............................................................................................................49

Page 7: LS Admin Windows PowerShell Supplement

IntroductionThis document is provided as a supplement to the Microsoft Lync Server 2010 Administration Guide, available from the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkId=207913. 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 http://go.microsoft.com/fwlink/?LinkId=230860. For details about Windows PowerShell in Lync Server, see the Lync Server Windows PowerShell blog at http://go.microsoft.com/fwlink/?LinkId=203150.

1

Page 8: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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 archivingTo 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 siteTo 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 policyTo 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 archivingTo 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 archivingTo 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 archivingTo delete a per-user or per-site archiving policy use the Remove-CsArchivingPolicy cmdlet:

2

Page 9: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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 accountTo 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 http://go.microsoft.com/fwlink/?LinkId=230861 The Edit Archiving Policy Dialog at http://go.microsoft.com/fwlink/?LinkId=230863

Enable or Disable Archiving To enable or disable archiving for a policyTo 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 http://go.microsoft.com/fwlink/?LinkId=230864

The Archiving Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=230865

Specify the Types of Communications to Be Archived To specify the communications to be archivedTo 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 http://go.microsoft.com/fwlink/?LinkId=230864

3

Page 10: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

The Archiving Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=230865

Enable or Disable Purging for Archiving To enable or disable purging for archivingTo 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 http://go.microsoft.com/fwlink/?LinkId=230864

The Archiving Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=230865

Block or Allow IM and Web Conferencing Sessions If Archiving Fails To enable or disable blocking of IM and web conferencing sessions if archiving failsTo 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 http://go.microsoft.com/fwlink/?LinkId=230864

The Archiving Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=230865

Enable or Disable Sending an Archiving Disclaimer to Federated Partners To enable or disable sending an archiving disclaimer to federated partnersTo 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

4

Page 11: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

For More Information

Haiku #83: The CsAccessEdgeConfiguration Cmdlets at http://go.microsoft.com/fwlink/?LinkId=230866

The Access Edge Configuration Dialog at http://go.microsoft.com/fwlink/?LinkId=230867

Configuring Support for Clients and Devices

Specify the Client Versions Supported in Your Organization To edit the default client version policyAs 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 http://go.microsoft.com/fwlink/?LinkId=230868 The Edit Client Version Policy Dialog at http://go.microsoft.com/fwlink/?LinkId=230869

View the Status of Services Running on a Computer To view the status of services running on a computerTo 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.litwareinc.com with the fully qualified domain name of the computer to be viewed:

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

For More Information

Haiku #71: The CsService Cmdlets at http://go.microsoft.com/fwlink/?LinkId=230871

Modify the Default Action for Clients Not Explicitly Supported or Restricted To modify the default action for clients not explicitly supported or restrictedTo 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 "https://litwareinc.com/csclients"

5

Page 12: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

To disable client version controlTo 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 http://go.microsoft.com/fwlink/?LinkId=230879

The Edit Client Version Configuration Dialog at http://go.microsoft.com/fwlink/?LinkId=230881

View Software Updates for Devices in Your Organization To view software updates for UC devicesTo 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.litwareinc.com*"

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

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

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

Reset-CsDeviceUpdateRule -Identity service:WebServer:atl-cs-001.litwareinc.com/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.litwareinc.com/d5ce3c10-2588-420a-82ac-dc2d9b1222ff9

For More Information

The Device Update Dialog at http://go.microsoft.com/fwlink/?LinkId=230882 Approve-CsDeviceUpdateRule Cmdlet at http://go.microsoft.com/fwlink/?LinkId=230883 The Reset-CsDeviceUpdateRule Cmdlet at http://go.microsoft.com/fwlink/?LinkId=230886 The Restore-CsDeviceUpdateRule Cmdlet at http://go.microsoft.com/fwlink/?LinkId=230885

Add a Device to Test Update Functionality To add a test deviceThe 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"

6

Page 13: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

For More Information

Haiku #40: The CsTestDevice Cmdlets at http://go.microsoft.com/fwlink/?LinkId=230884 The New Test Device Dialog http://go.microsoft.com/fwlink/?LinkId=23088

Modify Settings for Log Files of Device Update Activity To change logging settingsTo 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 http://go.microsoft.com/fwlink/?LinkId=230887

The Log Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=230888.

Configure Security Settings for Lync 2010 Phone Edition To configure security settings for Lync 2010 Phone EditionTo 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 http://go.microsoft.com/fwlink/?LinkId=230889

Configure Voice Quality of Service for Lync 2010 Phone Edition To configure Voice Quality of Service for Lync 2010 Phone EditionTo 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 http://go.microsoft.com/fwlink/?LinkId=230889

Configure Phone Lock for Lync 2010 Phone Edition To configure the phone lockTo 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

7

Page 14: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

For More Information

Haiku #15: The CsUCPhoneConfiguration Cmdlets at http://go.microsoft.com/fwlink/?LinkId=230889

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 callsTo 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.litwareinc.com

Change a Call Park Orbit Range

To change a range of numbers for parking callsTo 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 rangeTo 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 http://go.microsoft.com/fwlink/?LinkId=230890

Configure Routing of Unassigned Phone Numbers To configure routing of unassigned phone numbersThe New-CsUnassignedNumber cmdlet enables you to create a new unassigned number range:

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

Change an Unassigned Number Range

To change routing of unassigned phone numbersTo 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"

8

Page 15: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Delete an Unassigned Number Range

To delete an unassigned number rangeTo 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 http://go.microsoft.com/fwlink/?LinkId=230891 The New Unassigned Number Range Dialog (Announcement) at http://go.microsoft.com/fwlink/?

LinkId=230892 The New Unassigned Number Range Dialog (Exchange UM) at http://go.microsoft.com/fwlink/?

LinkId=230893

Configuring Voice Routing

Configuring Dial Plans and Normalization Rules

Create a Dial Plan

To create a dial planTo 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 planTo modify a dial plan, use the Set-CsDialPlan cmdlet:

Set-CsDialPlan -Identity RedmondDialPlan –ExternalAccessPrefix 8

For More Information

Haiku #92: The CsDialPlan Cmdlets at http://go.microsoft.com/fwlink/?LinkId=230984 The Edit Dial Plan Dialog at http://go.microsoft.com/fwlink/?LinkId=230985 The New Normalization Rule Dialog at http://go.microsoft.com/fwlink/?LinkId=230986

Create or Modify a Normalization Rule Manually To define a normalization rule manuallyTo 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:

9

Page 16: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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 http://go.microsoft.com/fwlink/?LinkId=230986

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 policyTo 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 policyTo 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 recordTo 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 routeTo create a new voice route, use the New-CsVoiceRoute cmdlet:

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

Modify a Voice Route

To modify a voice routeTo 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

10

Page 17: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

For More Information

Haiku #36: The CsVoicePolicy Cmdlets at http://go.microsoft.com/fwlink/?LinkId=230987 Haiku #78: The CsPstnUsage Cmdlets at http://go.microsoft.com/fwlink/?LinkId=230988 The Edit Voice Policy Dialog at http://go.microsoft.com/fwlink/?LinkId=230990 The Edit Voice Route Dialog at http://go.microsoft.com/fwlink/?LinkId=230991 The Edit PSTN Usage Record Dialog at http://go.microsoft.com/fwlink/?LinkId=230993

Configuring Trunks and Translation Rules

Configure Media Bypass on a Trunk

To configure media bypass on a trunkTo 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 bypassTo 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 manuallyTo 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 http://go.microsoft.com/fwlink/?LinkId=230994 Haiku #45: The CsSipResponseCodeTranslationRule Cmdlets at http://go.microsoft.com/fwlink/?

LinkId=230995 The Edit Trunk Configuration Dialog at http://go.microsoft.com/fwlink/?LinkId=230996

Exporting and Importing Voice Routing Configuration

Export a Voice Route Configuration File

To export a voice routing configurationWith 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"

11

Page 18: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Import a Voice Route Configuration File

To import a voice routing configurationTo 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 http://go.microsoft.com/fwlink/?LinkId=230999 The Edit Voice Route Dialog at http://go.microsoft.com/fwlink/?LinkId=230991 The Import-Clixml Cmdlet at http://go.microsoft.com/fwlink/?LinkId=113340 The Export-Clixml Cmdlet at http://go.microsoft.com/fwlink/?LinkId=113297

Test Voice Routing

Create a Voice Routing Test Case

To create a test caseTo 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 casesUse 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 casesUse 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 http://go.microsoft.com/fwlink/?LinkId=23100

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

12

Page 19: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Enable or Disable Federation for Your Organization

To enable or disable federated user access for your organizationTo 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 organizationTo 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 http://go.microsoft.com/fwlink/?LinkId=230866

The Access Edge Configuration Dialog at http://go.microsoft.com/fwlink/?LinkId=230867

Manage Communications with External Users

Manage Remote User Access

To configure an external access policy to support remote user accessTo 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 domainsTo 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 organizationTo 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

13

Page 20: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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.litwareinc.com"

Control Access by Individual Federated Domains

To add an external domain to the list of allowed domainsTo 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 "fabrikam.com"

To add an external domain to the list of blocked domainsTo 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 "contoso.com"

Enable or Disable Sending an Archiving Disclaimer to Federated Partners

To enable or disable sending an archiving disclaimer to federated partnersTo 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 http://go.microsoft.com/fwlink/?LinkId=231001

Haiku # 83: The CsAccessEdgeConfiguration Cmdlets at http://go.microsoft.com/fwlink/?LinkId=230866

Haiku #3: The CsBlockedDomain Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231002 The Edit External Access Policy Dialog at http://go.microsoft.com/fwlink/?LinkId=231003 The Access Edge Configuration Dialog at http://go.microsoft.com/fwlink/?LinkId=230867 The New Federated Domains Dialog (Allowed Domains) at http://go.microsoft.com/fwlink/?

LinkId=231004 The New Federated Domains Dialog (Blocked Domains) at http://go.microsoft.com/fwlink/?

LinkId=231005

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 accessTo 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:

14

Page 21: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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

Specify Supported IM Service Providers

To configure support for an IM service providerTo 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.fabrikam.com" -Enabled $True -VerificationLevel "AlwaysUnverifiable"

Configure Conferencing Policies to Support Anonymous Users

To configure policies to allow anonymous participation in meetingsTo 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 http://go.microsoft.com/fwlink/?LinkId=231001

Haiku #128: The CsPublicProvider Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231006 No Conferencing Policy is an Island at http://go.microsoft.com/fwlink/?LinkId=231008 The Edit External Access Policy Dialog at http://go.microsoft.com/fwlink/?LinkId=231003 The Edit Provider Dialog at http://go.microsoft.com/fwlink/?LinkId=231013 The Edit Conferencing Policy Dialog at http://go.microsoft.com/fwlink/?LinkId=231014

Apply Policies for External User Access to Users

Apply External User Access Policies to Users

To apply an external user policy to a user accountTo 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 meetingsTo 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

15

Page 22: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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 accessTo 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 settingsTo 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 http://go.microsoft.com/fwlink/?LinkId=231001

No Conferencing Policy is an Island at http://go.microsoft.com/fwlink/?LinkId=231008 The Edit Conferencing Policy Dialog at http://go.microsoft.com/fwlink/?LinkId=231014 The Edit External Access Policy Dialog at http://go.microsoft.com/fwlink/?LinkId=231003

16

Page 23: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Filtering Instant Messages and Client Versions

Configuring Filtering for Instant Messaging (IM)

Modify the Default File Transfer Filter

To modify the default file transfer filterTo 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 siteTo 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 filterTo 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 http://go.microsoft.com/fwlink/?LinkId=231016

Haiku #56: The CsFileTransferFilterConfiguration Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231017

The Edit File Filter Dialog at http://go.microsoft.com/fwlink/?LinkId=231018

17

Page 24: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

The Edit URL Filter Dialog (Allow) at http://go.microsoft.com/fwlink/?LinkId=231019 The Edit URL Filter Dialog (Block) at http://go.microsoft.com/fwlink/?LinkId=231021 The Edit URL Filter Dialog (Allow With Warning) at http://go.microsoft.com/fwlink/?

LinkId=231022.

Specify Client Versions Supported for Sign-in by a User To assign a per-user client version policyTo 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 http://go.microsoft.com/fwlink/?LinkId=230868 The Edit Client Version Policy Dialog at http://go.microsoft.com/fwlink/?LinkId=230869

Managing Computers in Your Topology

View a List of Computers Running Lync Server 2010 To view a list of computers running Lync ServerAlthough 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

18

Page 25: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

$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 http://go.microsoft.com/fwlink/?LinkId=231025 Haiku #67: The CsManagementStoreReplicationStatus Cmdlets at

http://go.microsoft.com/fwlink/?LinkId=231026 Get-CsComputer Cmdlet at http://go.microsoft.com/fwlink/?LinkId=231027

View the Status of Services Running on a Computer To view the status of services running on a computerTo 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.litwareinc.com with the fully qualified domain name of the computer to be checked:

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

For More Information

Haiku #71: The CsService Cmdlets at http://go.microsoft.com/fwlink/?LinkId=230871

View Details About a Service To view details for a serviceTo 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.litwareinc.com

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 http://go.microsoft.com/fwlink/?LinkId=230871

19

Page 26: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Start or Stop Lync Server 2010 Services To start or stop all Lync Server services on a computerTo start all the Lync Server services on a computer, use the Start-CsWindowsService cmdlet:

Start-CsWindowsService -ComputerName atl-cs-001.litwareinc.com

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

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

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

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

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

For More Information

Haiku #51: The CsWindowsService Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231028

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

Get-CsWindowsService | Stop-CsWindowsService -ComputerName atl-cs-001.litwareinc.com –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 serviceTo prevent new sessions for a specific Lync Server service, use the following command:

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

For More Information

Haiku #51: The CsWindowsService Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231028

View Microsoft SIP Processing Language (MSPL) Server ApplicationsTo 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.litwareinc.com/ExumRouting"

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

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

20

Page 27: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

For More Information

The Server Application Dialog at http://go.microsoft.com/fwlink/?LinkId=231029

Enable or Disable a Microsoft SIP Processing Language (MSPL) Server Application To enable or disable an MSPL server applicationTo enable an MPSL server application, use the Set-CsServerApplication cmdlet and set the Enabled property to True:

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

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

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

For More Information

The Server Application Dialog at http://go.microsoft.com/fwlink/?LinkId=231029

Mark a Microsoft SIP Processing Language (MSPL) Application as Critical or Not Critical To mark or unmark an MSPL server application as criticalTo 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.litwareinc.com/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.litwareinc.com/QoEAgent" -Critical $False

For More Information

The Server Application Dialog at http://go.microsoft.com/fwlink/?LinkId=231029

View a List of Trusted Applications To view a list of trusted applicationsTo 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.litwareinc.com/tapp2

For More Information

The Trusted Application Dialog at http://go.microsoft.com/fwlink/?LinkId=231030

21

Page 28: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

View the Simple URL Details To view Simple URL detailsTo 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 http://go.microsoft.com/fwlink/?LinkId=231035

Managing Users

Search for Lync Server 2010 Users To search for one or more usersTo 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 http://go.microsoft.com/fwlink/?LinkId=231038

Add a New User to Lync Server 2010 To create a new Lync Server userTo enable a user to use Lync Server, use the Enable-CsUser cmdlet:

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

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 litwareinc.com. 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.litwareinc.com" –SipAddress "sip:[email protected]"

For More Information

21 User Information Cmdlets to Run Before You Die at http://go.microsoft.com/fwlink/?LinkId=231038

Enabling a User for Microsoft Lync Server 2010 at http://go.microsoft.com/fwlink/?LinkId=231040 Enabling a User for Microsoft Lync Server 2010 and Enterprise Voice at

http://go.microsoft.com/fwlink/?LinkId=231043 The New Communications Server User Dialog at http://go.microsoft.com/fwlink/?LinkId=231044

22

Page 29: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Enable-CsUser Cmdlet at http://go.microsoft.com/fwlink/?LinkId=212121

Enable or Disable Users for Lync Server 2010 To disable or re-enable a previously enabled user account for Lync ServerTo 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 http://go.microsoft.com/fwlink/?LinkId=231045 Disable-CsUser at http://go.microsoft.com/fwlink/?LinkId=231046 Set-CsUser at http://go.microsoft.com/fwlink/?LinkId=231047

Set, View, and Send a User's Dial-in Conferencing PIN To set a user’s PINLync 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:[email protected] 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:

23

Page 30: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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

For More Information

Haiku #95: The CsClientPin Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231048

Move Users to Another Pool To move selected users to a different server or poolTo move a user from one Registrar pool to another, use the Move-CsUser cmdlet:

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

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.litwareinc.com"

To move all users from one server or pool to a different server or poolTo 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.litwareinc.com"} limits the returned user accounts to those users homed on the pool dublin-cs-001.litwareinc.com. That collection of user accounts can then be piped to the Move-CsUser cmdlet:

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

To move users from one pool to a different pool by using a filterTo 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.litwareinc.com"

For More Information

Haiku #10: The CsUser Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231049

Assign Policies to Users

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

To assign a per-user conferencing policyTo 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

24

Page 31: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Specify Client Versions Supported for Sign-in by a User

To assign a per-user client version policyTo 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 policyTo 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 accountTo 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 policyTo 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

25

Page 32: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Assign a Location Policy to a User

To assign a per-user location policyTo 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 http://go.microsoft.com/fwlink/?LinkId=231050

Enable a User for Enterprise Voice To enable a user account for Enterprise VoiceTo 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 http://go.microsoft.com/fwlink/?LinkId=231043

How Can I Configure the Telephony Options for a User? at http://go.microsoft.com/fwlink/?LinkId=231051

Configure Telephony for Users To configure telephony for a specific user accountTo 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 http://go.microsoft.com/fwlink/?LinkId=231051

26

Page 33: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Managing On-Premises Meetings

Configuring Conferencing Settings

Modify the Default Conferencing User Experience

To modify the global conferencing policyTo 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 policyTo 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 policyUse 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 policyTo delete a per-user or per-site policy, using a command similar to this:

Remove-CsConferencingPolicy –Identity site:Redmond

27

Page 34: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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 http://go.microsoft.com/fwlink/?LinkId=231008 The Edit Conferencing Policy Dialog at http://go.microsoft.com/fwlink/?LinkId=231014

Configuring the Meeting Join Experience

Modify the Default Meeting Join Experience

To modify the default meeting join settingsTo 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 settingsTo 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.litwareinc.com" -DesignateAsPresenter Everyone

To modify an existing site or pool meeting join configurationTo 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.

28

Page 35: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Delete Meeting Join Settings for a Site or Pool

To delete meeting join settings for a site or poolTo 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.litwareinc.com"

For More Information

Haiku #84: The CsMeetingConfiguration Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231052

The Edit Meeting Configuration Dialog at http://go.microsoft.com/fwlink/?LinkId=231053

Configure Settings for a Dial-in Conferencing Access Number To create or modify a dial-in access numberTo create a new dial-in conferencing access number, use the New-CsDialInConferencingAccessNumber cmdlet:

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

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

Set-CsDialInConferencingAccessNumber -Identity "sip:[email protected]" -Regions "Redmond", "Seattle"

Delete a Dial-in Conferencing Access Number

To delete a dial-in conferencing access numberTo 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:[email protected]"

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 http://go.microsoft.com/fwlink/?LinkId=231054

The New Dial-in Access Number Dialog at http://go.microsoft.com/fwlink/?LinkId=231055

29

Page 36: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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

Modify the Default Dial-in Conferencing PIN Settings

To modify the global PIN policyTo 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 policyTo 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 policyTo 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 policyTo 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 http://go.microsoft.com/fwlink/?LinkId=231056 The Edit PIN Policy Dialog at http://go.microsoft.com/fwlink/?LinkId=231057

Managing Monitoring

Create a Site Policy for Call Detail Recording To create a CDR policy for a siteTo enable call detail recording (CDR) for a site, use the New-CsCdrConfiguration cmdlet:

30

Page 37: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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

For More Information

Haiku #28: The CsCdrConfiguration Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231058 The Call Detail Recording Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=231061

Create a Site Policy for Quality of Experience To create a QoE policy for a siteTo 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 http://go.microsoft.com/fwlink/?LinkId=231063 The Quality of Experience Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=231064

Enable Call Detail Recording To enable CDRTo 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 http://go.microsoft.com/fwlink/?LinkId=231058 The Call Detail Recording Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=231061

Enable Quality of Experience To enable QoETo 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 http://go.microsoft.com/fwlink/?LinkId=231063 The Quality of Experience Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=231064

Configure Call Detail Recording To specify retention of CDR dataTo 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 http://go.microsoft.com/fwlink/?LinkId=231058 The Call Detail Recording Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=231061

31

Page 38: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Configure Quality of Experience To specify retention of QoE dataTo 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 http://go.microsoft.com/fwlink/?LinkId=231063 The Quality of Experience Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=231064

Delete a Site Policy for Call Detail Recording To delete a CDR policyTo 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 http://go.microsoft.com/fwlink/?LinkId=231058 The Call Detail Recording Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=231061

Delete a Site Policy for Quality of Experience To delete a QoE policyTo 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 http://go.microsoft.com/fwlink/?LinkId=231063 The Quality of Experience Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=231064

Configuring Your Network

Enabling Call Admission Control To enable CACTo 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:

32

Page 39: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Set-CsNetworkConfiguration –Identity global –EnableBandwidthPolicyCheck $False

For More Information

The Set-CsNetworkConfiguration Cmdlet at http://go.microsoft.com/fwlink/?LinkId=231065 Haiku #147: The CsNetworkConfiguration Cmdlets at http://go.microsoft.com/fwlink/?

LinkId=231066

Enabling Media Bypass To enable and configure media bypassTo 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 = $NullSet-CsNetworkConfiguration -MediaBypassSettings $x

For More Information

The Set-CsNetworkConfiguration Cmdlet at http://go.microsoft.com/fwlink/?LinkId=231065 Haiku #147: The CsNetworkConfiguration Cmdlets at http://go.microsoft.com/fwlink/?

LinkId=231066

Configuring Location Policy To view location policiesTo 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 policyTo 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.

33

Page 40: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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

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

To delete a location policyTo 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 http://go.microsoft.com/fwlink/?LinkId=231067 The Edit Location Policy Dialog at http://go.microsoft.com/fwlink/?LinkId=231068

Configuring Bandwidth Policy Profile To create a new bandwidth policy profileTo 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 profileTo modify a bandwidth policy profile, use the Set-CsNetworkBandwidthPolicyProfile cmdlet:

Set-CsNetworkBandwidthPolicyProfile -Identity LowBWLimits -AudioBWLimit 1000

To delete a bandwidth policy profileTo 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 http://go.microsoft.com/fwlink/?LinkId=231069 New-CsNetworkBandwidthPolicyProfile at http://go.microsoft.com/fwlink/?LinkId=231070 Remove-CsNetworkBandwidthPolicyProfile at http://go.microsoft.com/fwlink/?LinkId=231071 Set-CsNetworkBandwidthPolicyProfile at http://go.microsoft.com/fwlink/?LinkId=231072

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

34

Page 41: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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

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

Set-CsNetworkRegion -Identity EMEA -VideoAlternatePath $False

To delete a network regionTo 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 http://go.microsoft.com/fwlink/?LinkId=231073

Configuring Network Sites To create a network siteTo create a new network site, use the New-CsNetworkSite cmdlet:

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

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

Set-CsNetworkSite -Identity Vancouver -BWPolicyProfileID LowBWLimits

To delete a network siteTo 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 http://go.microsoft.com/fwlink/?LinkId=231074 New-CsNetworkSite at http://go.microsoft.com/fwlink/?LinkId=231075 Remove-CsNetworkSite at http://go.microsoft.com/fwlink/?LinkId=231076 Set-CsNetworkSite at http://go.microsoft.com/fwlink/?LinkId=231077

35

Page 42: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Configuring Network Subnets To create a network subnetTo 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 subnetTo modify a network subnet, use the Set-CsNetworkSubnet cmdlet:

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

To delete a network subnetTo 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 http://go.microsoft.com/fwlink/?LinkId=231078

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 linkTo modify a network region link, use the Set-CsNetworkRegionLink cmdlet:

Set-CsNetworkRegionLink -Identity NA_EMEA -BWPolicyProfileID HighBWLimits

To delete a network region linkTo 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 http://go.microsoft.com/fwlink/?LinkId=231079

36

Page 43: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Configuring Network Region Routes To create a network region routeTo 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 routeTo 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 routeTo 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 http://go.microsoft.com/fwlink/?LinkId=231080 New-CsNetworkInterRegionRoute at http://go.microsoft.com/fwlink/?LinkId=231081 Remove-CsNetworkInterRegionRoute at http://go.microsoft.com/fwlink/?LinkId=231082 Set-CsNetworkInterRegionRoute at http://go.microsoft.com/fwlink/?LinkId=231083

Prevent New Connections to Lync Server 2010 for Server Maintenance

Prevent New Connections to Lync Server To prevent new connections to Lync Server 2010To 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 http://go.microsoft.com/fwlink/?LinkId=113399

37

Page 44: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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 http://go.microsoft.com/fwlink/?LinkId=231085

38

Page 45: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Managing Response Groups

Managing Agent Groups

Create an Agent Group

To create an agent groupTo 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.litwareinc.com -Name "Help Desk Group" -AgentsByUri "sip:[email protected]","sip:[email protected]"

By comparison, this command uses the DistributionGroupAddress parameter to add all the members of the [email protected] distribution group to the agent group:

New-CsRgsAgentGroup -Parent service:ApplicationServer:atl-cs-001.litwareinc.com -Name "Help Desk Group" -DistributionGroupAddress "[email protected]"

Change Agent Group Settings or Members

To change agent group settings or membershipTo 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.litwareinc.com -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.litwareinc.com -Name "Help Desk"$x.DistributionGroupAddress = "[email protected]"Set-CsRgsAgentGroup -Instance $x

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

$x = Get-CsRgsAgentGroup -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name "Help Desk"$x.AgentsByUri.Add("sip:[email protected]")Set-CsRgsAgentGroup -Instance $x

And these commands remove an agent from an agent group:

$x = Get-CsRgsAgentGroup -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name "Help Desk"$x.AgentsByUri.Remove("sip:[email protected]")Set-CsRgsAgentGroup -Instance $x

39

Page 46: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Delete an Agent Group

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

Get-CsRgsAgentGroup -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -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 http://go.microsoft.com/fwlink/?LinkId=231086

Managing Response Group Queues

Create a Response Group Queue

To create a queueTo 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:[email protected]"

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

Change a Response Group Queue

To change a queueTo 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.litwareinc.com -Name "Help Desk"$x.OverflowCandidate = "NewestCall"

Set-CsRgsQueue -Instance $x

Delete a Response Group Queue

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

Get-CsRgsQueue -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -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

40

Page 47: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

For More Information

Haiku #23: The CsRgsQueue Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231087

Managing Response Group Workflows

Create a Response Group Workflow

Create a Hunt Group Workflow

To create a hunt group workflowTo 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.litwareinc.com -Name "Help Desk").Identity

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

New-CsRgsWorkflow -Parent service:ApplicationServer:atl-cs-001.litwareinc.com -Name "Help Desk" -PrimaryUri "sip:[email protected]" -DefaultAction $callAction

Create an Interactive Workflow

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

$ServiceId = "service:ApplicationServer:rtc.contoso.com" $Group_Sales = New-CsRgsAgentGroup -Parent $ServiceId -Name "Contoso Sales" -AgentAlertTime 20 -ParticipationPolicy Informal -RoutingMethod LongestIdle -AgentsByUri("sip:[email protected]","sip:[email protected]") $Group_Support = New-CsRgsAgentGroup -Parent $ServiceId -Name "Contoso Support" -AgentAlertTime 20 -ParticipationPolicy Informal -RoutingMethod LongestIdle -AgentsByUri("sip:[email protected]","sip:[email protected]") $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."

41

Page 48: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

$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:[email protected]" -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 workflowTo 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.litwareinc.com -Name "US Business Hours"

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

$y.BusinessHoursId = $businessHours.Identity

Set-CsRgsWorkflow -Instance $y

Change an Interactive Workflow

To change an interactive workflowTo 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.litwareinc.com -FileName "HelpDeskHoldMusic.wav"

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

$y.CustomMusicOnHoldFile = $musicFile

42

Page 49: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Set-CsRgsWorkflow -Instance $y

Delete a Response Group Workflow

To delete a workflowTo 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.litwareinc.com -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 http://go.microsoft.com/fwlink/?LinkId=231088 New-CsRgsWorkflow at http://go.microsoft.com/fwlink/?LinkId=231089 Remove-CsRgsWorkflow at http://go.microsoft.com/fwlink/?LinkId=231090 Set-CsRgsWorkflow at http://go.microsoft.com/fwlink/?LinkId=231091

Configuring Security

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

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

For More Information

The Edit Registrar Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=231092

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

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

For More Information

The Edit Registrar Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=231092

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

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

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

43

Page 50: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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 http://go.microsoft.com/fwlink/?LinkId=231092

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 http://go.microsoft.com/fwlink/?LinkId=231093

Modify an Existing Web Service To modify an existing Web ServiceTo 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 http://go.microsoft.com/fwlink/?LinkId=231093

Delete a Web Service To delete a Web Service policyTo 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 http://go.microsoft.com/fwlink/?LinkId=231093

44

Page 51: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

Create a New PIN Policy To create a user or site PIN policyTo 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 http://go.microsoft.com/fwlink/?LinkId=231056

Modify an Existing PIN Policy To modify an existing PIN policyTo 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 http://go.microsoft.com/fwlink/?LinkId=231056

Delete a PIN Policy To delete a PIN policyTo 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 http://go.microsoft.com/fwlink/?LinkId=231056

Edit or Configure Simple URLs

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

$urlEntry = New-CsSimpleUrlEntry -Url "https://dialin.fabrikam.com"$simpleUrl = New-CsSimpleUrl -Component "dialin" -Domain "*" -SimpleUrl $urlEntry -ActiveUrl "https://dialin.fabrikam.com"

$urlEntry2 = New-CsSimpleUrlEntry -Url "https://meet.fabrikam.com"$simpleUrl2 = New-CsSimpleUrl -Component "meet" -Domain "fabrikam.com" -SimpleUrl $urlEntry2

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

45

Page 52: LS Admin Windows PowerShell Supplement

Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement

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

$urlEntry = New-CsSimpleUrlEntry -Url "https://admin.fabrikam.com"$simpleUrl = New-CsSimpleUrl -Component "admin" -Domain "*" -SimpleUrl $urlEntry -ActiveUrl "https://admin.fabrikam.com"

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

For More Information

Haiku #29: The CsSimpleUrlConfiguration Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231035

Configure a New Trusted Application Server

Configure a Trusted Application Pool To configure a trusted application serverTo create a new trusted application pool, use the New-CsTrustedApplicationPool cmdlet:

New-CsTrustedApplicationPool -Identity TrustPool.litwareinc.com -Registrar pool0.litwareinc.com -Site RedmondEnable-CsTopology

For More Information

The New-CsTrustedApplicationPool Cmdlet at http://go.microsoft.com/fwlink/?LinkId=231094

Change the Web Services URL

Change the Web Services URL Configure Web ServicesTo 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.litwareinc.com –ExternalFqdn atl-ext-001.litwareinc.com

For More Information

The Set-CsWebServer Cmdlet at http://go.microsoft.com/fwlink/?LinkId=231095

46