Etiketter

torsdag 10. mai 2012

Deploying and multi-homing SCOM 2012 Agent using SCCM

Hello Ground Control,
Well I have just created my first blog so now I guess I have to write something. Why don't I start by sharing what I've just learned a few days ago and that is how to upgrade your SCOM agent to the new 2012 version using SCCM. 

In my scenario I wanted to upgrade the SCOM agent, multi-homing it to report both to my existing SCOM 2007 environment and to my brand spanking new SCOM 2012 Management Group. I started out expecting this would be an "out-of-the-box"-easy thing to do, but ended up using hours on this simple task.

Fist thing I discovered was that some of the parameters from the SCOM 2007 agent install like "MANAGEMENT_GROUP_OPERATION=AddConfigGroup" doesn't seem to be there in 2012. (http://technet.microsoft.com/en-us/library/hh230736.aspx) Secondly I found out that even tough setting the parameters MANAGEMENT_GROUP and MANAGEMENT_SERVER_DNS pointing to the new 2012 environment when running the unattended agent installation, the agent would still only be reporting to the old SCOM 2007 Management Group after the agent upgrade had finished.

The solution to this was using a VB script to make the agent reporting to the new 2012 Management Group:
---------Script----------
Option Explicit
Dim objMSConfig
Set objMSConfig = CreateObject("AgentConfigManager.MgmtSvcCfg")
Call objMSConfig.AddManagementGroup ("<New 2012 MG Name>", "<New 2012 Management server name>",5723)


So here's what I ended up with in :
  1. A Task Sequence to install the agent (separate steps for x86/x64), one step running the script pointing the agent to the new 2012 Management Group and finally installing the Update Rollup 1 to the agent.


  1. The "Install SCOM 2012 Agent.." steps in the Task Sequence refers to a package created with the SCOM 2012 agent source files.


  1. I added WMI queries to the spesific x86/x86 steps in the task sequence:

(Query x86: select * from Win32_Processor where DeviceID="CPU0" and AddressWidth="86")
(Query x64: select * from Win32_Processor where DeviceID="CPU0" and AddressWidth="64")

  1. I put the VB script in with the source files in the SCOM 2012 agent package and run it as a command line in the Task Sequence:

(Command line: %windir%\System32\cscript.exe "setMG2012.vbs")

  1. I put the SCOM Update Rollup 1 agent files in a separate package and created "update install programs" on the package for x86/x64. I used the following command line:
(x86 Install program: "msiexec /update KB2674695-i386-Agent.msp /qn /norestart")
(x64 install program: "msiexec /update KB2674695-AMD64-Agent.msp /qn /norestart")
Use the same WMI query condition on the x86/x64 steps of course…

Anyways…
This worked for me.

1 kommentar:

  1. i tried the same vbs script throught sccm with creating a package , program but its not working. can u plz suggest on that .?

    SvarSlett