Install a SCOM 2012 agent – silent

 

As a part of a script, I wanted to install the SCOM agent on several servers. All these servers are in workgroup/dmz/other domains, which means I had to do a manual installation. Now, there’s a lot of guides on how to install an agent using a command line, the official one from Microsoft:

Install Agent Using the Command Line: http://technet.microsoft.com/en-us/library/hh230736.aspx

However, this one doesn’t describe any silent parameters. The only way to use the /silent parameter is when installing an OpsMgr component (server, gateway etc). I tried with the /qn option, which made my command look like this:

msiexec.exe /qn /i \\ms1\c$\Program Files\System Center 2012\Operations Manager\Server\AgentManagement\amd64\MOMAgent.msi USE_SETTINGS_FROM_AD=0 MANAGEMENT_GROUP=HQ MANAGEMENT_SERVER_DNS=ms1.lab.com ACTIONS_USE_COMPUTER_ACCOUNT=0 USE_MANUALLY_SPECIFIED_SETTINGS=1 ACTIONSUSER=Administrator ACTIONSDOMAIN=lab ACTIONSPASSWORD=P@ssw0rd

Nothing happened. No errors, no nothing anywhere.

I then put on the /l*v c:\logs\MOMAgent_install.log parameter to have some error logging:

msiexec.exe /qn /i \\ms1\c$\Program Files\System Center 2012\Operations Manager\Server\AgentManagement\amd64\MOMAgent.msi USE_SETTINGS_FROM_AD=0 MANAGEMENT_GROUP=HQ MANAGEMENT_SERVER_DNS=ms1.lab.com ACTIONS_USE_COMPUTER_ACCOUNT=0 USE_MANUALLY_SPECIFIED_SETTINGS=1 ACTIONSUSER=Administrator ACTIONSDOMAIN=lab ACTIONSPASSWORD=P@ssw0rd /qn /l*v c:\logs\MOMAgent_install.log

Of course it failed again, but this time I had some error info. I went to the MOMAgent_install.log to check for errors. I saw some errors, but nothing “critical”. Randomly, I saw something about AcceptEndUserLicenseAgreement:

image

Ok, so I need to declare the AcceptEndUserLicenseAgreement. I added to the command:

msiexec.exe /i \\ms1\c$\Program Files\System Center 2012\Operations Manager\Server\AgentManagement\amd64\MOMAgent.msi USE_SETTINGS_FROM_AD=0 MANAGEMENT_GROUP=HQ MANAGEMENT_SERVER_DNS=ms1.lab.com ACTIONS_USE_COMPUTER_ACCOUNT=0 USE_MANUALLY_SPECIFIED_SETTINGS=1 ACTIONSUSER=Administrator ACTIONSDOMAIN=lab ACTIONSPASSWORD=P@ssw0rd AcceptEndUserLicenseAgreement=1 /qn /l*v c:\logs\MOMAgent_install.log

The installation started and finished seconds later. The server also showed up in Pending Management:

clip_image003

Approve and everything is running.

Happy silent command line installing!

By | 2013-02-21T15:14:53+00:00 February 21st, 2013|Operations Manager (SCOM)|3 Comments

About the Author:

Michael Skov
Yet another guy loving the System Center products. My primary focus is on Operations Manager, which i have worked with for some years now - still loving it.Certifications:Microsoft Certified Solution Expert Private Cloud (MCSE)Microsoft Certified Solutions Associate Windows Server 2008 (MCSA)Microsoft Certified Technology Specialist Windows Server 2008 R2, Server Virtualization

3 Comments

  1. Luka Gros April 16, 2013 at 15:04 - Reply

    This was very helpful with installing agent. But I still cannot see it under pending managemenet. I inherited SCOM2012 from collegue which left the company.
    Are there some ports that should be opend? something else?

  2. Michael Skov April 16, 2013 at 15:11 - Reply

    Hi Luka

    Thank you for visiting and commenting. Yes, port 5723 must be open. Are you able to telnet from the client server to the Operations Manager server on port 5723?

    Regards
    Michael

  3. Kitaab April 25, 2013 at 10:27 - Reply

    What is we already have a SCOM 2007 R2 CU5 Agent on the server where we push the silent SCOm 2012 Install as you mentioned.

    However when it installed the new agent , it only added the existing SCOM 2007 R2 CU5 Managemnet Group and did not add the one which we specified in the command line (i.e SCOM 2012 Sp1 Managemnet group)

    If we use the command Line does it not multihome the agent if it upgrades the 2007 R2 to 2012 agent

Leave A Comment