prajwalde sai.co m

http://prajwaldesai.co m/install-sco m-agent-using-co mmand-line/

Install SCOM Agent Using Command Line Af ter installing SCOM 2012 SP1, we saw how to install the SCOM agent on windows based computers. In this post we will see the steps to install SCOM agent using command line, to install SCOM agent using command line we will make use of MOMAgent.msi and this is also ref erred to as manual installation of SCOM agent. Bef ore you install SCOM agent using command line, here are f ew things that needs to be considered Read this once as its very Important 1) T he account that is used to run MOMAgent.msi must have administrative privileges on the computers on which you are installing agents. In this post we will be using scomadmin as the user account to install the SCOM agent using command line and this account is a member of domain admins group. 2) By default the management server does not accept the manual installation of SCOM agent, if you install the agent manually it will not be displayed in the operations manager console. So we must configure our management group or single management server to accept agents installed with MOMAgent.msi. If the SCOM agent is installed manually then you must configure the management server to accept manually installed agents, the agents will display in the console after approximately one hour. So its recommended that you first configure management server to accept manual installation of clients and then install the clients manually.

Can I Install SCOM agent on my domain controller ?? Yes, you can install the SCOM agent on your domain controller, I would recommend you to install the SCOM agent through discovery wizard. If you are planning to install the SCOM agent on domain controller manually then install the SCOM agent on domain controller and then you must install the Active Directory management pack helper object by running the file OomADs.msi on domain controller, this will prevent errors that might occur during deployment of the management pack. T he OomADs.msi file can be found on the management server and the path is C:\Program Files\System Center 2012\Operations Manager\Server\HelperObjects. If you are using discovery wizard to install the agent on domain controller then the Active Directory Management Pack helper object is automatically installed.

So our f irst step to install SCOM agent using command line would be to allow the management server to accept the manual installation of SCOM agents. If you have more than one Management Servers in your organization then you can conf igure manual agent installation settings f or a management group through global conf iguration. To do so click on Administration, in the Administration workspace, expand Administration, expand Settings, expand Type: Server, right-click Security, and then click on Properties. By def ault manual agent installations are rejected, click on Review new manual agent installations in pending management view and select Auto-approve new manually installed agents. With this setting enabled, manual installation of SCOM 2012 SP1 agents are accepted by management server.

If you have a single Management Server then proceed with the below steps to allow management server to accept the manual installation of agents. Launch the Operations Manager console, click on Administration workspace, expand Administration, expand Device Management, and then right click Management Servers click on Properties. On the Management Server properties window, click on Security tab and note the def ault settings. We see that manual agent installations are rejected by Management server, this is the most secure setting and is selected by def ault. Let’s go through each of the options listed here :1) Reject new manual agent installations – All manually installed agents are rejected by Operations Manager. As per Microsof t this is the most secure setting and is selected by def ault. So if you are using Discovery Wizard to install clients on windows computers then you need not worry about this option. 2) Review new manual agent installations in pending management view - If this option is selected then all requests f rom a manually installed agent will be directed to Pending Management bef ore being allowed to join the management group. An administrator must review the request and manually approve the agents’ request.

3) Auto-approve new manually installed agents – T his option is available only if Review new manual agent installations in pending management view has been selected. T his setting causes Operations Manager to automatically allow any manually installed agent to join the management group.

On the Security tab click on Override global Management Server settings and then select Review new manual agent installations in pending management view and select Auto-approve new manually installed agents. With these settings we are allowing the manual agent installations and allowing it to join the Management group automatically. Click on Apply and OK.

Now af ter completing the above steps the next step is to install SCOM agent using command line. We will install the SCOM agent on a client machine named CLIENT.PRAJWAL.LOCAL which has windows 7 prof essional 64 bit OS installed and running. Log on to the computer where you want to install the agent by using an account with local administrator privileges and open command prompt. T he syntax of the command to install SCOM agent using command line is %WinDir%\System32\msiexec.exe /i path\Directory\MOMAgent.msi /qn USE_SET T INGS_FROM_AD={0|1} USE_MANUALLY_SPECIFIED_SET T INGS={0|1} MANAGEMENT _GROUP=MGname MANAGEMENT _SERVER_DNS=MSname MANAGEMENT _SERVER_AD_NAME =MSname SECURE_PORT =PortNumber ACT IONS_USE_COMPUT ER_ACCOUNT ={0|1} ACT IONSUSER=UserName ACT IONSDOMAIN=DomainName ACT IONSPASSWORD=Password AcceptEndUserLicenseAgreement=1 %WinDir%\System32\msiexec.exe /i – Path of msiexec.exe. /i is the switch to install or conf igure the product. path\Directory\MOMAgent.msi /qn – Path of MOMAgent.msi, /qn is to hide the user interf ace.

