• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Disclaimer & Policy

Elan Shudnow's Blog

MVP Logo
  • Azure
  • Exchange
  • Lync

New-CSMultiRegionNetwork.ps1 – Automate Lync Network Site and Subnet Creation

September 24, 2012 by Elan Shudnow 6 Comments

To Automate Lync Network Site and Subnet Creation with only one Lync Network Region, please see my New-CSSingleRegionNetwork.ps1 script here.

With Lync Server 2010 and 2013, there are Lync Regions, Lync Sites, and Lync Subnets.  There are three functions in which these can be utilized:

  • Call Admission Control
  • Controlling Media Bypass Behavior
  • Ability to assign a Location Policy to Network Sites so users 911 will route to a given gateway based on the Network Site they are currently located on
  • Provide Site to Site Media Quality behavior in the Monitoring Server Location Reports

Active Directory (AD) is a good starting point to gather all the information on your Sites as well as your Subnets.

Script Functionality

To help automate this process, I wrote the New-CSMultiRegionNetwork.ps1 script.  The purpose of this script is to:

  • Make a connection to AD and record every AD subnet that exists and its corresponding AD Site
  • Export Data to CSV
  • Allows you to specify Lync Network Regions and their corresponding Lync Central Sites
  • Allows you to assign Location Policies to Sites (Note: The Location Policies need to be created beforehand as the script will not create Location Policies)
  • Allows you to assign Bandwidth Policies to Sites (Note: The Bandwidth Policies need to be created beforehand as the script will not create Bandwidth Policies)
  • Will create the Lync Network Regions and assign them to the corresponding Lync Central Site as defined in the CSV
  • Will create the AD Site in Lync Network Sites
    • Something to note is that AD Sites support non-alphanumeric characters such as a hyphen while Lync Network Sites do not support non-alphanumeric characters.  Because of this, this script will create the Lync Network Site without any non-alphanumeric characters.  It is safe to re-run the script more than once as the script will always take notice that an AD Site with non-alphanumeric characters will match a Lync Network Site with non-alphanumeric characters.  Important: Be sure that you don’t have an AD Site that would match another AD Site if non-alphanumeric characters were to be removed.  An example if you had two AD Sites: One called Site01 and another called Site-01.  When the process to remove non-alphanumeric characters occur, they will both conflict.
    • If any Lync Network Sites are created, the script will pause for 15 seconds to allow the Lync Network Sites to instantiate.  If no Lync Network Sites exist, it will move immediately on to subnets.
    • It will create the Lync Network Subnets and assign them to their corresponding Lync Network Site
    • It will assign the Lync Bandwidth Policies and/or Lync Location Policies as defined in the CSV

Miscellaneous Notes

Something to note is that the script will function with one or more Lync Network Regions.  If you have only one Lync Network Region, please run my New-CSSingleRegionNetwork.ps1 script which will automate the entire AD Site and Subnet creation without any CSV file tweaking needed. Please go here for this script.

Video Demonstration

Download

v1.0 – New-CSMultiRegionNetworkDownload

Changelog

v1.0 – Script Creation

Share this:

  • Twitter
  • LinkedIn
  • Reddit

Filed Under: Lync Tagged With: Lync

Reader Interactions

Comments

  1. Dan Sheehan says

    September 28, 2012 at 8:39 pm

    FYI – I had a slightly different take on how to do this, with the intent to keeping the AD sites and subnets synchronized with Lync going forward so they only have to be updated by one team. http://gallery.technet.microsoft.com/Synchronize-…
    There is more than one way to skin a cat, and I just thought I would share I went about it w/o having seen your multi-region script until now.

    Reply
    • Elan Shudnow says

      September 28, 2012 at 9:06 pm

      My single-region script is more in-line with what you did. Using scheduled task you can just keep running the single-region script and it'll keep AD in sync with Lync just as long as you only maintain one Lync region. This script won't obviously do that due to the CSV nature of how I am handling multiple regions.

      Reply
      • Dan Sheehan says

        September 29, 2012 at 8:48 am

        Upon reviewing the single-region script, I don't see where it compares what's in Lync to AD for modification and/or removal. That was critical for us as the messaging team is not in contanct contact with the network team about sites and subnets like our AD team is.

        Either way though as I said before there is more than one way to skin a cat, and your multi-region script is pretty slick.

        Reply
        • Elan Shudnow says

          September 29, 2012 at 10:16 am

          Ah, ok. Didn't realize the script was a two-way sync which is pretty nice. I meant that it was similar in the sense that my single-region script can do automatic 1-way syncs without any administrative intervention. I'll have to check out your script, it seems pretty slick as well.

          Reply
  2. Jürgen says

    September 26, 2012 at 11:26 pm

    Hi Elan,
    great help when getting started with the implementation. As far as I know, you need to have site links not only for CAC, but also for media bypass. It might be worth to mention that this is needed in addition to regions, sites and subnets.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

  • LinkedIn
  • RSS
  • Twitter
  • YouTube

More to See

Azure Event Grid and Serverless PowerShell Functions – Part 1

March 16, 2020 By Elan Shudnow

Retrieving Activity Log Data from Azure Log Analytics – Part 3

March 6, 2020 By Elan Shudnow

Retrieving Activity Log Data from Azure Log Analytics – Part 2

March 6, 2020 By Elan Shudnow

Retrieving Activity Log Data from Azure Log Analytics – Part 1

March 5, 2020 By Elan Shudnow

Tags

ACR Always Encrypted Ansible Azure Azure AD Connect Azure Application Gateway Azure Disk Encryption Azure Firewall Azure Key Vault Azure Load Balancer Azure Monitor Azure Web App Backup Exec CCR CDN DevOps Docker DPM Event Grid Exchange Exchange 2010 Exchange Online Forefront Function App Hyper-V ISA iSCSI Log Analytics Logic App Lync Management Groups NLB OCS Office Office 365 Personal PowerShell RBAC SCOM SQL Storage Accounts Symantec Virtual Machines Windows Server 2008 Windows Server 2008 R2

Footer

About Me

Chicagoland consultant focused on Azure IaaS, PaaS, DevOps, Ansible, Terraform, ARM and Powershell.

Previously a 6x Microsoft MVP in Exchange Server then Lync Server.

My hobbies include watching sports (Baseball, Football and Hockey) and participating in my 14 year old Stepson’s sports.

Recent

  • Azure Event Grid and Serverless PowerShell Functions – Part 2
  • Azure Event Grid and Serverless PowerShell Functions – Part 1
  • Retrieving Activity Log Data from Azure Log Analytics – Part 3
  • Retrieving Activity Log Data from Azure Log Analytics – Part 2
  • Retrieving Activity Log Data from Azure Log Analytics – Part 1

Search

Tags

ACR Always Encrypted Ansible Azure Azure AD Connect Azure Application Gateway Azure Disk Encryption Azure Firewall Azure Key Vault Azure Load Balancer Azure Monitor Azure Web App Backup Exec CCR CDN DevOps Docker DPM Event Grid Exchange Exchange 2010 Exchange Online Forefront Function App Hyper-V ISA iSCSI Log Analytics Logic App Lync Management Groups NLB OCS Office Office 365 Personal PowerShell RBAC SCOM SQL Storage Accounts Symantec Virtual Machines Windows Server 2008 Windows Server 2008 R2

Copyright © 2021 · Magazine Pro on Genesis Framework · WordPress · Log in