Whoo - long time no blog. I am still around and kicking, just been occupied with a new baby (New-CMFreak), a new home, and wrapping up presentations for MMS. My hope is to kick this blog back into gear over the next month. Stay tuned for what I hope will be an exciting series of blog postings on ready to use Runbooks that will aid in migration from Configuration Manager 2007 to 2012, and then also a series of blogs detailing my first foray into Hyper-V Clustering and System Center Virtual Machine manager (including details on how I have configured my lab).
However, for today I am excited to get this one down. Last night as I was wrapping up the day, winding down with a quick view of my Twitter feed, I noticed that System Center 2012 Configuration Manager SP1 CU1 had been released. I have anxiously been anticipating this release with the one hope that it would include a PowerShell CMDLET for deploying distribution points. This functionality does not exist pre-CU1. Fortunately, after reviewing the documentation, my hopes had been met, the Add-DistributionPoint CMDLET had made the cut.
In this blog post I will be taking a quick look at new CMDLET - Add-CMDistributionPoint.
Adding the new CMDLETS:
One thing that was not obvious when installing CU1 is that the actual CU1 install itself will not make the CMDLETS available in the ConfigurationManager PowerShell module. What you will notice is that when installing CU1 you will be prompted to create several package including an update package for the Configuration Manager Console. Included in this package is the PowerShell module updates.
Screen Shot of the CU1 installation Deployment Assistance Options:
Which yields the following packages:
Screen Shot of my CM Console Post CU1 installation:
So, in order to use the new PowerShell CMDLETs, we need to first install CU1, and then deploy (or install) the console update onto the system from which we will be working with the PowerShell.
Add-CMDistributionPoint
I will admit, it is with mixed emotions that I begin working with this CMDLET. Here is the back story, I am working on an extremely large 2012 Configuration Manager SP1 migration in which we will be deploying upwards of 500 new distribution points. Early on in the process, I had proposed that we use System Center Orchestrator to automate the deployment of these distribution points. Short story even shorter – I spent many hours just last week putting together PowerShell that will deploy a distribution point, which I could then use in my Orchestrator solution. Needless to say, I no longer need the script. However all is not lost; this was a great exercise into both PowerShell and some of the subsurface components of Configuration Manager.
Onto the goodness – first things first let’s check out the help file for the CMDLET.
Get-Help Add-CMDistributionPoint
Whoo that is allot of options, however never fear they are for the most part self-explanatory. What you notice is that only a few of these are required, the remainder are for “fine-tuned” configuration. The list of required parameters is
- -SiteSystemServerName
- -SiteCode
- -MinimumFreespaceMB
- -CertificateExperationTimeUtc
One thing you may also notice though is that we must specify a Site System Server Name. This indicates that a site system must be first added to the Configuration Manager environment before we can use this CMDLET to install the Distribution Point role (which makes sense). If you want to automate the addition of the site system server prior to adding the DP role, we can use New-CMSiteSystemServer CMDLET.
Once the site system has been added to the Configuration Manager environment we can then use Add-CMDistributionPoint to add the DP role. For my example the command will be
Add-CMDistributionPoint –SiteSystemServerName “SCO5.TWOCHUTES.COM” –SiteCode P01 –MinimumFreeSpaceMB 5000 –CertificateExpirationTimeUtc “Saturday, March 21, 2015 9:47:22 AM”
NOTE: The example shown here assumes that IIS has been configured on the target distribution point. The Add-CMDistributionPoint CMDLET includes an –InstallInternetServer parameter which will install and configure IIS in the event that this is needed on the target distribution point.
And as can be seen in the following screen shots, the DP role has been added and configured thusly.
Closing
Pretty cool – hats off to the Configuration Manager Product team for the addition of this CMDLET. This will make the automated deployment of 2012 Configuration Manager SP1 environments much more simple. Stay tuned and I will be posing an Orchestrator Runbook solution that deploys Distribution Points end-to-end which will include the use of this PowerShell CMDLET.