Hi All,
I am trying to build an enviornemnt an dusing Hyrdation scripts from deploymentresearch.com ( thanks to Johan Arwidmark and team). The below mentioned script works fine with local SQL server deployment but i want it to work with my remote SQL server instance. Can any please advice as to what all changes I have to do to make this script work.
<job id="Install-SystemCenter2012R2OperationsManager">
<script language="VBScript" src="..\..\scripts\ZTIUtility.vbs"/>
<script language="VBScript">
'//----------------------------------------------------------------------------
'// Solution: Hydration
'// Purpose: Used to Install Install - System Center 2012 R2 Operations Manager
'// Version: 1.0 - July 12, 2012 - Mikael Nystrom
'// Version: 1.1 - January 10, 2014 - Johan Arwidmark
'//
'// This script is provided "AS IS" with no warranties, confers no rights and
'// is not supported by the authors or Deployment Artist.
'//
'//----------------------------------------------------------------------------
'//----------------------------------------------------------------------------
'// Global constant and variable declaration
'//----------------------------------------------------------------------------
Option Explicit
Dim iRetVal
'//----------------------------------------------------------------------------
'// End declarations
'//----------------------------------------------------------------------------
'//----------------------------------------------------------------------------
'// Main routine
'//----------------------------------------------------------------------------
'On Error Resume Next
iRetVal = ZTIProcess
ProcessResults iRetVal
On Error Goto 0
'//---------------------------------------------------------------------------
'//
'// Function: ZTIProcess()
'//
'// Input: None
'//
'// Return: Success - 0
'// Failure - non-zero
'//
'// Purpose: Perform main ZTI processing
'//
'//---------------------------------------------------------------------------
Function ZTIProcess()
Dim sFile
Dim sCmd
Dim sApp
Dim sSCOMActionAccount
Dim sSCOMActionAccountPW
Dim sSCOMDASAccount
Dim sSCOMDASAccountPW
Dim sSCOMSrv
Dim sSCOMDBSrv
Dim sSCOMManagementGroup
sSCOMActionAccount = oEnvironment.item("HydrationSCOMActionAccount")
sSCOMActionAccountPW = oEnvironment.item("HydrationSCOMActionAccountPassword")
sSCOMDASAccount = oEnvironment.item("HydrationSCOMDASAccount")
sSCOMDASAccountPW = oEnvironment.item("HydrationSCOMDASAccountPassword")
sSCOMSrv = oEnvironment.item("HostName")
sSCOMDBSrv = oEnvironment.item("HostName")
sSCOMManagementGroup = oEnvironment.item("OrgName")
sApp = "System Center 2012 R2 Operations Manager"
oLogging.ReportProgress "Installing " & sApp & "", 20
sFile = oUtility.ScriptDir & "\Source\setup.exe"
If not oFSO.FileExists(sFile) then
oLogging.CreateEntry "Install " & sApp & ": " & sFile & " was not found, unable to install " & sApp & "", LogTypeError
ZTIProcess = Failure
Exit Function
End if
oLogging.CreateEntry "Installing " & sApp & ": Server", LogTypeInfo
oLogging.CreateEntry "The Setup log file for " & sApp & " is OpsMgrSetupWizard.log", LogTypeInfo
sCmd = """" & oUtility.ScriptDir & "\Source\setup.exe"" /silent /install /components:OMServer /ManagementGroupName:" & sSCOMManagementGroup & " /SqlServerInstance:" & sSCOMSrv & " /DatabaseName:OperationsManager /DWSqlServerInstance:" & sSCOMSrv & " /DWDatabaseName:OperationsManagerDW /UseLocalSystemDASAccount /DatareaderUser:" & sSCOMDASAccount & " /DatareaderPassword:" & sSCOMDASAccountPW & " /DataWriterUser:" & sSCOMDASAccount & " /DataWriterPassword:" & sSCOMDASAccountPW & " /EnableErrorReporting:Never /SendCEIPReports:0 /UseMicrosoftUpdate:0 /AcceptEndUserLicenseAgreement:1 /ActionAccountUser:" & sSCOMActionAccount & " /ActionAccountPassword:" & sSCOMActionAccountPW & ""
wscript.echo sCmd
iRetVal = oUtility.RunWithHeartbeat(sCmd)
if iRetVal <> 0 then
oLogging.CreateEntry "Install " & sApp & ": Error installing " & sApp & ", Server was not installed.", LogTypeWarning
End If
oLogging.CreateEntry "Installing " & sApp & ": Console", LogTypeInfo
sCmd = """" & oUtility.ScriptDir & "\Source\setup.exe"" /silent /install /components:OMConsole /EnableErrorReporting:Never /SendCEIPReports:0 /UseMicrosoftUpdate:0"
wscript.echo sCmd
iRetVal = oUtility.RunWithHeartbeat(sCmd)
if iRetVal <> 0 then
oLogging.CreateEntry "Install " & sApp & ": Error installing " & sApp & ", Console was not installed.", LogTypeWarning
End If
oLogging.CreateEntry "Installing " & sApp & ": Reporting", LogTypeInfo
sCmd = """" & oUtility.ScriptDir & "\Source\setup.exe"" /silent /install /components:OMReporting /SRSInstance:" & sSCOMSrv & " /DataReaderUser:" & sSCOMDASAccount & " /DataReaderPassword:" & sSCOMDASAccountPW & " /SendODRReports:0 /UseMicrosoftUpdate:0"
wscript.echo sCmd
iRetVal = oUtility.RunWithHeartbeat(sCmd)
if iRetVal <> 0 then
oLogging.CreateEntry "Install " & sApp & ": Error installing " & sApp & ", Reporting was not installed.", LogTypeWarning
End If
End Function
</script>
</job>
Appreciate your help in advance.