• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Lync Powershell - Ls admin windows_power_shell_supplement
 

Lync Powershell - Ls admin windows_power_shell_supplement

on

  • 2,183 views

 

Statistics

Views

Total Views
2,183
Views on SlideShare
2,182
Embed Views
1

Actions

Likes
0
Downloads
29
Comments
0

1 Embed 1

https://twimg0-a.akamaihd.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Lync Powershell - Ls admin windows_power_shell_supplement Lync Powershell - Ls admin windows_power_shell_supplement Document Transcript

    • Microsoft Lync Server 2010Administration Guide –Windows PowerShellSupplementMicrosoft Lync Server 2010Published: October 2011
    • This document is provided “as-is”. Information and views expressed in this document, includingURL and other Internet Web site references, may change without notice.Some examples depicted herein are provided for illustration only and are fictitious. No realassociation or connection is intended or should be inferred.This document does not provide you with any legal rights to any intellectual property in anyMicrosoft product. You may copy and use this document for your internal, reference purposes.Copyright © 2011 Microsoft Corporation. All rights reserved.Microsoft, Active Directory, ActiveSync, ActiveX, DirectX, Excel, Forefront, Groove, Hyper-V,Internet Explorer, Lync, MSDN, MSN, OneNote, Outlook, PowerPoint, RoundTable, SharePoint,Silverlight, SQL Server, Visio, Visual C++, Visual Studio, Windows, Windows Live, WindowsMedia, Windows PowerShell, Windows Server, and Windows Vista, are trademarks of theMicrosoft group of companies. All other trademarks are property of their respective owners.
    • ContentsIntroduction................................................................................................................................................. 1Managing 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.................................................................................................................... 2 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............................................ 4Configuring 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 ............................................ 5 View Software Updates for Devices in Your Organization....................................................................... 6 Add a Device to Test Update Functionality.............................................................................................. 6 Modify Settings for Log Files of Device Update Activity........................................................................... 6 Configure Security Settings for Lync 2010 Phone Edition....................................................................... 7 Configure Voice Quality of Service for Lync 2010 Phone Edition............................................................ 7 Configure Phone Lock for Lync 2010 Phone Edition............................................................................... 7Configuring Incoming Call Handling Features............................................................................................. 7 Configure Phone Number Extensions for Parking Calls.......................................................................... 7 Create a Call Park Orbit Range............................................................................................................ 7 Change a Call Park Orbit Range.......................................................................................................... 8 Delete a Call Park Orbit Range............................................................................................................ 8 Configure Routing of Unassigned Phone Numbers................................................................................. 8 Change an Unassigned Number Range.............................................................................................. 8 Delete an Unassigned Number Range................................................................................................. 8Configuring Voice Routing.......................................................................................................................... 9 Configuring Dial Plans and Normalization Rules..................................................................................... 9 Create a Dial Plan................................................................................................................................ 9 Modify a Dial Plan................................................................................................................................ 9 Create or Modify a Normalization Rule Manually..................................................................................... 9 Configuring Voice Policies, PSTN Usage Records, and Voice Routes.................................................... 9 Configuring Voice Policies and PSTN Usage Records to Authorize Calling Features and Privileges . .9 Configuring Voice Routes for Outbound Calls.................................................................................... 10 Configuring Trunks and Translation Rules............................................................................................. 10 Configure Media Bypass on a Trunk.................................................................................................. 10
    • Configure a Trunk Without Media Bypass.......................................................................................... 11 Defining Translation Rules.................................................................................................................. 11 Exporting and Importing Voice Routing Configuration........................................................................... 11 Export a Voice Route Configuration File............................................................................................. 11 Import a Voice Route Configuration File............................................................................................. 11 Test Voice Routing................................................................................................................................. 12 Create a Voice Routing Test Case..................................................................................................... 12 Run Voice Routing Test Cases........................................................................................................... 12Managing External Connectivity............................................................................................................... 12 Enable or Disable External User Access for Your Organization............................................................. 12 Enable or Disable Remote User Access for Your Organization.......................................................... 12 Enable or Disable Federation for Your Organization.......................................................................... 12 Enable or Disable Anonymous User Access for Your Organization.................................................... 12 Manage Communications with External Users...................................................................................... 13 Manage Remote User Access............................................................................................................ 13 Manage Federated Partner Access.................................................................................................... 13 Manage IM Provider Support................................................................................................................. 14 Configure Policies to Control Access by Users of IM Service Providers ............................................ 14 Specify Supported IM Service Providers............................................................................................ 14 Configure Conferencing Policies to Support Anonymous Users......................................................... 14 Apply Policies for External User Access to Users.................................................................................. 15 Apply External User Access Policies to Users.................................................................................... 15 Apply Conferencing Policies to Support Anonymous Users............................................................... 15 Reset or Delete External User Access Policies.................................................................................. 15Filtering Instant Messages and Client Versions........................................................................................ 16 Configuring Filtering for Instant Messaging (IM).................................................................................... 16 Modify the Default File Transfer Filter................................................................................................ 16 Create a New File Transfer Filter for a Specific Site........................................................................... 16 Modify the Default URL Filter............................................................................................................. 16 Create a New URL Filter to Handle Hyperlinks in IM Conversations.................................................. 17 Specify Client Versions Supported for Sign-in by a User....................................................................... 17Managing Computers in Your Topology.................................................................................................... 17 View a List of Computers Running Lync Server 2010............................................................................ 17 View the Status of Services Running on a Computer............................................................................ 18 View Details About a Service................................................................................................................. 19 Start or Stop Lync Server 2010 Services............................................................................................... 19 Prevent Sessions for Services............................................................................................................... 19 View Microsoft SIP Processing Language (MSPL) Server Applications................................................ 20 Enable or Disable a Microsoft SIP Processing Language (MSPL) Server Application ........................... 20 Mark a Microsoft SIP Processing Language (MSPL) Application as Critical or Not Critical................... 20 View a List of Trusted Applications........................................................................................................ 21 View the Simple URL Details................................................................................................................. 21Managing Users........................................................................................................................................ 21 Search for Lync Server 2010 Users....................................................................................................... 21 Add a New User to Lync Server 2010.................................................................................................... 21
    • Enable or Disable Users for Lync Server 2010...................................................................................... 22 Set, View, and Send a Users Dial-in Conferencing PIN........................................................................ 22 Move Users to Another Pool.................................................................................................................. 23 Assign Policies to Users........................................................................................................................ 23 Assign a Conferencing Policy to Modify a Users Default Meeting Experience.................................. 23 Specify Client Versions Supported for Sign-in by a User................................................................... 24 Assign Specific Dial-in Conferencing PIN Security Settings to a User ............................................... 24 Apply External User Access Policies to Users.................................................................................... 24 Configure Archiving of a Users Communications............................................................................... 24 Assign a Location Policy to a User..................................................................................................... 25 Enable a User for Enterprise Voice........................................................................................................ 25 Configure Telephony for Users.............................................................................................................. 25Managing On-Premises Meetings............................................................................................................. 26 Configuring Conferencing Settings........................................................................................................ 26 Modify the Default Conferencing User Experience............................................................................. 26 Create or Modify Conferencing User Experience for a Site or Group of Users .................................. 26 Delete a Conferencing Policy for a Site or Group of Users................................................................ 26 Configuring the Meeting Join Experience.............................................................................................. 27 Modify the Default Meeting Join Experience...................................................................................... 27 Create or Modify Meeting Join Settings for a Site or Pool.................................................................. 27 Delete Meeting Join Settings for a Site or Pool.................................................................................. 27 Configure Settings for a Dial-in Conferencing Access Number.............................................................. 28 Delete a Dial-in Conferencing Access Number.................................................................................. 28 Configure Dial-in Conferencing Personal Identification Number (PIN) Rules........................................ 28 Modify the Default Dial-in Conferencing PIN Settings........................................................................ 28 Create or Modify Dial-in Conferencing PIN Settings for a Site or Group of Users .............................. 29 Delete Dial-in Conferencing PIN Settings for a Site or Group of Users.............................................. 29Managing Monitoring................................................................................................................................ 29 Create a Site Policy for Call Detail Recording....................................................................................... 29 Create a Site Policy for Quality of Experience....................................................................................... 29 Enable Call Detail Recording................................................................................................................. 30 Enable Quality of Experience................................................................................................................ 30 Configure Call Detail Recording............................................................................................................ 30 Configure Quality of Experience............................................................................................................ 30 Delete a Site Policy for Call Detail Recording........................................................................................ 30 Delete a Site Policy for Quality of Experience....................................................................................... 31Configuring Your Network......................................................................................................................... 31 Enabling Call Admission Control............................................................................................................ 31 Enabling Media Bypass......................................................................................................................... 31 Configuring Location Policy................................................................................................................... 32 Configuring Bandwidth Policy Profile..................................................................................................... 32 Configuring Network Regions................................................................................................................ 33 Configuring Network Sites..................................................................................................................... 33 Configuring Network Subnets................................................................................................................ 34 Configuring Network Region Links........................................................................................................ 35
    • Configuring Network Region Routes..................................................................................................... 35Prevent New Connections to Lync Server 2010 for Server Maintenance ................................................. 36 Prevent New Connections to Lync Server............................................................................................. 36Delegating Control of Lync Server 2010................................................................................................... 36 Assigning an RBAC Role to a User....................................................................................................... 36 Assigning a User to a Security Group................................................................................................ 36Managing Response Groups.................................................................................................................... 37 Managing Agent Groups........................................................................................................................ 37 Create an Agent Group...................................................................................................................... 37 Change Agent Group Settings or Members........................................................................................ 37 Delete an Agent Group....................................................................................................................... 38 Managing Response Group Queues..................................................................................................... 38 Create a Response Group Queue...................................................................................................... 38 Change a Response Group Queue.................................................................................................... 38 Delete a Response Group Queue...................................................................................................... 38 Managing Response Group Workflows................................................................................................. 39 Create a Response Group Workflow.................................................................................................. 39 Change a Response Group Workflow................................................................................................ 40 Delete a Response Group Workflow.................................................................................................. 41Configuring Security.................................................................................................................................. 41 Create a New Registrar......................................................................................................................... 41 Modify an Existing Registrar.................................................................................................................. 41 Delete a Registrar.................................................................................................................................. 41 Create a New Web Service................................................................................................................... 42 Modify an Existing Web Service............................................................................................................ 42 Delete a Web Service............................................................................................................................ 42 Create a New PIN Policy....................................................................................................................... 43 Modify an Existing PIN Policy................................................................................................................ 43 Delete a PIN Policy................................................................................................................................ 43Edit or Configure Simple URLs................................................................................................................. 43 Configure Simple URLs......................................................................................................................... 43Configure a New Trusted Application Server............................................................................................ 44 Configure a Trusted Application Pool..................................................................................................... 44Change the Web Services URL................................................................................................................ 44 Change the Web Services URL............................................................................................................. 44
    • 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. TheMicrosoft Lync Server 2010 Administration Guide contains useful information about Lync Servermanagement. However, there is one thing thats missing from the Administration Guide: Lync ServerWindows PowerShell commands. Granted, there are a handful of commands scattered throughout theGuide, but those are primarily commands used for tasks (such as configuring an Address Book server)that cant be done using the Lync Server Control Panel. For most management activities (creating anarchiving policy, removing a dial-in conferencing access number, putting a domain on the list of blockeddomains) the Guide provides step-by-step instructions for performing the task using the Control Panel,but doesnt let you know how (or even if) you can do the same thing using Lync Server WindowsPowerShell.Which is exactly why weve put together this supplement to the Administration Guide. What weve done isgone through the Administration Guide, identified all the tasks that dont include a Windows PowerShelloption, and provided the Windows PowerShell option. For example, the Administration Guide offers thesesteps 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, weve offered a Lync Server Windows PowerShell equivalent:Set-CsUCPhoneConfiguration -Identity global –EnforcePhoneLock $True –PhoneLockTimeout 00:30:00Like we said, we consider this to be a supplement to the Administration Guide; its definitely not areplacement for the Guide. The Administration Guide includes a lot of useful information that explainswhat phone locking is and why you might want to use it. We dont offer any of that kind of information; wejust provide you with a one-sentence introduction and then a Windows PowerShell command that showsyou 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 WindowsPowerShell commands and paste them into the appropriate sections in that Guide. That way youd havethe best of both worlds: all the explanatory information and Control Panel steps found in the Guide, andall 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. Italso 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 athttp://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
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementManaging ArchivingConfiguring Support for Archiving of Internal and ExternalCommunicationsChange the Global Policy for Archiving of Internal and ExternalCommunications To change the global policy for archivingTo modify the global archiving policy, use the Set-CsArchivingPolicy cmdlet and set the Identity toglobal:Set-CsArchivingPolicy -Identity global -ArchiveInternal $True –ArchiveExternal$TrueAlternatively, 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 $TrueCreate 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 $TrueEnable 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 $FalseCreate 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 $TrueEnable 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$FalseDelete 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:Remove-CsArchivingPolicy -Identity "RedmondArchivingPolicy"This command removes all the archiving policies configured at the site scope: 2
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementGet-CsArchivingPolicy –Filter "site:*" | Remove-CsArchivingPolicyAnd this one removes all the archiving policies configured at the per-user scope:Get-CsArchivingPolicy –Filter "tag:*" | Remove-CsArchivingPolicyApply 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 ofthe PolicyName property to null:Grant-CsArchivingPolicy –Identity "Ken Myer" –PolicyName $NullFor 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=230863Enable or Disable Archiving To enable or disable archiving for a policyTo disable archiving, use the Set-CsArchivingConfiguration cmdlet and set the EnableArchivingproperty to None:Set-CsArchivingConfiguration –Identity global –EnableArchiving NoneFor 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=230865Specify 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 theEnableArchiving property to ImOnly:Set-CsArchivingConfiguration –Identity global –EnableArchiving ImOnlyTo archive both instant message sessions and conferences, set EnableArchiving to ImAndWebConf:Set-CsArchivingConfiguration –Identity global –EnableArchiving ImAndWebConfTo disable archiving altogether, set EnableArchiving to None:Set-CsArchivingConfiguration –Identity global –EnableArchiving NoneFor 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 3
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementEnable 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 30As shown above, you can also use the KeepArchivingDataForDays parameter to specify the number ofdays that records should be kept in the database.To disable purging, set the EnablePurging property to False:Set-CsArchivingConfiguration –Identity global –EnablePurging $FalseFor 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=230865Block 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 $TrueTo allow instant message sessions and conferences if archiving fails set the BlockOnArchiveFailureproperty to False:Set-CsArchivingConfiguration –Identity global –BlockOnArchiveFailure $FalseFor 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=230865Enable or Disable Sending an Archiving Disclaimer to FederatedPartners 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 toTrue:Set-CsAccessEdgeConfiguration –Identity global -EnableArchivingDisclaimer$TrueTo prevent the display of the archiving disclaimer, set the EnableArchivingDisclaimer property to False:Set-CsAccessEdgeConfiguration –Identity global -EnableArchivingDisclaimer$FalseFor 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 4
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementConfiguring Support for Clients and DevicesSpecify 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 rulesassociated 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 commandsremoves all the current client version policy rules from the Redmond site policy, copies the client versionpolicy 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 RulesSet-CsClientVersionPolicy -Identity site:Redmond -Rules $xFor 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=230869View 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 followingcommand:Get-CsService | Select-Object Role, PoolFqdn | Sort-Object PoolFqdn, RoleTo 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, RoleFor More Information • Haiku #71: The CsService Cmdlets at http://go.microsoft.com/fwlink/?LinkId=230871Modify the Default Action for Clients Not Explicitly Supported orRestricted 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 theSet-CsClientVersionConfiguration cmdlet and set the value of the DefaultAction property.Set-CsClientVersionConfiguration –Identity global -DefaultAction"BlockWithUrl" -DefaultURL "https://litwareinc.com/csclients" To disable client version controlTo disable client version control, use the Set-CsClientVersionConfiguration cmdlet and set the Enabledproperty to False:Set-CsClientVersionConfiguration –Identity global –Enabled $FalseTo enable client version control, set the Enabled property to True: 5
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementSet-CsClientVersionConfiguration –Identity global –Enabled $TrueFor 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=230881View 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-CsDeviceUpdateRuleThis 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-dc2d9b1222ff9To reject a device update rule, use the Reset-CsDeviceUpdateRule cmdlet:Reset-CsDeviceUpdateRule -Identity service:WebServer:atl-cs-001.litwareinc.com/d5ce3c10-2588-420a-82ac-dc2d9b1222ff9To 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-dc2d9b1222ff9For 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=230885Add 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 createsa new test device, using the serial number of the device as the unique identifier:New-CsTestDevice -Identity site:Redmond/UCPhone -IdentifierType SerialNumber-Identifier "07823-A345"For More Information • Haiku #40: The CsTestDevice Cmdlets at http://go.microsoft.com/fwlink/?LinkId=230884 • The New Test Device Dialog http://go.microsoft.com/fwlink/?LinkId=23088Modify Settings for Log Files of Device Update Activity To change logging settingsTo modify logging settings for the device update service, use the Set-CsDeviceUpdateConfigurationcmdlet: 6
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementSet-CsDeviceUpdateConfiguration -Identity global -MaxLogFileSize 2048000-MaxLogCacheLimit 1024000For 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-CsUCPhoneConfigurationcmdlet:Set-CsUCPhoneConfiguration -Identity global -SIPSecurityMode "Medium"For More Information • Haiku #15: The CsUCPhoneConfiguration Cmdlets at http://go.microsoft.com/fwlink/? LinkId=230889Configure 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 50For More Information • Haiku #15: The CsUCPhoneConfiguration Cmdlets at http://go.microsoft.com/fwlink/? LinkId=230889Configure Phone Lock for Lync 2010 Phone Edition To configure the phone lockTo enforce phone locking for Lync 2010 Phone Edition, use the Set-CsUCPhoneConfiguration cmdletand set the EnforcePhoneLock property to True. If desired, you can also change the value of thePhoneLockTimeout property:Set-CsUCPhoneConfiguration -Identity global –EnforcePhoneLock $True –PhoneLockTimeout 00:30:00For More Information • Haiku #15: The CsUCPhoneConfiguration Cmdlets at http://go.microsoft.com/fwlink/? LinkId=230889Configuring Incoming Call Handling FeaturesConfigure Phone Number Extensions for Parking CallsCreate 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 andend numbers in the range: 7
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementNew-CsCallParkOrbit -Identity "Redmond CPO 1" -NumberRangeStart 100-NumberRangeEnd 199 -CallParkService ApplicationServer:pool0.litwareinc.comChange 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 699Delete 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-CsCallParkOrbitFor More Information • Haiku #27: The CsCallParkOrbit Cmdlets at http://go.microsoft.com/fwlink/?LinkId=230890Configure 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" -AnnouncementServiceApplicationServer:redmond.litwareinc.com -AnnouncementName "WelcomeAnnouncement"Change an Unassigned Number Range To change routing of unassigned phone numbersTo change an existing unassigned number range, use the Set-CsUnassignedNumber cmdlet. Thiscommand changes both the starting number and ending number for an unassigned number range:Set-CsUnassignedNumber -Identity UNSet1 -NumberRangeStart "+14255551000"-NumberRangeEnd "+14255551900"Delete an Unassigned Number Range To delete an unassigned number rangeTo delete an unassigned number range, use the Remove-CsUnassignedNumber cmdlet:Remove-CsUnassignedNumber -Identity UNSet1The following command enables you to delete all your unassigned number ranges:Get-CsUnassignedNumber | Remove-CsUnassignedNumberFor 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 8
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementConfiguring Voice RoutingConfiguring Dial Plans and Normalization RulesCreate a Dial Plan To create a dial planTo create a new dial plan, use the New-CsDialPlan cmdlet:New-CsDialPlan -Identity site:Redmond -SimpleName RedmondSiteDialPlanThe following command creates a new dial plan, then uses the New-CsVoiceNormalizationRule cmdletto immediately add a new normalization rule to that dial plan:New-CsDialPlan -Identity site:Redmond -SimpleName RedmondSiteDialPlanNew-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 8For 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=230986Create or Modify a Normalization Rule Manually To define a normalization rule manuallyTo create a new voice normalization rule, use the New-CsVoiceNormalizationRule cmdlet. Thefollowing rule has the name SeattleFourDigit and will be assigned to the dial plan SeattleUser:New-CsVoiceNormalizationRule -Parent SeattleUser -Name SeattleFourDigit-Description "Dialing with internal four-digit extension" -Pattern ^(d{4})$-Translation +1206555$1For More Information • The New Normalization Rule Dialog at http://go.microsoft.com/fwlink/?LinkId=230986Configuring Voice Policies, PSTN Usage Records, and Voice RoutesConfiguring Voice Policies and PSTN Usage Records to Authorize CallingFeatures and PrivilegesCreate 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"} 9
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementModify 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 UsageConfiguring Voice Routes for Outbound CallsCreate 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 newPSTN gateway to a voice route:$y = Get-CsVoiceRoute -Identity Route1$y.PstnGatewayList.Add("PstnGateway:192.168.0.100")Set-CsVoiceRoute -Instance $yFor 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=230993Configuring Trunks and Translation RulesConfigure 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 theEnableBypass property to True:New-CsTrunkConfiguration -Identity site:Redmond -EnableBypass $True –MaxEarlyDialogs 40 –SRTPMode Required 10
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementConfigure 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 theEnableBypass property to False:New-CsTrunkConfiguration -Identity site:Redmond -EnableBypass $False –MaxEarlyDialogs 40 –SRTPMode RequiredDefining Translation RulesCreate 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 404For 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=230996Exporting and Importing Voice Routing ConfigurationExport 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 theLync Server Control Panel. However, it is possible to export a voice route in an XML format that can laterbe imported using Windows PowerShell:Get-CsVoiceRoute –Identity "RedmondRoute" | Export-Clixml –Path"C:RoutesRedmondRoute.xml"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 followingcommand:Import-Clixml –Path "C:RoutesRedmondRoute.xml" | Set-CsVoiceRouteFor 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 11
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementTest Voice RoutingCreate 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 +5551212Run 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-CsVoiceTestConfigurationFor More Information • The Test-CsVoiceTestConfiguration Cmdlet at http://go.microsoft.com/fwlink/?LinkId=23100Managing External ConnectivityEnable or Disable External User Access for Your OrganizationEnable 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 theAllowOutsideUsers property to True:Set-CsAccessEdgeConfiguration –Identity global –AllowOutsideUsers $TrueTo disable remote user access, set the AllowOutsideUsers property to False:Set-CsAccessEdgeConfiguration –Identity global –AllowOutsideUsers $FalseEnable 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 theAllowFederatedUsers property to True:Set-CsAccessEdgeConfiguration –Identity global –AllowFederatedUsers $TrueTo disable federated user access, set the AllowFederatedUsers property to False:Set-CsAccessEdgeConfiguration –Identity global –AllowFederatedUsers $FalseEnable 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 theAllowAnonymousUsers property to True:Set-CsAccessEdgeConfiguration –Identity global –AllowAnonymousUsers $True 12
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementTo disable anonymous user access, set the AllowAnonymousUsers property to False:Set-CsAccessEdgeConfiguration –Identity global –AllowAnonymousUsers $FalseFor 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=230867Manage Communications with External UsersManage 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 $TrueManage Federated Partner AccessConfigure 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 $TrueEnable 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 cmdletand the UseDnsSrvRouting parameter, and set EnablePartnerDiscovery to True:Set-CsAccessEdgeConfiguration -UseDnsSrvRouting -EnablePartnerDiscovery $TrueTo disable automatic routing, use the UseDefaultRouting parameter, and set DefaultRouteFqdn to thefully 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" 13
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementEnable 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 toTrue:Set-CsAccessEdgeConfiguration –Identity global -EnableArchivingDisclaimer$TrueTo prevent the display of the archiving disclaimer, set the EnableArchivingDisclaimer property to False:Set-CsAccessEdgeConfiguration –Identity global -EnableArchivingDisclaimer$FalseFor 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=231005Manage IM Provider SupportConfigure 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 appropriateexternal access policy to True:New-CsExternalAccessPolicy -Identity site:Redmond -EnablePublicCloudAccess$TrueSpecify 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 toadd 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-CsConferencingPolicycmdlet to set the AllowAnonymousParticipantsInMeetings property of the appropriate conferencing policyto True: 14
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementSet-CsConferencingPolicy –Identity global-AllowAnonymousParticipantsInMeetings $TrueFor 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=231014Apply Policies for External User Access to UsersApply 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 nullvalue:Grant-CsExternalAccessPolicy –Identity "Ken Myer" –PolicyName $nullApply 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 $TrueTo prevent users from hosting meetings that include anonymous participants, setAllowAnonymousParticipantsInMeetings to False:Set-CsConferencingPolicy –Identity site:Redmond-AllowAnonymousParticipantsInMeetings $FalseReset or Delete External User Access PoliciesDelete 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 followedby the policy Identity:Remove-CsExternalAccessPolicy –Identity site:RedmondYou can also use this command to remove all the per-site policies:Get-CsExternalAccessPolicy –Filter "site:*" | Remove-CsExternalAccessPolicyTo delete a per-user policy, use the Remove-CsExternalAccessPolicy cmdlet followed by the policyIdentity: 15
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementRemove-CsExternalAccessPolicy –Identity "RedmondExternalAccessPolicy"This command removes all the per-user policies:Get-CsExternalAccessPolicy –Filter "tag:*" | Remove-CsExternalAccessPolicyReset 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 theRemove-CsExternalAccessPolicy cmdlet:Remove-CsExternalAccessPolicy –Identity globalNote that this command will not remove the global policy. However, all the properties in that policy will bereset 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=231003Filtering Instant Messages and Client VersionsConfiguring 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 setthe Identity to global. For example, this command adds the file extension .ps1 (the file extension used forWindows 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 transferredusing 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 FilterTo modify the default URL filter, use the Set-CsFileTransferFilterConfiguration cmdlet and set theIdentity to global. For example, this command adds the prefix .urn to the set of Uniform ResourceIdentifiers (URIs) that either cannot be included in an instant message or cannot be configured as aclickable link within an instant message: 16
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementSet-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-CsImFilterConfigurationcmdlet: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 • 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 PolicyNameparameter to a null value:Grant-CsClientVersionPolicy –Identity "Ken Myer" –PolicyName $NullFor 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=230869Managing Computers in Your TopologyView 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 theStatus area on the Topology page in the Lync Server Control Panel:$errorPref = $errorActionPreference$errorActionPreference = "SilentlyContinue"$arrObjects = @()$computers = Get-CsComputer | Sort-Object Identityforeach ($objComputer in $computers) { 17
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement $objSite = Get-CsPool -Identity $objComputer.pool | Select-Object Site $objReplication = $Null $objReplication = Get-CsManagementStoreReplicationStatus -ReplicaFqdn` $objComputer.Identity | Select-Object UpToDate $strReplication = $objSite.site -replace("Site:","") $objDisplayObject = New-Object PSObject Add-Member -InputObject $objDisplayObject -memberType NoteProperty ` -Name Identity -Value $objComputer.Identity Add-Member -InputObject $objDisplayObject -memberType NoteProperty ` -Name Pool -Value $objComputer.Pool Add-Member -InputObject $objDisplayObject -memberType NoteProperty ` -Name Site -Value $strReplication Add-Member -InputObject $objDisplayObject -memberType NoteProperty ` -Name UpToDate -Value $objReplication.UpToDate $arrObjects += $objDisplayObject}$labels = @{Expression={$_.Identity};Label="Computer"}, ` @{Expression={$_.Pool};Label="Pool"}, ` @{Expression={$_.Site};Label="Site"}, ` @{Expression={$_.UpToDate};Label="Replication"}$arrObjects | Format-Table $labels$errorActionPreference = $errorPrefTo use this script, copy the code, paste it into a text editor, and then save the file using a .ps1 fileextension (for example, C:ScriptsStatus.ps1). From there all you have to do is run the script from withinthe Lync Server Management Shell. For example: C:ScriptsStatus.ps1For 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=231027View 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 followingcommand:Get-CsService | Select-Object Role, PoolFqdn | Sort-Object PoolFqdn, RoleTo 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 18
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementFor More Information • Haiku #71: The CsService Cmdlets at http://go.microsoft.com/fwlink/?LinkId=230871View 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-CsServicecmdlet followed by the service Identity:Get-CsService –Identity service:Registrar:atl-cs-001.litwareinc.comTo view detailed information for all your Lync Server services or server roles, call Get-CsService withoutany parameters:Get-CsServiceFor More Information • Haiku #71: The CsService Cmdlets at http://go.microsoft.com/fwlink/?LinkId=230871Start 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.comNote that the ComputerName parameter is not required if you are starting the Lync Server services on thelocal 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.comUse the Stop-CsWindowsService cmdlet to stop a specified service:Stop-CsWindowsService –Name "RTCRGS" -ComputerName atl-cs-001.litwareinc.comFor More Information • Haiku #51: The CsWindowsService Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231028Prevent 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 –GracefulThe Graceful parameter used with the Stop-CsWindowsService cmdlet ensures that all existingsessions 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 19
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementFor More Information • Haiku #51: The CsWindowsService Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231028View Microsoft SIP Processing Language (MSPL) Server ApplicationsTo return information for all of your MSPL server applications, use the Get-CsServerApplication cmdlet:Get-CsServerApplicationThe 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"For More Information • The Server Application Dialog at http://go.microsoft.com/fwlink/?LinkId=231029Enable 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 Enabledproperty to True:Set-CsServerApplication -Identity "Registrar:atl-cs-001.litwareinc.com/ExumRouting" -Enabled $TrueTo disable an MPSL server application, set the Enabled property to False:Set-CsServerApplication -Identity "Registrar:atl-cs-001.litwareinc.com/ExumRouting" -Enabled $FalseFor More Information • The Server Application Dialog at http://go.microsoft.com/fwlink/?LinkId=231029Mark a Microsoft SIP Processing Language (MSPL) Application asCritical 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 theCritical property to True:Set-CsServerApplication -Identity "Registrar:atl-cs-001.litwareinc.com/QoEAgent" -Critical $TrueTo 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 $FalseFor More Information • The Server Application Dialog at http://go.microsoft.com/fwlink/?LinkId=231029 20
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementView a List of Trusted Applications To view a list of trusted applicationsTo return information for all your trusted applications, call Get-CsTrustedApplication without anyparameters:Get-CsTrustedApplicationTo return information about a single application, use the Identity parameter followed by the applicationIdentity:Get-CsTrustedApplication -Identity TrustPool.litwareinc.com/tapp2For More Information • The Trusted Application Dialog at http://go.microsoft.com/fwlink/?LinkId=231030View the Simple URL Details To view Simple URL detailsTo return information about the Simple URLs configured for use in your organization, use the followingcommand:Get-CsSimpleUrlConfiguration | Select-Object –Expand SimpleUrlFor More Information • Haiku #29: The CsSimpleUrlConfiguration Cmdlets at http://go.microsoft.com/fwlink/? LinkId=231035Managing UsersSearch 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 cmdletand the Filter parameter. For example, this command searches for all users who have not been assigneda 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-CsUsercmdlet and the LdapFilter parameter. For example, this command searches for all users who aremembers 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=231038Add 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.comThe preceding command includes the SipAddressType and SipDomain parameters; this causes LyncServer to automatically create a SIP address for the user based (in this case) on the users 21
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementSamAccountName and the domain name litwareinc.com. Alternatively, you can use the SipAddressparameter to assign a specific SIP address to a user:Enable-CsUser -Identity "Pilar Ackerman" -RegistrarPool "atl-cs-001.litwareinc.com" –SipAddress "sip:pilar@litwareinc.com"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 • Enable-CsUser Cmdlet at http://go.microsoft.com/fwlink/?LinkId=212121Enable 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 users 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. (Notethat the users Active Directory user account will not be deleted.) If you later decide to once more give theuser access to Lync Server you will need to re-run the Enable-CsUser cmdlet, reassign any per-userpolicies, and reset property values such as the users line URI and SIP address.To temporarily disable a Lync Server user account, use the Set-CsUser cmdlet to set the accountsEnabled property to False:Set-CsUser –Identity "Ken Myer" –Enabled $FalseWhen you run the preceding command the user will still have a valid Lync Server account, and thataccount will retain all its current settings (including any per-user policies that have been assigned to theuser). 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-CsUsercmdlet to set the accounts Enabled property to True:Set-CsUser –Identity "Ken Myer" –Enabled $TrueFor 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=231047Set, View, and Send a Users 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 haveLync 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-------- --- -------- 22
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementSip:kmyer@litwareince.com 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 18723834You can also pipe multiple user accounts to Set-CsClientPin and Lync Server will automatically assign anew PIN number to each of those accounts. For example:Get-CsUser –LdapFilter "Department=IT" | Set-CsClientPinFor More Information • Haiku #95: The CsClientPin Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231048Move 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 Directorydisplay 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 retrieveall 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-CsUsercmdlet and the LdapFilter parameter to retrieve the desired set of users. After retrieving the appropriateuser 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=231049Assign Policies to UsersAssign a Conferencing Policy to Modify a Users Default MeetingExperience To assign a per-user conferencing policyTo assign a per-user conferencing policy to a user, use a command similar to this, specifying the Identityof the per-user policy as the parameter value for the PolicyName parameter:Grant-CsConferencingPolicy –Identity "Ken Myer" –PolicyName"RedmondConferencingPolicy" 23
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementIf you later decide to remove that conferencing policy (and thus have the user managed by the globalpolicy or his or her site policy) use the following command, which sets the PolicyName property to a nullvalue:Grant-CsConferencingPolicy –Identity "Ken Myer" –PolicyName $NullSpecify 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 Identityof 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 globalpolicy, a service policy, or his or her site policy) use the following command, which sets the PolicyNameproperty to a null value:Grant-CsClientVersionPolicy –Identity "Ken Myer" –PolicyName $NullAssign 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 theper-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 hisor her site policy) use the following command, which sets the PolicyName property to a null value:Grant-CsPinPolicy –Identity "Ken Myer" –PolicyName $NullApply 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 theIdentity 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 globalpolicy or his or her site policy) use the following command, which sets the PolicyName property to a nullvalue:Grant-CsExternalAccessPolicy –Identity "Ken Myer" –PolicyName $NullConfigure Archiving of a Users 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 ofthe 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 policyor 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 24
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementAssign 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 Identityof 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=231050Enable 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 toTrue 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=231051Configure 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 auser 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 remotecall 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 25
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementManaging On-Premises MeetingsConfiguring Conferencing SettingsModify 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 $FalseNote that you can also modify the global policy by leaving out the Identity parameter altogether:Set-CsConferencingPolicy -AllowAnonymousParticipantsInMeetings $False-EnableDialInConferencing $FalseCreate or Modify Conferencing User Experience for a Site or Group ofUsers 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 $FalseTo 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 $TrueBe sure to specify a policy Identity. If you leave off the Identity Set-CsConferencingPolicy will modify theglobal policy instead.To make the same modification to all your conferencing policies (including the global policy), use acommand similar to this one:Get-CsConferencingPolicy | Set-CsConferencingPolicy-AllowAnonymousParticipantsInMeetings $TrueThis command modifies only your per-user conferencing policies:Get-CsConferencingPolicy –Filter "tag:*" | Set-CsConferencingPolicy-AllowAnonymousParticipantsInMeetings $TrueDelete 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:RedmondIf you try to remove a per-user policy that is currently assigned to one or more users you will be promptedto first unassign the policy from each user and then delete the policy. (You can remove a policy withoutunassigning it, but, from then on, any time you call a user management cmdlet you will receive warningsabout policies that can no longer be found.) To unassign a per-user policy and then remove that policyuse commands similar to these: 26
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementGet-CsUser -Filter {ConferencingPolicy -eq "RedmondConferencingPolicy"} |Grant-CsConferencingPolicy -PolicyName $NullRemove-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=231014Configuring the Meeting Join ExperienceModify 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 theIdentity to global:Set-CsMeetingConfiguration -Identity global -DesignateAsPresenter EveryoneAlternatively, you can omit the Identity altogether:Set-CsMeetingConfiguration -DesignateAsPresenter EveryoneIf 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 -DesignateAsPresenterEveryoneTo create new meeting configuration settings for a pool, set the Identity parameter to the service locationfor 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-CsMeetingConfigurationcmdlet:Set-CsMeetingConfiguration -Identity site:Redmond -DesignateAsPresenter NoneWhen calling Set-CsMeetingConfiguration, be sure to include the Identity for the meeting configurationsettings to be modified. If you do not, Set-CsMeetingConfiguration will automatically modify the globalsettings instead.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:RedmondTo remove the meeting configuration settings for a pool, use a command similar to this one, whichspecifies the identity of the User Server in the pool:Remove-CsMeetingConfiguration -Identity "service:UserServer:atl-cs-001.litwareinc.com" 27
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementFor 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=231053Configure 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:RedmondDialIn@litwareinc.com" -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:RedmondDialIn@litwareinc.com" -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 andspecify the numbers SIP address as the Identity:Remove-CsDialInConferencingAccessNumber -Identity"sip:RedmondDialIn@litwareinc.com"You can also use a command like this one to delete all your dial-in access numbers:Get-CsDialInConferencingAccessNumber | Remove-CsDialInConferencingAccessNumberFor 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=231055Configure Dial-in Conferencing Personal Identification Number (PIN)RulesModify 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 10Alternatively, you can leave out the Identity parameter altogether:Set-CsPinPolicy -MinPasswordLength 10If you do not specify an Identity, Set-CsPinPolicy will modify the global policy. 28
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementCreate or Modify Dial-in Conferencing PIN Settings for a Site or Group ofUsers 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 10To 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 6Delete 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:RedmondThis command removes all the per-site PIN policies:Get-CsPinPolicy –Filter "site:*" | Remove-CsPinPolicyAnd this one removes all the per-user PIN policies:Get-CsPinPolicy –Filter "tag:*" | Remove-CsPinPolicyFor 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=231057Managing MonitoringCreate 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:New-CsCdrConfiguration -Identity site:Redmond -EnableCDR $True –EnablePurging$True –KeepCallDetailForDays 30 –KeepErrorReportForDays 30For 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=231061Create 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 30For 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 29
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementEnable 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 $TrueFor 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=231061Enable 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 $TrueFor 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=231064Configure Call Detail Recording To specify retention of CDR dataTo specify the number of days CDR data will be retained, use the Set-CsCdrConfiguration cmdlet andthe KeepCallDetailForDays and KeepErrorReportForDays parameters:Set-CsCdrConfiguration -Identity site:Redmond –EnablePurging $True –KeepCallDetailForDays 30 –KeepErrorReportForDays 30For 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=231061Configure Quality of Experience To specify retention of QoE dataTo specify the number of days QoE data will be retained, use the Set-CsQoEConfiguration cmdlet andthe KeepQoEDataForDays parameter:Set-CsQoEConfiguration -Identity site:Redmond –EnablePurging $True-KeepQoEDataForDays 30For 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=231064Delete a Site Policy for Call Detail Recording To delete a CDR policyTo delete the Call Detail Recording configuration settings for site, use the Remove-CsCdrConfigurationcmdlet:Remove-CsCdrConfiguration -Identity site:RedmondTo delete all the per-site settings, use this command: 30
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementGet-CsCdrConfiguration –Filter "site:*" | Remove-CsCdrConfigurationFor 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=231061Delete 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:RedmondTo delete all the per-site settings, use this command:Get-CsQoEConfiguration –Filter "site:*" | Remove-CsQoEConfigurationFor 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=231064Configuring Your NetworkEnabling Call Admission Control To enable CACTo enable Call Admission Control, use the Set-CsNetworkConfiguration cmdlet and set theEnableBandwidthPolicyCheck parameter to True:Set-CsNetworkConfiguration –Identity global –EnableBandwidthPolicyCheck $TrueTo disable Call Admission Control, set the EnableBandwidthPolicyCheck parameter to False:Set-CsNetworkConfiguration –Identity global –EnableBandwidthPolicyCheck $FalseFor 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=231066Enabling 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 towrite the changes to Lync Server:$x = (Get-CsNetworkConfiguration).MediaBypassSettings$x.AlwaysBypass = $True$x.Enabled = $True$x.InternalBypassMode = "Any"Set-CsNetworkConfiguration -MediaBypassSettings $xA similar process is used to disable media bypass for Call Admission Control:$x = (Get-CsNetworkConfiguration).MediaBypassSettings 31
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement$x.AlwaysBypass = $False$x.Enabled = $False$x.InternalBypassMode = $NullSet-CsNetworkConfiguration -MediaBypassSettings $xFor 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=231066Configuring Location Policy To view location policiesTo view all your location policies, use the Set-CsLocationPolicy cmdlet:Get-CsLocationPolicyThis 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$TrueLocation policies can be created at either the site or the per-user scope. 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:RedmondThe following command removes all the location policies configured at the site scope:Get-CsLocationPolicy –Filter "site:*" | Remove-CsLocationPolicyAnd this command removes all the location policies configured at the per-user scope:Get-CsLocationPolicy –Filter "tag:*" | Remove-CsLocationPolicyFor 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=231068Configuring Bandwidth Policy Profile To create a new bandwidth policy profileTo create a new bandwidth policy profile use the New-CsNetworkBandwidthPolicyProfile cmdlet: 32
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementNew-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 LowBWLimitsThis command deletes all your bandwidth policy profiles:Get-CsNetworkBandwidthPolicyProfile | Remove-CsNetworkBandwidthPolicyProfileFor 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=231072Configuring Network Regions To create a network regionTo create a network region use the New-CsNetworkRegion cmdlet. Note that each new region must beassociated with a central site:New-CsNetworkRegion -Identity NorthAmerica -Description "All North AmericanLocations" -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 NorthAmericaThis command removes all the network regions configured for use in your organization:Get-CsNetworkRegion | Remove-CsNetworkRegionAnd this command removes all the network regions associated with the Redmond central site:Get-CsNetworkRegion | Where-Object {$_.CentralSite -eq "site:Redmond"} |Remove-CsNetworkRegionFor More Information • Haiku #123: The CsNetworkRegion Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231073Configuring Network Sites To create a network siteTo create a new network site, use the New-CsNetworkSite cmdlet: 33
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementNew-CsNetworkSite -Identity Paris -NetworkRegionID EMEA -BWPolicyProfileIDLowBWLimits 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 VancouverThis command removes all the network sites configured for use in your organization:Get-CsNetworkSite | Remove-CsNetworkSiteAnd this one removes all the network sites associated with the Northwest region:Get-CsNetworkSite | Where-Object {$_.NetworkRegionID –eq "Northwest"} |Remove-CsNetworkSiteFor 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=231077Configuring 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 -NetworkSiteIDVancouver 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.0To delete all your subnets, use this command:Get-CsNetworkSubnet | Remove-CsNetworkSubnetOr use this command to delete all the subnets on the network segment 192.168.*.*:Get-CsNetworkSubnet –Filter "192.168.*" | Remove-CsNetworkSubnetFor More Information • Haiku #129: The CsNetworkSubnet Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231078 34
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementConfiguring Network Region LinksTo create a network region linkTo create a new network region link, use the New-CsNetworkRegionLink cmdlet, specifying the tworegions to be connected by the link. Note that it does not matter which region is listed asNetworkRegionID1 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_EMEAThis command removes all the network region links configured for use in your organization:Get-CsNetworkRegionLink | Remove-CsNetworkRegionLinkFor More Information • Haiku #134: The CsNetworkRegionLink Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231079Configuring Network Region Routes To create a network region routeTo create a new network region route, use the New-CsNetworkInterRegionRoute cmdlet, specifying thetwo regions to be connected by the route. Note that it does not matter which region is listed asNetworkRegionID1 and which region is listed as NetworkRegionID2:New-CsNetworkInterRegionRoute -Identity NA_APAC_Route -NetworkRegionID1NorthAmerica -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_RouteThis command removes all the network region routes configured for use in your organization:Get-CsNetworkInterRegionRoute | Remove-CsNetworkInterRegionRouteAnd 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 35
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementFor 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=231083Prevent New Connections to Lync Server 2010 forServer MaintenancePrevent 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 PausedFor More Information • The Set-Service Cmdlet at http://go.microsoft.com/fwlink/?LinkId=113399Delegating Control of Lync Server 2010Assigning an RBAC Role to a UserAssigning a User to a Security GroupTo assign an RBAC role to a user you simply make that user a member of the security group associatedwith the RBAC role; for example, to assign a user to the CsHelpDesk role all you have to do is make thatuser a member of the CsHelpDesk group. Lync Server 2010 does not provide any cmdlets that can beused to assign a user to a security group. However, you can assign a user to a security group by usingthe 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" 36
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement$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 fileextension (for example, C:ScriptsAssign-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 assignedthe role (e.g., Ken Myer): C:ScriptsAssign-RBACRole.ps1 "CsHelpDesk" "Ken Myer"For More Information • Add a User to an RBAC Group at http://go.microsoft.com/fwlink/?LinkId=231085Managing Response GroupsManaging Agent GroupsCreate an Agent Group To create an agent groupTo create a new Response Group agent group, use the New-CsRgsAgentGroup cmdlet. This commanduses 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:kenmyer@litwareinc.com","sip:pilarackerman@litwareinc.com"By comparison, this command uses the DistributionGroupAddress parameter to add all the members ofthe helpdesk@litwareinc.com distribution group to the agent group:New-CsRgsAgentGroup -Parent service:ApplicationServer:atl-cs-001.litwareinc.com -Name "Help Desk Group" -DistributionGroupAddress"helpdesk@litwareinc.com"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 toretrieve an object reference to the agent group to be changed. After making your changes in memory, usethe 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 $xThis 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 = "helpdesk@litwareinc.com"Set-CsRgsAgentGroup -Instance $xThe following commands add a new agent to an agent group:$x = Get-CsRgsAgentGroup -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name "Help Desk" 37
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement$x.AgentsByUri.Add("sip:kenmyer@litwareinc.com")Set-CsRgsAgentGroup -Instance $xAnd 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:kenmyer@litwareinc.com")Set-CsRgsAgentGroup -Instance $xDelete 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-CsRgsAgentGroupThis command deletes all the agent groups currently configured for use in your organization:Get-CsRgsAgentGroup | Remove-CsRgsAgentGroupFor More Information • Haiku #12: The CsRgsAgentGroup Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231086Managing Response Group QueuesCreate a Response Group Queue To create a queueTo create a new Response Group queue, use the New-CsRgsQueue cmdlet. The following set ofcommands creates a new queue, and uses the New-CsRgsCallAction cmdlet to specify what shouldhappen if the queue receives too many calls at the same time:$x = New-CsRgsCallAction -Action TransferToVoicemailUri -Uri "sip:+14255551298@litwareinc.com"New-CsRgsQueue -Parent service:ApplicationServer:atl-cs-001.litwareinc.com-Name "Help Desk" -OverflowCandidate "OldestCall" -OverflowAction $x-OverflowThreshold 2Change a Response Group Queue To change a queueTo modify a Response Group queue, you must first use the Get-CsRgsQueue cmdlet to retrieve anobject 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 $xDelete a Response Group Queue To delete a queueTo delete a Response Group queue, use the Remove-CsRgsQueue cmdlet: 38
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementGet-CsRgsQueue -Identity service:ApplicationServer:atl-cs-001.litwareinc.com-Name "Help Desk Queue" | Remove-CsRgsQueueThe following command removes all the Response Group queues configured for use in your organization:Get-CsRgsQueue | Remove-CsRgsQueueFor More Information • Haiku #23: The CsRgsQueue Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231087Managing Response Group WorkflowsCreate a Response Group WorkflowCreate 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 $queueNew-CsRgsWorkflow -Parent service:ApplicationServer:atl-cs-001.litwareinc.com-Name "Help Desk" -PrimaryUri "sip:helpdesk@litwareinc.com" -DefaultAction$callActionCreate 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:franz@contoso.com","sip:marco@contoso.com")$Group_Support = New-CsRgsAgentGroup -Parent $ServiceId -Name "ContosoSupport" -AgentAlertTime 20 -ParticipationPolicy Informal -RoutingMethodLongestIdle -AgentsByUri("sip:david@contoso.com","sip:john@contoso.com")$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 wereconnecting you with the Contoso Sales department."$ActionA1 = New-CsRgsCallAction -Prompt $PromptA1 -Action TransferToQueue-QueueID $Queue_Sales.Identity 39
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement$Answer1 = New-CsRgsAnswer -Action $ActionA1 -DtmfResponse 1$PromptA2 = New-CsRgsPrompt -TextToSpeechPrompt "Please wait while wereconnecting you with the Contoso Support department."$ActionA2 = New-CsRgsCallAction -Prompt $PromptA2 -Action TransferToQueue-QueueID $Queue_Support.Identity$Answer2 = New-CsRgsAnswer -Action $ActionA2 -DtmfResponse 2$PromptQ = New-CsRgsPrompt -TextToSpeechPrompt "Thank you for calling Contoso.To speak with a Sales representative, press 1. To be connected with ourSupport line, press 2."$Question = New-CsRgsQuestion -Prompt $PromptQ -AnswerList ($Answer1,$Answer2)$ActionWM = New-CsRgsCallAction -Action TransferToQuestion -Question $Question$Workflow = New-CsRgsWorkflow -Parent $ServiceId -Name "Contoso Helpdesk"-Description "The Contoso Helpdesk line." -PrimaryUri"sip:helpdesk@contoso.com" -LineUri "tel:+14255554321" -DisplayNumber "+1(425) 555-4321" -Active $true -Anonymous $true -DefaultAction $ActionWMChange a Response Group WorkflowChange 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 tothe workflow to be modified, make your changes in memory, and then use the Set-CsRgsWorfklowcmdlet 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.IdentitySet-CsRgsWorkflow -Instance $yChange an Interactive Workflow To change an interactive workflowTo modify an interactive workflow, use the Get-CsRgsWorkflow cmdlet to create an object reference tothe workflow to be modified, make your changes in memory, and then use the Set-CsRgsWorfklowcmdlet to write those changes to Lync Server:$musicFile = Get-Content -ReadCount 0 -Encoding Byte C:MediaFilesHold.wav |Import-CsRgsAudioFile -Identity Service:ApplicationServer:atl-cs-001.litwareinc.com -FileName "HelpDeskHoldMusic.wav" 40
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement$y = Get-CsRgsWorkflow -Identity Service:ApplicationServer:atl-cs-001.litwareinc.com -Name "Help Desk"$y.CustomMusicOnHoldFile = $musicFileSet-CsRgsWorkflow -Instance $yDelete a Response Group Workflow To delete a workflowTo delete a Response Group workflow use the Get-CsRgsWorkflow cmdlet to return an instance of theworkflow 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-CsRgsWorkflowThis command deletes all the workflows configured for use in your organizationGet-CsRgsWorkflow | Remove-CsRgsWorkflowFor 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=231091Configuring SecurityCreate 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 $TrueFor More Information • The Edit Registrar Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=231092Modify an Existing Registrar To modify an existing RegistrarTo modify an existing collection of proxy configuration settings, use the Set-CsProxyConfigurationcmdlet:Set-CsProxyConfiguration -Identity "service:Registrar:atl-cs-001.litwareinc.com" -UseCertificateForClientToProxyAuth $FalseFor More Information • The Edit Registrar Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=231092Delete a Registrar To delete a RegistrarTo delete a collection of proxy configuration settings, use the Remove-CsProxyConfiguration cmdlet: 41
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementRemove-CsProxyConfiguration -Identity "service:Registrar:atl-cs-001.litwareinc.com"This command removes all the proxy configuration settings assigned to the service scope:Get-CsProxyConfiguration –Filter "service:*" | Remove-CsProxyConfigurationAnd this command removes all the proxy configuration settings assigned to your Registrars:Get-CsProxyConfiguration –Filter "service:Registrar:*" | Remove-CsProxyConfigurationFor More Information • The Edit Registrar Setting Dialog at http://go.microsoft.com/fwlink/?LinkId=231092Create a New Web Service To create a Web ServiceTo create a new collection of Web Service configuration settings, use the New-CsWebServiceConfiguration cmdlet:New-CsWebServiceConfiguration -Identity site:Redmond –UseWindowsAuth Negotiate–UsePinAuth $FalseFor More Information • Haiku #122: The CsWebServiceConfiguration Cmdlets at http://go.microsoft.com/fwlink/? LinkId=231093Modify 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 $TrueFor More Information • Haiku #122: The CsWebServiceConfiguration Cmdlets at http://go.microsoft.com/fwlink/? LinkId=231093Delete 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:RedmondThis command deletes all the Web Service configuration settings assigned to the site scope:Get-CsWebServiceConfiguration –Filter "site:*" | Remove-CsWebServiceConfigurationFor More Information • Haiku #122: The CsWebServiceConfiguration Cmdlets at http://go.microsoft.com/fwlink/? LinkId=231093 42
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell SupplementCreate 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 8For More Information • Haiku #72: The CsPinPolicy Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231056Modify 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 6For More Information • Haiku #72: The CsPinPolicy Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231056Delete 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-CsPinPolicyAnd this command removes all the per-user PIN policies:Get-CsPinPolicy –Filter "tag:*" | Remove-CsPinPolicyFor More Information • Haiku #72: The CsPinPolicy Cmdlets at http://go.microsoft.com/fwlink/?LinkId=231056Edit or Configure Simple URLsConfigure 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 $urlEntry2New-CsSimpleUrlConfiguration -Identity "site:Redmond" -SimpleUrl@{Add=$simpleUrl,$simpleUrl2} 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" 43
    • Microsoft Lync Server 2010 Administration Guide – Windows PowerShell Supplement$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=231035Configure a New Trusted Application ServerConfigure 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 -Registrarpool0.litwareinc.com -Site RedmondEnable-CsTopologyFor More Information • The New-CsTrustedApplicationPool Cmdlet at http://go.microsoft.com/fwlink/?LinkId=231094Change the Web Services URLChange the Web Services URL Configure Web ServicesTo modify the Web Services URL used by external users, use the Set-CsWebServer cmdlet and set thevalue of the ExternalFqdn property:Set-CsWebServer –Identity WebServer:atl-cs-001.litwareinc.com –ExternalFqdnatl-ext-001.litwareinc.comFor More Information • The Set-CsWebServer Cmdlet at http://go.microsoft.com/fwlink/?LinkId=231095 44