Microsoft

Automate the System Center 2007 R2 prerequisite configuration with PowerShell

Microsoft System Center Operations Manager 2007 R2 has some additional configuration items for standard roles. Rick Vanover shows how to automate the configuration.

For Microsoft System Center Operations Manager 2007 R2 (SCOM) to be installed correctly, a number of roles and configuration items need to be in place. On a default installation of Windows Server 2008 R2, if you run the prerequisite checker, a number of components will show up missing even if the IIS and .NET roles are enabled. It's cumbersome to diagnose the specific roles, though it is documented in the prerequisite checker and on TechNet.

You can use PowerShell to automate the complicated configuration steps. There is one supplemental download that should be installed manually, however. The ASP .NET AJAX 1.0 framework (which is a 1.5 MB download) needs to be installed manually before the roles configuration can be performed. Once the installation is complete, the server is ready for a PowerShell script to configure the prerequisites for a SCOM server.

In a previous tip, I described how to enumerate the roles on a Windows Server with PowerShell. We are going to take this one step further and configure the Windows Server to have all of the SCOM roles configured with PowerShell. This is the command:

Import-Module Servermanager

Get-WindowsFeature

Add-WindowsFeature name -restart

Add-WindowsFeature Application-Server -restart

Add-WindowsFeature Web-Server -restart

Add-WindowsFeature Web-Mgmt-Compat -restart

Add-WindowsFeature Web-Metabase -restart

Add-WindowsFeature Web-WMI -restart

Add-WindowsFeature Web-Lgcy-Scripting -restart

Add-WindowsFeature Web-Lgcy-Mgmt-Console -restart

Add-WindowsFeature AS-Web-Support -restart

C:\Windows\Microsoft.net\framework64\V2.0.50727\aspnet_regiis.exe -i -enable
This can be saved as a .PS1 file and run via PowerShell or copied and pasted into a PowerShell session. When this command is running, the interactive display will show the progress of the roles being added or configured (Figure A). Figure A

Click the image to enlarge.
At that point, the server is ready to have SCOM installed on it. Note: This only addresses the prerequisites for a web console, a server, and a console component of SCOM. In most situations, a separate database server to hold all of the SQL functions is a cleaner setup for production situations. Figure B shows the prerequisite checker running clean for the selected components. Figure B

Click the image to enlarge.

Have you added any automation to the process to configure prerequisites for SCOM? Share your comments in the discussion.

About

Rick Vanover is a software strategy specialist for Veeam Software, based in Columbus, Ohio. Rick has years of IT experience and focuses on virtualization, Windows-based server administration, and system hardware.

Editor's Picks

Free Newsletters, In your Inbox