Build a simple ConfigMgr report with PowerShell

If it’s more than one person working with Configuration Manager (yeah like you do it all by yourself ;).
It can be hard to keep up, a new application added on Monday, a Package modified on Tuesday and 3 new Configuration Items on Friday.

This script will hopefully makes it a little bit easier to keep up.

The Basics

1. First we need to gather some information

2. If something is returned, add it to a text file with a little html formatting

3. Send it as a nicely html formatted email.

I run this script (scheduled task) every Monday morning, perfect reading while enjoying  my morning coffee 🙂

The Script

Happy PowerReporting Andreas 🙂

PowerShell GUI: Create ConfigMgr DriverPackages v 1.0

It can be a real hassle creating new Driver Packages, especially if you want to have some order in your repository.
If you don’t want to go ‘all in’, like when you’re using the Coretech tool: this little script that I’ve created might come in handy.

The idea is pretty simple, just enter manufacturer, os and model,
and the script will then:

  • create a folder: DriverSource OS  Manufacturer  Model
  • create a folder: PackageSource OS  Manufacturer  Model
  • create a new Driver Package
  • create a new Driver Category (optional)

all with the right names and in the right location… neat huh?

 The Script

The Script reads settings from Settings.xml, located in the same folder as the script.
If it doesn’t exists, it’ll be created.

The first time the script runs it will automatically go to the settings tab.
(no need to modify the xml file manually)

The What If button shows the commands that will be executed.

Now go ahead and create some Driver Packages 🙂


You need the ConfigurationManager PowerShell Module available.
If you don’t have the ConfigMgr Console installed,  you need to modify the Import-Module command.
I’m using the following line:
Import-Module ($env:SMS_ADMIN_UI_PATH.Substring(0,$env:SMS_ADMIN_UI_PATH.Length – 5) + ‘ConfigurationManager.psd1’)

The End

I’m using PowerShell Studio by Sapien to build the GUI, it really simplifies the process.
If you haven’t tried it, I really recommend that you do so.

And here’s the link to the script, it contains both the .ps1 version and the PowerShell Studio project file…

I’d really love to hear your two cents…


PowerShell Profile + ConfigMgr = Love

Something I’ve learned: a quick way to access your ConfigMgr cmdlets is awesome 🙂

Now that’s not so hard to achieve, place the following function in your PowerShell profile.
(A great guide to the profile over at How-To Geek)

Now all we have to do is call the Load-CM to have some fun.


Create IP Range Boundaries

I had one task that I kept doing multiple times, to create new IP Range Boundaries.

Then I found a really nice function at, and after some small modifications it was fit for the job.
I didn’t wanna write Site Code and Site Server for every new boundary, so I simply hardcoded them instead. And yes, it’s OK to be lazy.

In order to save some extra time (be extra lazy) I added the new boundary to the default boundary group.

Now it’s fast and easy 🙂

New-IPRangeBoundary -DisplayName “Range 007” -Value “”


List you’re Boundaries

Now that you’ve hopefully created some boundaries, maybe you’ll want to list them as well?
Here is a simple function to do that: