We are in the process of migrating our SCOM 2007 Agents to SCOM 2012, and starting to use SCOM to monitor a lot more servers that we are not currently monitoring in SCOM 2007. This not only automates the SCOM Agent installation process, but prevents issues that have come up a few times when using the SCOM Discovery Wizard to push the Agent (most notably restrictive firewall policies that are in place for certain servers.)
To automate the SCOM Agent installation process, I have created a package in SCCM (we are still on SCCM 2007, with plans to migrate to SCCM 2012 in the next few months.)
Build the SCOM 2012 Agent package in SCCM
- Locate the Agent install files on the SCOM Server.
(%ProgramFiles%\System Center 2012\Operations Manager\Server\AgentManagement)
Note that there is a seperate installer (directory) for each processor architecture.) - Create a new package in SCCM, using the SCOM Agent install files as the package source.
- Create a SCOM Agent Installation program for each architecture that you have in your environment (in my case, amd64 and x86.)
Sample commandline:
msiexec /i amd64\MOMAgent.msi /qn USE_SETTINGS_FROM_AD=0 USE_MANUALLY_SPECIFIED_SETTINGS=1 MANAGEMENT_GROUP=ITS MANAGEMENT_SERVER_DNS=scom.its.domain.com ACTIONS_USE_COMPUTER_ACCOUNT=1 AcceptEndUserLicenseAgreement=1Microsoft has documentation on the install parameters (Install Agent Using the Commandline: http://technet.microsoft.com/en-us/library/hh230736.aspx.) This was very helpful, with one exception: it left out an important parameter necessary when installing the Agent with no user interaction, causing my Agent installs to fail. Reviewing the Windows Application Log I found “Product: System Center 2012 – Operations Manager Agent — By installing this software, you confirm acceptance of the relevant System Center 2012 license terms. The terms are in the “Licenses” folder on the disk image. If you agree with the license terms, add AcceptEndUserLicenseAgreement=1 to the command line. If you do not agree, do not install the software.”
After adding AcceptEndUserLicenseAgreement=1 to the command line, the Agent installations were successful. - Create a program for each Agent update applicable for each processor architecture (In my case, there was a single update needed: KB2784734 – Update Rollup 1 for SCOM 2012 SP-1.) The update(s) that are available are based on what updates are installed on the Management Server and are present in the same directory as MOMAgent.msi.
Sample command line:
msiexec /update amd64\KB2784734-amd64-Agent.msp /qn /norestart
Create a Task Sequence to Deploy the SCOM Agent
Because we are still running SCCM 2007 (we don;t have the App Model capabilities of SCCM 2012 yet), I created a task sequence to deploy the SCOM Agent and the available update.
- Create a new Task Sequence for Deploying the SCOM Agent
- Add an Install Software step for each processor architecture.
Select your SCOM Agent Package and the appropriate Program.
On the options tab, add a condition based on processor architecture so that the correct Agent is installed.
(Such as a WMI Query: Select * FROM Win32_Processor WHERE AddressWidth=”64″)
- Add an Install Software Step for each update for each processor architecture.
Use a condition to make sure the correct update(s) get applied.