Files
2026-08-11 09:10:37 +02:00

43 lines
1.1 KiB
PowerShell

param(
[ValidateSet("DryRun", "Production")]
[string]$Mode = "DryRun"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$ConfigureScript = Join-Path $PSScriptRoot "Configure-VeeamEnvironment.ps1"
if(!$PSBoundParameters.ContainsKey("Mode")) {
Write-Host ""
Write-Host "Veeam Configure Startmenü" -ForegroundColor Cyan
Write-Host "1 - Dry-Run (Standard und empfohlen)"
Write-Host "2 - Produktiv"
$Selection = Read-Host "Modus auswählen [1]"
if([string]::IsNullOrWhiteSpace($Selection) -or $Selection -eq "1") {
$Mode = "DryRun"
}
elseif($Selection -eq "2") {
$Mode = "Production"
}
else {
throw "Ungültige Auswahl: $Selection"
}
}
if($Mode -eq "Production") {
Write-Host ""
Write-Warning "Produktivmodus kann Änderungen an der Veeam-Umgebung durchführen."
$Confirmation = Read-Host "Zum Fortfahren exakt PRODUKTIV eingeben"
if($Confirmation -cne "PRODUKTIV") {
Write-Host "Produktivlauf wurde abgebrochen." -ForegroundColor Yellow
return
}
& $ConfigureScript -Apply
}
else {
& $ConfigureScript -DryRun
}