Update to VeeamDataPlatform 23H2 20240928
This commit is contained in:
@@ -85,6 +85,10 @@ param(
|
|||||||
[bool] $AutoUpgrade = $true
|
[bool] $AutoUpgrade = $true
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Settting download URL
|
||||||
|
$downloadURL = "https://download2.veeam.com/VDPP/v12/VeeamDataPlatform_23H2_20240928.iso"
|
||||||
|
$isoLabel = "VEEAM DATA PLATFORM PREMIUM"
|
||||||
|
|
||||||
# Setting Log Location
|
# Setting Log Location
|
||||||
$logFolder = $env:SYSTEMDRIVE + "\temp\veeam-upgrade"
|
$logFolder = $env:SYSTEMDRIVE + "\temp\veeam-upgrade"
|
||||||
New-Item -ItemType Directory -Force -Path $logFolder | Out-Null #makes sure folder exists
|
New-Item -ItemType Directory -Force -Path $logFolder | Out-Null #makes sure folder exists
|
||||||
@@ -333,14 +337,14 @@ if ($vbem -and ($license.Length -eq 0)) {
|
|||||||
# If ISO wasn't specified, download it from Veeam's public servers
|
# If ISO wasn't specified, download it from Veeam's public servers
|
||||||
if ($iso -eq "download") {
|
if ($iso -eq "download") {
|
||||||
try {
|
try {
|
||||||
$iso = "$logFolder\VeeamBackup&Replication_12.1.1.56_20240127.iso"
|
$iso = "$logFolder\$(($downloadURL -split "/")[-1])"
|
||||||
Write-Log "ISO not specified. Checking if previously downloaded..."
|
Write-Log "ISO not specified. Checking if previously downloaded..."
|
||||||
if (Test-Path $iso) {
|
if (Test-Path $iso) {
|
||||||
Write-Log "ISO found: $iso"
|
Write-Log "ISO found: $iso"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Log "ISO not found. Downloading ISO now..."
|
Write-Log "ISO not found. Downloading ISO now..."
|
||||||
Start-BitsTransfer -Source "https://download2.veeam.com/VBR/v12/VeeamBackup&Replication_12.1.1.56_20240127.iso" -Destination $iso
|
Start-BitsTransfer -Source $downloadURL -Destination $iso
|
||||||
Write-Log "ISO downloaded to: $iso"
|
Write-Log "ISO downloaded to: $iso"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -354,46 +358,30 @@ if ($iso -eq "download") {
|
|||||||
try {
|
try {
|
||||||
Write-Log "Mounting ISO in Operating System"
|
Write-Log "Mounting ISO in Operating System"
|
||||||
Mount-DiskImage -ImagePath $iso | Out-Null
|
Mount-DiskImage -ImagePath $iso | Out-Null
|
||||||
$mountDrive = (Get-Volume | Where-Object { $_.FileSystemLabel -like "VEEAM BACKUP" }).DriveLetter + ":"
|
$mountDrive = (Get-Volume | Where-Object { $_.FileSystemLabel -like $isoLabel })[0].DriveLetter + ":"
|
||||||
|
if ($mountDrive -eq ":") {
|
||||||
|
throw "Unable to mount ISO. Please check if the ISO is mounted and has valid lable: $isoLabel"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Write-Log $_
|
Write-Log $_
|
||||||
throw "ISO mount failed. Please check upgrade log for more information: $logFile"
|
throw "ISO mount failed. Please check upgrade log for more information: $logFile"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Validating ISO major version
|
# Validating ISO
|
||||||
$fileInfo = Get-Content "$mountDrive\autorun.inf"
|
|
||||||
if ($fileInfo -match "12") {
|
|
||||||
Write-Log "ISO validated for version 12"
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Log "ISO failed validation! Non-v12 ISO detected."
|
|
||||||
Write-Log "Unmounting Veeam ISO"
|
|
||||||
Dismount-DiskImage -ImagePath $iso
|
|
||||||
throw "Incorrect ISO detected! This script was designed to work with a Veeam Backup & Replication v12.1 ISO. Please correct and re-run this script."
|
|
||||||
}
|
|
||||||
|
|
||||||
# Validating 12.1 ISO
|
|
||||||
try {
|
try {
|
||||||
# Identifying Silent Install EXE
|
# Identifying Silent Install EXE
|
||||||
$file = Get-ChildItem -Recurse -Filter "Veeam.Silent.Install.exe" -File -Path $mountDrive
|
$file = Get-ChildItem -Recurse -Filter "Veeam.Silent.Install.exe" -File -Path $mountDrive
|
||||||
$exe = $file.FullName
|
$exe = $file.FullName
|
||||||
|
|
||||||
if ("1.0.0" -eq $file.VersionInfo.ProductVersion) {
|
Write-Log "ISO validated, Silent Install EXE found: $exe"
|
||||||
Write-Log "ISO failed validation! Non-v12.1 ISO detected."
|
|
||||||
Write-Log "Unmounting Veeam ISO"
|
|
||||||
Dismount-DiskImage -ImagePath $iso
|
|
||||||
throw
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Log "ISO validated as version 12.1"
|
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Write-Log $_
|
Write-Log $_
|
||||||
Write-Log "Unable to validate 12.1 ISO. Please investigate and resolve. Logs can be found here: $logFile"
|
Write-Log "Unable to validate ISO. Please investigate and resolve. Logs can be found here: $logFile"
|
||||||
Write-Log "Unmounting Veeam ISO"
|
Write-Log "Unmounting Veeam ISO"
|
||||||
Dismount-DiskImage -ImagePath $iso
|
Dismount-DiskImage -ImagePath $iso
|
||||||
throw "Incorrect ISO detected! This script was designed to work with a Veeam Backup & Replication v12.1 ISO. Please correct and re-run this script."
|
throw "Incorrect ISO detected! This script was designed to work with a Veeam Backup & Replication ISO. Please correct and re-run this script."
|
||||||
}
|
}
|
||||||
|
|
||||||
### VBR PRE-UPGRADE ACTIONS
|
### VBR PRE-UPGRADE ACTIONS
|
||||||
|
|||||||
Reference in New Issue
Block a user