This blog post is part of a series how to backup your SCOM environment.
You can find the other parts here:
- How to backup your SCOM environment
- How to backup your SCOM dbases
- How to backup your SCOM encryption key
- How to backup your SCOM IIS settings
- How to backup your unsealed management packs
- How to Document your SCOM installation
- How to Backup your Reporting
After we have backed up all the other necessary bits of our environment in the previous blog posts just a little more bits remain to make sure we can successfully restore our environment when there has been a disaster.
Document your Scom installation
This can save you a lot of time and can even be useful when you just have to pull up a report on what actually get’s monitored in the environment.
I’ve based my script on a nice blog post of Kristoper Bash which can be found here:
http://operatingquadrant.com/2009/08/19/scom-automating-management-pack-documentation/
I’ve adapted the script so it will be in line with the script I uses in this post: How to backup your unsealed management packs
You could combine the 2 into 1 script but for now I’ll leave them separate just in case you only need to document the environment instead of backing up + documenting everything.
The script, open the pictures to read out or download the script here: List mp script download location
The markings in yellow you need to modify to your own liking + environment.
Variables to change in the next session:
- $locationroot: This will be the root folder in which the folders with the date as name will be stored
- $outFile: Here you can change the filename. The filename consists out of “a name you choose”_”date of today”.html
Note that in the next session the mailing capability is completely commented. If you would like to send out a mail with the result of the script you can just uncomment and thus activate this feature by removing the ‘#’ in front of each line.
Variables to change in the next session:
- $Sender: This will be the sender of the mail to notify you whether it has been successfully finished.
- $OKRecipient: Specify the email address to where the mail in case of ok needs to be sent.
- $ErrRecipient: Specifiy the email address to where the mail in case of error needs to be sent.
- smtpserver: fill in the smtp server used to send out mails in your environment.
Schedule this with a scheduled task in windows on your RMS and you’re ready to go.
Tip: If you need both the documentation and the backup you could combine this script with the script I featured in this post: How to backup your unsealed management packs
You still don’t really know what a monitor/rule does (the true config information is quite often hidden in the datasource).
All you really need to know for rebuilding a scom environment is which mp’s you have loaded. Together with the override/unsealed mp’s you have saved already, this would do the trick imho (assuming override mp’s use a naming convention of *override*):
Get-ManagementPack | Where {$_.DisplayName -notmatch “override”} | Sort -property FriendlyName | Format-Table FriendlyName,Version,Sealed -AutoSize|out-file “C:\runningmp\runningmp.txt”
great article series though 🙂