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 CM12SDK.net, 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 “192.168.7.2-192.168.7.17”

 

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:

Get-IPBoundaries

/Andreas

One thought on “PowerShell Profile + ConfigMgr = Love

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.