SCCM Site Maintenance Task Powershell Module

I was getting ready to upgrade our ConfigMgr 2012 SP1 site server to R2 (I know, I’m a little behind the times!) and one of the tasks I needed to do was disable all the site maintenance tasks while the upgrade is being performed. I started to document all the site maintenance tasks that were enabled and then proceeded to disable them and hit my click limit. If I find myself clicking a repetitive pattern more than a couple of times I stop and ask myself “Can and should this be automated?” and lucky for you I decided to take some time to create a few small Powershell functions.

These functions will not only work for my upgrade scenario I’m sure I’ll also use them for other tasks down the road.

For anyone doing a ConfigMgr upgrade and want to knock out the disabling/enabling site maintenance tasks here’s a little script to run after you’ve got these functions loaded.

Here are the 3 functions that make this happen. I’d throw them into a .psm1 file and import them as a module but do with them as you please.