SCOM 2012 R2: Unattended installation / Command Line

Today, let’s focus on the PowerShell Command line that you could use to silently install SCOM to your environment.
The scripts below are for System Center Operations Manager 2012 R2 and Windows Server 2012 R2.

Prerequisites installation

One of the first SCOM prerequisites is to install Report View, which also has the installation of SQL Sys CLR as prerequisite. The few lines below will take care of the installation of these components.

$dwnld = 'C:\SCOM2012R2Prereqs'
if (!(Test-Path -path $dwnld))
 New-Item $dwnld -type directory
$object = New-Object Net.WebClient
$RPTurl = ''
$object.DownloadFile($RPTurl, "$dwnld\ReportViewer.msi")

$RPTurl = ''
$object.DownloadFile($RPTurl, "$dwnld\SQLSysClrTypes.msi")

Start-Process -FilePath "$dwnld\SQLSysClrTypes.msi" -ArgumentList '/q' -Wait
Start-Process -FilePath "$dwnld\ReportViewer.msi" -ArgumentList '/q' -Wait

First management server installation

The line below is taking care of the installation of you first management server. Change the parameters to first to your needs.

Start-Process -FilePath E:\setup.exe -ArgumentList '/install /InstallPath:"C:\Program Files\Microsoft System Center 2012 R2\Operations Manager" /components:OMServer,OMConsole /ManagementGroupName:SCOMMgmt /SqlServerInstance:SQLSERVER\Instance /DatabaseName:OperationsManager /DWSqlServerInstance:SQLSERVER\Instance /DWDatabaseName:OperationsManagerDW /ActionAccountUser:Contoso\Administrator /ActionAccountPassword:'XXXX' /DASAccountUser:contoso\Administrator /DASAccountPassword:'XXXX' /DatareaderUser:domhome\Administrator /DatareaderPassword:'XXXX' /DataWriterUser:domhome\Administrator /DataWriterPassword:'XXXX' /EnableErrorReporting:Never /SendCEIPReports:0 /UseMicrosoftUpdate:0 /AcceptEndUserLicenseAgreement:1 /silent'

Other management server installation

Oncec the first management server has been successfully installed, you could use the line below to install the others.

Start-Process -FilePath E:\setup.exe -ArgumentList '/install /InstallPath:"C:\Program Files\Microsoft System Center 2012 R2\Operations Manager" /components:OMServer,OMConsole /SqlServerInstance: SQLSERVER\Instance /DatabaseName: OperationsManager /ActionAccountUser:Contoso\Administrator /ActionAccountPassword:'XXXX' /DASAccountUser:Contoso\Administrator /DASAccountPassword:'XXXX' /EnableErrorReporting:Never /SendCEIPReports:0 /UseMicrosoftUpdate:0 /AcceptEndUserLicenseAgreement:1 /silent'

Web Console installation

The installation of the Web Console needs first to enable some Windows Features. The Script below is taking care of all that.

Import-Module ServerManager

Add-WindowsFeature NET-Framework-Core,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-Http-Logging,Web-Request-Monitor,Web-Filtering,Web-Stat-Compression,Web-Mgmt-Console,Web-Metabase,Web-Asp-Net,Web-Windows-Auth,Web-ASP,Web-CGI -Restart

Add-WindowsFeature Web-Asp-Net45,AS-HTTP-Activation

Start-Process -FilePath E:\setup.exe -ArgumentList '/silent /install /components:OMWebConsole /ManagementServer:SCOM.constoso.local /WebSiteName:'Default Web Site' /WebConsoleAuthorizationMode:Mixed /SendCEIPReports:0 /UseMicrosoftUpdate:0 /AcceptEndUserLicenseAgreement:1'

Have a nice day!


About Christopher Keyaert

Christopher Keyaert is a Consultant, focused on helping partners to leverage the System Center and Microsoft Azure cloud platform. He is also a Microsoft Most Valuable Professional (MVP) for Cloud and Data Center Management and a Microsoft Certified Trainer (MCT).
This entry was posted in Operations Manager. Bookmark the permalink.

2 Responses to SCOM 2012 R2: Unattended installation / Command Line

  1. Ram Lan says:

    Excellent Post. Have saved all the files for silent install of SCOM 2012 R2. This is my plan.

    1. Install Server 2012 R2 with Update 1 and all the updates and join to domain
    2. Install Prerequisites as per above
    3. Install Management Server
    4. Install Other Management Server
    5. Install Web Console

    I will copy SCOM 2012 R2 setup files to c drive and change the path to C in the script where ever it is pointing to E drive. Will keep you posted.

    What about SQL Server installation?

  2. Joby Chacko says:

    Seems Report viewer is not working…. in Prerequisites installation.

    Thank you for ADD windows feature Script….

    Rest of the steps i am going to do now.

    Thank you very much for this article

Leave a Reply

Your email address will not be published. Required fields are marked *