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:
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:
Approve and everything is running.
Happy silent command line installing!
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?
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
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