PowerShell Script – SCCM 2007 Health Check
Thank you for visiting my blog. I’ve moved this article to my new book’s website at: http://www.masteringPOSH.com/powershell-script-sccm-2007-health-check
System Center Configuration Manager 2007 is an extremely powerful tool that, when configured correctly, will provide deployment and reporting capabilities for your organization. As explored in a previous article (located here), there are situations where a health check is helpful to ensure stability of the SCCM 2007 servers.
The below PowerShell Script was designed to perform two operations:
- Morning Report – To run as a scheduled task in the morning and email a distribution group (or individual email) if anything is potentially going wrong. (Warning Level to Critical Levels).
- Hourly Status Check – To run as a scheduled task every hour and email a distribution group (or individual email) if anything is Critically wrong. (Critical Level Only).
The script performs the following at a high level:
- Loads the SCCM.XML File
- Determines from the SCCM.XML file where SCCM is installed.
- Using the SCCM.XML File, reads through the unique ID’s under the ‘filecheck’ and determines the file count for those directories.
- Using the SCCM.XML File, reads through the unique ID’s under the ‘servicecheck’ and determines the startup state, and running state of the services required for SCCM.
- Sends an email to the specified address with any warning or critical messages.
See the full article on MasteringPosh.com
Happy Coding!
Leave a comment