USE_SET T INGS_FROM_AD={0|1} – Set USE_SET T INGS_FROM_AD= to 0 if you want to set the properties at the command line. Set to 1 to use the management group settings f rom Active Directory. USE_MANUALLY_SPECIFIED_SET T INGS={0|1} - Set USE_MANUALLY_SPECIFIED_SET T INGS= to 1 if you want to specif y the manual settings f or client installation, else set to 1 to take settings f rom AD. MANAGEMENT _GROUP=MGname – Specif y the management group that will manage the computer. MANAGEMENT _SERVER_DNS=MSname – Specif y the f ully qualif ied domain name f or the management server. MANAGEMENT _SERVER_AD_NAME =MSname – Specif y the FQDN of the management server. SECURE_PORT =PortNumber – Specif y the port number here. You can ignore this option. T he port number used should be 5723. ACT IONS_USE_COMPUT ER_ACCOUNT ={0|1} – If you are using specif ied user account then use “0″ or use “1″ if you are using the Local System account to deploy SCOM agent. ACT IONSUSER=UserName – If you are using specif ic user account then set the user name here. (T he user account must have enough privileges to install SCOM agent on a computer). ACT IONSDOMAIN=DomainName – Sets the domain f or the Agent Action account identif ied with the ACT IONSUSER parameter. ACT IONSPASSWORD=Password – T he password f or the user account used f or deploying scom agent. AcceptEndUserLicenseAgreement=1 – T his means you accept End user license agreement.

Bef ore you execute the command we will f irst copy the Agent installation f ile (MOMAgent.msi) to a f older on the client desktop. An other option would be that you can share the installation path on the SCOM server and use it f or installation. T he agent setup f ile can be f ound in the SCOM installation source, inside it there will be f older named agent which will include agent installation f iles f or 64 bit, 32 bit and Itanium based computers. We will copy AMD64 f older on clients desktop.

On the client machine, launch the command prompt, change the path to AMD64 f older where agent installation f iles are present and execute the below command. msiexec.exe /i MOMAgent.msi /qn USE_SET T INGS_FROM_AD=0 MANAGEMENT _GROUP=SCOMGROUP MANAGEMENT _SERVER_DNS=SCOM.PRAJWAL.LOCAL MANAGEMENT _SERVER_AD_NAME=SCOM.PRAJWAL.LOCAL ACT IONS_USE_COMPUT ER_ACCOUNT =1 USE_MANUALLY_SPECIFIED_SET T INGS=1 AcceptEndUserLicenseAgreement=1

Af ter f ew minutes, on the client machine you will f ind the new entry Operations Manager Agent in control panel. Click on Operations Manager Agent and under agent properties you will see the name of the SCOM Management group, Primary Management Sever, Port number, Assignment type, Agent Action. Note that we had installed the agent manually so the assignment is set to manual and agent action is Local system because we have logged with local administrator account and installed the SCOM agent.

Now lets open the Operations Manager console and see whats the status of SCOM agent installed on client machine. Click on Administration and click on Agent Managed. We see that CLIENT.PRAJWAL.LOCAL machine entry is seen but the client health state status is Not Monitored. Wait f or f ew minutes while Operations Manager collects inf ormation about the client machine through the agent.

Af ter waiting f or f ew minutes we see the Health State is changed to Healthy. Please wait while rest of the inf ormation about the client machine is being collected.

Af ter waiting f or f ew more minutes we see that more inf ormation about the client machine is displayed which includes the FQDN, Name of the client machine, Domain name, SCOM agent version.

We have installed the SCOM agent thorough command line and the process has been successf ul. In the coming posts we will see more on conf iguring SCOM server and explore various options. T hanks f or reading the post and I hope this post has helped you.