Create Boundaries in ConfigMgr based on your DHCP-Scope using PowerShell

Sample script at the end for this article.

I was recently at a customer that wanted to add new boundaries based on their DHCP-Scopes. This would be a very easy task if they only had a few, but they had well over a two-hundred scopes so I decided to create a PowerShell script to do the Job. One thing you need to bear in mind when doing this is that a DHCP-Scope can range from 10.10.10.1 – 10.10.10.254 which means when creating these boundaries that all client in this range are supported, no one is left out. However, a DHCP scope can also range from 10.10.10.100 – 200 which means that if a computer or server is not using DHCP but has been given an IP-address like 10.10.10.43 from an administrator which is outside the range and the computer or server has a ConfigMgr agent it would be left outside and would not be managed by ConfigMgr.

Well let’s go to the good stuff. First and foremost, we need to export the DHCP-Scopes to a comma separated CSV file. Run this command on your DHCP Server

If you open the csv file in Notepad it should look something like this

image

Next save the csv file on a drive on your ConfigMgr Primary server where you want to import the Boundaries. In my environement I have used D:\Scripts

Then open a eleaveted PowerShell prompt and run the script as follows

image

Then yous should be able to see all your newly created boundaries in your ConfigMgr Console!

image


The Script:

Do not forget to leave a comment if you have any questions – Have a great Easter! Smilefjes

By | 2016-03-26T14:18:34+00:00 March 26th, 2016|Configuration Manager (SCCM)|4 Comments

About the Author:

Marius A. Skovli

Microsoft Enterprise Client Management Evangelist with: 10+ years experience within Microsoft System Management Solutions

Extensive experience across Private and Public Sector
Passion for Community Driven work, volunteering within Microsoft technology
Great belief that sharing experience within fellow peers is key to creating a sustainable society
Strong commitment to System Center User Group Norway as co-founder and current leader

I am a technology enthusiast working as a consultant for the consultant company CTGlobal. I have always been passionate about IT and have the last 10 + years worked with Management and Automation within Microsoft technology. Back in 2005/6 I started working with System Management Server (SMS) 2003 and have been working with Enterprise Client Management ever since, where i today focus on helping customers design and implement solutions based on System Center Configuration Manager and/or Enterprise Mobility Suite from Microsoft. Other parts of my work consists of speaking and presenting at different events and seminars, doing research and blog about solutions I find and products I work with. I truly believe in a strong community where knowledge and know-how is essential. Creating creative arenas where it is possible for peers to spread the word about new technologies and solutions is key and as an act on this I co-founded System Center User Group Norway (www.scug.no). SCUG is an initiative where we discuss, preach and present new technologies and solutions in the System Center Space from Microsoft. This is a free arena for everybody to join that is interested in/or enthusiastic about Microsoft Cloud Platform (Enterprise Client Management or Cloud and Datacenter).

Specialties:
System Center Configuration Manager (SCCM2007-SCCM2012), Enterprise Mobility and Intune, Windows and Windows server deployment.

4 Comments

  1. Sandy March 27, 2016 at 11:00 - Reply

    Thank you. Any possible to create up subnet boundaries base on dhcp scope by powershell? 🙂

  2. Sandy March 27, 2016 at 11:01 - Reply

    I mean ip subnet. Auto correction is bad in phone.

  3. […] Allez voir son article parfaitement construit : ICI […]

  4. […] found the PS script for creating boundaries without much efforts from here. Big thanks to “Marius A. Skovli” !! But we struggled a bit to find a script for creating […]

Leave A Comment