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!