Case # 04824481
We are from Philips R&D team, We are doing automation of veeam 10 installation through powershell.
Scenario: Uninstalling existing veeam 9.5 update 4 and need to install Veeam 10 through powershell.
Detailed Description:
During the installation of Veeam 10 through PowerShell, I am getting 3 popups. 2 Pop ups related to Database. If we have to use the existing database then we need to press "YES" button to further, Another one is related to veeam virtual lab since its already configured. We have to enter manually ''OK" then only its allow us to install. I am not able to pass any parameter to automate it. Because not sure exactly which place I need to pass the parameter. Expert's I need your help to passing parameter and fix this issue. It block our automation. We are struck and not able to proceed further to complete our automation. Kindly help us to fix this issue. I have attached the script below. You can have a look, It helps to fix the issue soon. I am looking forward to hear from you.
Thanks in Advance.
Regards
Leo
Our Powershell Script for installing veeam 10:
Code: Select all
Function InstallVeeam
{
param([string]$ProxyApplianceName = $args[0],[string]$VirtualLabName1 = $args[1],[string]$VirtualLab = $args[2],[string]$ESXiIPVL = $args[3])
#[string]$ProxyServer = $args[0]
#[string]$vCenterIp = $args[5],[string]$vCenterAdminAccount = $args[6],[string]$vCenterAdminPassword = $args[7]
Log "Starting the VEEAM Backup and Replication Installation.."
$VEEAMINSTALLER = "$BasePath\VeeamInstall"
$getlicfile = Get-ChildItem C:\Temp\VeeamInstall | Where-Object {$_.Name -match ".lic"}
$licfilename = $getlicfile.Name
$licfilepath = "C:\Temp\VeeamInstall\$licfilename"
#Mapping the disks
Get-Disk | where PartitionStyle -EQ 'raw' | Initialize-Disk -PartitionStyle MBR -PassThru | New-Partition -DriveLetter 'D' -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel "DISK2" -Confirm:$false
# Install SQLSysClrTypes
Log "Validating if SQLSysClrTypes is already installed"
$SQLSysClrTypesInstallStatus = Get-WmiObject Win32_Product | Where {$_.Name -match 'System CLR Types for SQL'}
if ($SQLSysClrTypesInstallStatus)
{
Log "SQLSysClrTypes is already installed"
}
else
{
try
{
Log "Installing SQLSysClrTypes.msi"
$InstallCommandArguments = @"
/quiet /i "$VEEAMINSTALLER\Redistr\x64\SQLSysClrTypes.msi" /l*v "$VEEAMINSTALLER\SQLSysClrTypes.log"
"@
Start-Process msiexec -ArgumentList $InstallCommandArguments -Wait
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
# Install SQL Shared Management Objects
Log "Validating if SharedManagementObjects is already installed"
$SharedManagementObjectsInstallStatus = Get-WmiObject Win32_Product | Where {$_.Name -match 'SQL Server 2014 Management Objects'}
if ($SharedManagementObjectsInstallStatus)
{
Log "SharedManagementObjects is already installed"
}
else
{
try
{
Log "Installing SharedManagementObjects.msi"
$InstallCommandArguments = @"
/quiet /i "$VEEAMINSTALLER\Redistr\x64\SharedManagementObjects.msi" /l*v "$VEEAMINSTALLER\SharedManagementObjects.log"
"@
Start-Process msiexec -ArgumentList $InstallCommandArguments -Wait
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
# Install SQL Express
Log "Validating if SQL2012EXP is already installed"
$SQL2012EXPInstallStatus = Get-WmiObject Win32_Product | Where {$_.Name -match 'SQL Server 2012'}
if ($SQL2012EXPInstallStatus)
{
Log "SQL2012EXP is already installed"
}
else
{
try
{
Log "Installing SQL"
ExecuteProcess -fullexepath "$VEEAMINSTALLER\Redistr\x64\SQLEXPR_x64_ENU.exe" -arglist "/qs /ACTION=Install /FEATURES=SQL /INSTANCENAME=MSSQLSERVER /IACCEPTSQLSERVERLICENSETERMS"
ExecuteProcess -fullexepath "$VEEAMINSTALLER\Redistr\x64\SQLEXPR_x64_ENU.exe" -arglist "/qs /ACTION=PrepareImage /FEATURES=SQL,RS /INSTANCEID=VEEAMSQL2012 /IACCEPTSQLSERVERLICENSETERMS"
ExecuteProcess -fullexepath "$VEEAMINSTALLER\Redistr\x64\SQLEXPR_x64_ENU.exe" -arglist "/qs /ACTION=CompleteImage /INSTANCENAME=VEEAM /INSTANCEID=VEEAM2012 /SQLSYSADMINACCOUNTS=$user /AGTSVCACCOUNT='NT AUTHORITY\SYSTEM' /IACCEPTSQLSERVERLICENSETERMS"
# Setting SQL Services to Automatic
Log "Starting SQL Services"
Get-Service -Name SQL*,MSSQL* | Set-Service -StartupType Automatic
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
# Copying and Importing the SQL Powershell module
Log "Validating if SQL files are already Copied"
$Program_Files1 = "C:\Program Files\WindowsPowerShell\Modules"
$Program_Files2 = "C:\Program Files (x86)\WindowsPowerShell\Modules"
$SQLfile1 = test-path "$Program_Files1\SQLServer"
$SQLfile2 = test-path "$Program_Files2\SQLServer"
if($SQLfile1 -and $SQLfile2)
{
Log "SQL files are already copied"
}
else
{
Copy-Item "$VEEAMINSTALLER\SQLServer" "C:\Program Files\WindowsPowerShell\Modules" -Recurse
Copy-Item "$VEEAMINSTALLER\SQLServer" "C:\Program Files (x86)\WindowsPowerShell\Modules" -Recurse
}
Import-Module "C:\Program Files\WindowsPowerShell\Modules\SQLServer\SqlServer.psd1"
# Set sysadmin previleage to System account
Invoke-Sqlcmd -ServerInstance "$ENV:COMPUTERNAME\VEEAM" -Query "exec sp_addsrvrolemember 'NT AUTHORITY\SYSTEM','sysadmin'"
# Installing the Backup Catalog
Log "Installing Backup Catalog"
$BackupCatalogStatus = Get-WmiObject Win32_Product | Where {$_.Name -match 'Veeam Backup Catalog'}
if ($BackupCatalogStatus)
{
Log "Backup Catalog is already installed"
}
else
{
try
{
$InstallCommandArguments = @"
/passive /i "$VEEAMINSTALLER\Catalog\VeeamBackupCatalog64.msi" ACCEPT_THIRDPARTY_LICENSES="1" VBRC_SERVICE_USER=$user VBRC_SERVICE_PASSWORD=$password VBRC_SERVICE_PORT=9391 /l*v "$VEEAMINSTALLER\VeeamBackupCatalog64.log
"@
Start-Process msiexec -ArgumentList $InstallCommandArguments -Wait
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
# Installing Backup and Replication Server
Log "Installing Backup and Replication Server"
$BackupReplicationStatus = Get-WmiObject Win32_Product | Where {$_.Name -match 'Veeam Backup & Replication Server'}
if ($BackupReplicationStatus)
{
Log "Backup and Replication server is already installed"
}
else
{
try
{
$InstallCommandArguments = @"
/passive /i "$VEEAMINSTALLER\Backup\Server.x64.msi" ACCEPTEULA="yes" ACCEPT_THIRDPARTY_LICENSES="1" VBR_LICENSE_FILE=$licfilepath VBR_SERVICE_USER=$user VBR_SERVICE_PASSWORD=$password VBR_SQLSERVER_SERVER=$env:COMPUTERNAME\VEEAM VBR_SQLSERVER_DATABASE=VeeamBackup VBR_SQLSERVER_AUTHENTICATION=0 VBR_SQLSERVER_USERNAME=$user VBR_SQLSERVER_PASSWORD=$password /l*v "$VEEAMINSTALLER\Server.x64.log
"@
Start-Process msiexec -ArgumentList $InstallCommandArguments -Wait
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
# Installing Veeam Console
Log "Installing Console"
$Veeamconsole = Get-WmiObject Win32_Product | Where {$_.Name -match 'Veeam Backup & Replication Console'}
if ($Veeamconsole)
{
Log "Veeam console is already installed"
}
else
{
try
{
$InstallCommandArguments = @"
/passive /i "$VEEAMINSTALLER\Backup\Shell.x64.msi" ACCEPTEULA="yes" ACCEPT_THIRDPARTY_LICENSES="1" /l*v "$VEEAMINSTALLER\Shell.x64.log
"@
Start-Process msiexec -ArgumentList $InstallCommandArguments -Wait
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
# Installing Veeam Explorer For ActiveDirectory
Log "Installing Veeam Explorer For ActiveDirectory"
$VeeamExplorerAD = Get-WmiObject Win32_Product | Where {$_.Name -match 'Veeam Explorer for Microsoft Active Directory'}
if ($VeeamExplorerAD)
{
Log "Veeam Explorer For ActiveDirectory is already installed"
}
else
{
try
{
$InstallCommandArguments = @"
/passive /i "$VEEAMINSTALLER\Explorers\VeeamExplorerForActiveDirectory.msi" ACCEPT_EULA=1 ACCEPT_THIRDPARTY_LICENSES=1 /l*v "$VEEAMINSTALLER\VeeamExplorerForActiveDirectory.log
"@
Start-Process msiexec -ArgumentList $InstallCommandArguments -Wait
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
# Installing Veeam Explorer For Exchange
Log "Installing Veeam Explorer For Exchange"
$VeeamExplorerEX = Get-WmiObject Win32_Product | Where {$_.Name -match 'Veeam Explorer for Microsoft Exchange'}
if ($VeeamExplorerEX)
{
Log "Veeam Explorer For Exchange is already installed"
}
else
{
try
{
$InstallCommandArguments = @"
/passive /i "$VEEAMINSTALLER\Explorers\VeeamExplorerForExchange.msi" ACCEPT_EULA=1 ACCEPT_THIRDPARTY_LICENSES=1 ADDLOCAL=PS_EXCHANGEEXPLORER /l*v "$VEEAMINSTALLER\VeeamExplorerForExchange.log
"@
Start-Process msiexec -ArgumentList $InstallCommandArguments -Wait
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
# Installing Veeam Explorer For Oracle
Log "Installing Veeam Explorer For Oracle"
$VeeamExplorerOR = Get-WmiObject Win32_Product | Where {$_.Name -match 'Veeam Explorer for Oracle'}
if ($VeeamExplorerOR)
{
Log "Veeam Explorer For Oracle is already installed"
}
else
{
try
{
$InstallCommandArguments = @"
/passive /i "$VEEAMINSTALLER\Explorers\VeeamExplorerForOracle.msi" ACCEPT_EULA=1 ACCEPT_THIRDPARTY_LICENSES=1 /l*v "$VEEAMINSTALLER\VeeamExplorerFororacle.log
"@
start-Process msiexec -ArgumentList $InstallCommandArguments -Wait
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
# Installing Veeam Explorer For SharePoint
Log "Installing Veeam Explorer For SharePoint"
$VeeamExplorersp = Get-WmiObject Win32_Product | Where {$_.Name -match 'Veeam Explorer for Microsoft SharePoint'}
if ($VeeamExplorersp)
{
Log "Veeam Explorer For SharePoint is already installed"
}
else
{
try
{
$InstallCommandArguments = @"
/passive /i "$VEEAMINSTALLER\Explorers\VeeamExplorerForSharePoint.msi" ACCEPT_EULA=1 ACCEPT_THIRDPARTY_LICENSES=1 /l*v "$VEEAMINSTALLER\VeeamExplorerForsharepoint.log
"@
Start-Process msiexec -ArgumentList $InstallCommandArguments -Wait
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
# Installing Veeam Explorer For SQL
Log "Installing Veeam Explorer For SQL"
$VeeamExplorersql = Get-WmiObject Win32_Product | Where {$_.Name -match 'Veeam Explorer for Microsoft SQL Server'}
if ($VeeamExplorersql)
{
Log "Veeam Explorer For SQL is already installed"
}
else
{
try
{
$InstallCommandArguments = @"
/passive /i "$VEEAMINSTALLER\Explorers\VeeamExplorerForSQL.msi" ACCEPT_EULA=1 ACCEPT_THIRDPARTY_LICENSES=1 /l*v "$VEEAMINSTALLER\VeeamExplorerForSQL.log
"@
Start-Process msiexec -ArgumentList $InstallCommandArguments -Wait
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
}