Version 2.0.1
This commit is contained in:
@@ -1,53 +0,0 @@
|
|||||||
param(
|
|
||||||
[Parameter(Mandatory)]
|
|
||||||
[ValidateSet("VMware", "HyperV", "Proxmox")]
|
|
||||||
[string]$Platform,
|
|
||||||
|
|
||||||
[Parameter(Mandatory)]
|
|
||||||
[string]$Server,
|
|
||||||
|
|
||||||
[PSCredential]$Credential,
|
|
||||||
|
|
||||||
[switch]$DryRun
|
|
||||||
)
|
|
||||||
|
|
||||||
Set-StrictMode -Version Latest
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$Root = $PSScriptRoot
|
|
||||||
|
|
||||||
$RequiredModules = @(
|
|
||||||
"Modules\Veeam\BackupJobs.psm1",
|
|
||||||
"Modules\Platforms\$Platform.psm1"
|
|
||||||
)
|
|
||||||
|
|
||||||
foreach($Module in $RequiredModules) {
|
|
||||||
Import-Module (Join-Path $Root $Module) -Force -ErrorAction Stop
|
|
||||||
}
|
|
||||||
|
|
||||||
$Configuration = Get-Content (Join-Path $Root "Config\VeeamConfig.json") -Raw | ConvertFrom-Json
|
|
||||||
|
|
||||||
if($Platform -eq "Proxmox" -and $null -eq $Credential) {
|
|
||||||
$Credential = Get-Credential -Message "Proxmox API-Token-ID und Token-Secret eingeben"
|
|
||||||
}
|
|
||||||
|
|
||||||
switch($Platform) {
|
|
||||||
"VMware" { $VirtualMachines = @(Get-VMwareInventory -Server $Server) }
|
|
||||||
"HyperV" { $VirtualMachines = @(Get-HyperVInventory -Server $Server) }
|
|
||||||
"Proxmox" { $VirtualMachines = @(Get-ProxmoxInventory -Server $Server -ApiCredential $Credential) }
|
|
||||||
}
|
|
||||||
|
|
||||||
$Schedules = New-AlphabeticalBackupSchedules `
|
|
||||||
-JobName $Configuration.BackupJob.Name `
|
|
||||||
-VirtualMachines $VirtualMachines `
|
|
||||||
-ScheduleGroups @($Configuration.BackupJob.ScheduleGroups)
|
|
||||||
|
|
||||||
[PSCustomObject]@{
|
|
||||||
Platform = $Platform
|
|
||||||
Server = $Server
|
|
||||||
DryRun = $DryRun.IsPresent
|
|
||||||
VirtualMachineCount = $VirtualMachines.Count
|
|
||||||
VirtualMachines = $VirtualMachines
|
|
||||||
Schedules = $Schedules
|
|
||||||
JobsCreated = $false
|
|
||||||
Message = "Inventar gelesen und Zeitplanentwurf erstellt. Es wurden keine Veeam-Jobs angelegt."
|
|
||||||
}
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
- Dry-Run Unterstützung
|
- Dry-Run Unterstützung
|
||||||
|
|
||||||
.VERSION
|
.VERSION
|
||||||
1.0.2
|
2.0.1
|
||||||
#>
|
#>
|
||||||
|
|
||||||
|
|
||||||
@@ -635,9 +635,20 @@ function Start-VeeamEnterpriseInstall {
|
|||||||
|
|
||||||
$Configuration = Get-InstallerConfiguration
|
$Configuration = Get-InstallerConfiguration
|
||||||
|
|
||||||
$VeeamSourcePath = Resolve-VeeamSourcePath `
|
$VeeamAlreadyInstalled = (!$Script:IsDryRun -and (Test-VeeamInstalled))
|
||||||
-SourcePath $VeeamSourcePath `
|
|
||||||
-ConfiguredPath ([string]$Configuration.Veeam.SourcePath)
|
if($VeeamAlreadyInstalled)
|
||||||
|
{
|
||||||
|
Write-Host "Veeam ist bereits installiert. Setup wird übersprungen." -ForegroundColor Green
|
||||||
|
Write-EnterpriseLog -Level INFO -Message "Vorhandene Veeam-Installation erkannt; Setup wird übersprungen."
|
||||||
|
$VeeamSourcePath = ""
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$VeeamSourcePath = Resolve-VeeamSourcePath `
|
||||||
|
-SourcePath $VeeamSourcePath `
|
||||||
|
-ConfiguredPath ([string]$Configuration.Veeam.SourcePath)
|
||||||
|
}
|
||||||
|
|
||||||
$Configuration.Repository.Path = Resolve-RepositoryPath `
|
$Configuration.Repository.Path = Resolve-RepositoryPath `
|
||||||
-Path ([string]$Configuration.Repository.Path) `
|
-Path ([string]$Configuration.Repository.Path) `
|
||||||
@@ -722,20 +733,32 @@ function Start-VeeamEnterpriseInstall {
|
|||||||
-Message ("SQL-Datenbank vorbereitet: {0}; Konto: {1}; Rolle: {2}" -f $SQLPreparation.Database, $SQLPreparation.ServiceAccount, $SQLPreparation.DatabaseRole)
|
-Message ("SQL-Datenbank vorbereitet: {0}; Konto: {1}; Rolle: {2}" -f $SQLPreparation.Database, $SQLPreparation.ServiceAccount, $SQLPreparation.DatabaseRole)
|
||||||
}
|
}
|
||||||
|
|
||||||
$VeeamAnswerFile = Resolve-VeeamAnswerFile `
|
if($VeeamAlreadyInstalled)
|
||||||
-AnswerFile $VeeamAnswerFile `
|
{
|
||||||
-SourcePath $VeeamSourcePath `
|
$Installation = [PSCustomObject]@{
|
||||||
-LocalConfigPath (Join-Path $Script:InstallerRoot "Config") `
|
Status = "AlreadyInstalled"
|
||||||
-DatabaseEngine $Configuration.SQL.Engine `
|
SetupSkipped = $true
|
||||||
-SQLServer $Configuration.SQL.Server `
|
InstallationPath = Get-VeeamInstallationPath
|
||||||
-SQLInstance $Configuration.SQL.Instance `
|
Version = Get-VeeamVersion
|
||||||
-DatabaseName $Configuration.SQL.Database
|
}
|
||||||
|
}
|
||||||
$Installation =
|
else
|
||||||
Install-VeeamProduct `
|
{
|
||||||
-Configuration $Configuration `
|
$VeeamAnswerFile = Resolve-VeeamAnswerFile `
|
||||||
|
-AnswerFile $VeeamAnswerFile `
|
||||||
-SourcePath $VeeamSourcePath `
|
-SourcePath $VeeamSourcePath `
|
||||||
-AnswerFile $VeeamAnswerFile
|
-LocalConfigPath (Join-Path $Script:InstallerRoot "Config") `
|
||||||
|
-DatabaseEngine $Configuration.SQL.Engine `
|
||||||
|
-SQLServer $Configuration.SQL.Server `
|
||||||
|
-SQLInstance $Configuration.SQL.Instance `
|
||||||
|
-DatabaseName $Configuration.SQL.Database
|
||||||
|
|
||||||
|
$Installation =
|
||||||
|
Install-VeeamProduct `
|
||||||
|
-Configuration $Configuration `
|
||||||
|
-SourcePath $VeeamSourcePath `
|
||||||
|
-AnswerFile $VeeamAnswerFile
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if($null -eq (Get-Module -ListAvailable -Name "Veeam.Backup.PowerShell"))
|
if($null -eq (Get-Module -ListAvailable -Name "Veeam.Backup.PowerShell"))
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
Module......: Bootstrap.psm1
|
Module......: Bootstrap.psm1
|
||||||
Projekt.....: Veeam Enterprise Installer
|
Projekt.....: Veeam Enterprise Installer
|
||||||
Version.....: 2.0.0
|
Version.....: 2.0.1
|
||||||
Autor.......: ChatGPT & Benutzer
|
Autor.......: ChatGPT & Benutzer
|
||||||
PowerShell..: 5.1
|
PowerShell..: 5.1
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
@@ -29,7 +29,7 @@ Set-StrictMode -Version Latest
|
|||||||
#region Script Variablen
|
#region Script Variablen
|
||||||
|
|
||||||
$Script:ProjectName = "Veeam Enterprise Installer"
|
$Script:ProjectName = "Veeam Enterprise Installer"
|
||||||
$Script:ProjectVersion = "2.0.0"
|
$Script:ProjectVersion = "2.0.1"
|
||||||
|
|
||||||
$Script:RootPath = $null
|
$Script:RootPath = $null
|
||||||
$Script:ModulePath = $null
|
$Script:ModulePath = $null
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
PowerShell-basierter Installer zur automatisierten Installation und Grundkonfiguration von Veeam Backup & Replication auf Windows Server.
|
PowerShell-basierter Installer zur automatisierten Installation und Grundkonfiguration von Veeam Backup & Replication auf Windows Server.
|
||||||
|
|
||||||
|
**Projektversion:** 2.0.1
|
||||||
|
|
||||||
> **Status:** Entwicklung und Test. Vor einem produktiven Einsatz vollständig in einer isolierten Testumgebung prüfen.
|
> **Status:** Entwicklung und Test. Vor einem produktiven Einsatz vollständig in einer isolierten Testumgebung prüfen.
|
||||||
|
|
||||||
## Funktionen
|
## Funktionen
|
||||||
@@ -49,6 +51,10 @@ Installation mit automatisch erkanntem Installationsmedium starten:
|
|||||||
.\Install-VeeamEnterprise.ps1
|
.\Install-VeeamEnterprise.ps1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Ist Veeam bereits installiert, überspringt das Skript den Setup-Schritt und
|
||||||
|
setzt die Konfiguration von Repository und Backup-Jobs fort. Dadurch kann der
|
||||||
|
Lauf nach einem erforderlichen Neustart sicher wieder aufgenommen werden.
|
||||||
|
|
||||||
Installationsmedium und Antwortdatei können auch explizit angegeben werden:
|
Installationsmedium und Antwortdatei können auch explizit angegeben werden:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
|
|||||||
Reference in New Issue
Block a user