SCOM 2012 R2 Command Line Manual Agent Install

In SCOM 2012 R2 the parameters for a manual command line agent install have been updated.  One new required parameter in SCOM 2012 R2 is AcceptEndUserLicenseAgreement=1

To deploy 32-Bit and 64-Bit SCOM 2012 R2 Agents using SCCM in one package here is batch script updated for SCOM 2012 R2

@echo off

Set RegQry=HKLM\Hardware\Description\System\CentralProcessor\0

REG.exe Query %RegQry% > checkOS.txt

Find /i "x86" < CheckOS.txt > StringCheck.txt

If %ERRORLEVEL% == 0 (
               Echo "This is 32 Bit Operating System"
               msiexec.exe /i \\YOURFILESERVER\AgentManagement\x86\MOMAgent.msi /qn /l*v c:\MOMAgentinstall.log USE_SETTINGS_FROM_AD=0 USE_MANUALLY_SPECIFIED_SETTINGS=1 MANAGEMENT_GROUP=YOURMANAGEMENTGROUPNAME MANAGEMENT_SERVER_DNS=YOURSCOMMSSERVER.YOURDOMAIN.COM ACTIONS_USE_COMPUTER_ACCOUNT=1 AcceptEndUserLicenseAgreement=1
) ELSE (
               Echo "This is 64 Bit Operating System"
               msiexec.exe /i \\YOURFILESERVER\AgentManagement\amd64\MOMAgent.msi /qn /l*v c:\MOMAgentinstall.log USE_SETTINGS_FROM_AD=0 USE_MANUALLY_SPECIFIED_SETTINGS=1 MANAGEMENT_GROUP=YOURMANAGEMENTGROUPNAME MANAGEMENT_SERVER_DNS=YOURSCOMMSSERVER.YOURDOMAIN.COM  ACTIONS_USE_COMPUTER_ACCOUNT=1 AcceptEndUserLicenseAgreement=1
)

Download: https://www.scom2k7.com/downloads/SCOM2012Agent.bat.txt

 

Here is a list of all the parameters for a SCOM 2012 Agent install from https://technet.microsoft.com/en-us/library/hh230736.aspx

USE_SETTINGS_FROM_AD={0|1} Indicates whether the management group settings properties will be set on the command line. Use 0 if you want to set the properties at the command line. Use 1 to use the management group settings from Active Directory.
USE_MANUALLY_SPECIFIED_SETTINGS=={0|1} If USE_SETTINGS_FROM_AD=1, then USE_MANUALLY_SPECIFIED_SETTINGS must equal 0.
MANAGEMENT_GROUP=MGname Specifies the management group that will manage the computer.
MANAGEMENT_SERVER_DNS=MSname Specifies the fully qualified domain name for the management server. To use a gateway server, enter the gateway server FQDN as MANAGEMENT_SERVER_DNS.
MANAGEMENT_SERVER_AD_NAME=ADname Use this parameter if the computer’s DNS and Active Directory names differ to set to the fully qualified Active Directory Domain Services name.
SECURE_PORT=PortNumber Sets the health service port number.
ENABLE_ERROR_REPORTING={0|1} Optional parameter. Use this parameter with “1” to opt in to error report forwarding to Microsoft. If you do not include this parameter, the agent installation defaults to “0”, which opts out of error report forwarding.
QUEUE_ERROR_REPORTS={0|1} Optional parameter. Use this parameter with “1” to queue error reports or with “0” to send reports immediately. If you do not include this parameter, the agent installation defaults to “0”.
INSTALLDIR=path Optional parameter. Use this parameter if you want to install the agent to a folder other than the default installation path. Note that \Agent will be appended to this value.
ACTIONS_USE_COMPUTER_ACCOUNT={0|1} Indicates whether to use a specified user account (0) or the Local System account (1).
ACTIONSUSER=UserName Sets the Agent Action account to UserName. This parameter is required if you specified ACTIONS_USE_COMPUTER_ACCOUNT=0.
ACTIONSDOMAIN= DomainName Sets the domain for the Agent Action account identified with the ACTIONSUSER parameter.
ACTIONSPASSWORD= Password The password for the user identified with the ACTIONSUSER parameter.
NOAPM=1 Optional parameter. Installs the Operations Manager agent without .NET Application Performance Monitoring. If you are using AVIcode 5.7, NOAPM=1 leaves the AVIcode agent in place. If you are using AVIcode 5.7 and install the Operations Manager agent by using momagent.msi without NOAPM=1, the AVIcode agent will not work correctly and an alert will be generated.
AcceptEndUserLicenseAgreement=1 Used to specify that you accept the End User License Agreement (EULA).

 

 

One Response to SCOM 2012 R2 Command Line Manual Agent Install

  1. Odgeuk October 20, 2015 at 4:10 am #

    Why not

    IF %PROCESSOR_ARCHITECTURE%==AMD64 SET InstallMSI=\MOMAgent-x64.msi

    IF %PROCESSOR_ARCHITECTURE%==x86 SET InstallMSI=\MOMAgent-x86.msi

    ?

Leave a Reply