Run the Veeam collector under PowerShell 7

VBR 13's Veeam PowerShell module expects PowerShell 7, but the scheduled
task ran powershell.exe (Windows PowerShell 5.1).

- The installer finds a machine-wide pwsh.exe (Program Files, then
  PATH, or -PwshPath), checks it reports major version 7+, and rejects
  Microsoft Store installs, which SYSTEM can't run. All checks run
  before anything is changed
- The scheduled task and printed next steps use that pwsh.exe

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-07 14:04:42 -06:00
co-authored by Claude Opus 5.5
parent 9ae93cfbc2
commit ba798284df
2 changed files with 39 additions and 9 deletions
+9 -3
View File
@@ -5,19 +5,25 @@ It covers jobs returned by `Get-VBRJob`: VM backup, replication and backup copy
## Install (on the VBR server, as an administrator)
Requires PowerShell 7 installed machine-wide (`winget install Microsoft.PowerShell` or the MSI),
which VBR 13's Veeam module expects. The Microsoft Store version won't work, because the SYSTEM
account can't run it. The installer checks for this before changing anything.
1. On the dashboard host, create a key for this server:
```bash
python manage.py create-key veeam-acme
```
2. Copy this folder to the VBR server and run:
2. Copy this folder to the VBR server and run, from PowerShell 7 (`pwsh`):
```powershell
.\Install-VeeamCollector.ps1 -ApiUrl https://backups.example.com -Tenant "Acme Corp"
```
It prompts for the key, then:
- writes `C:\ProgramData\BackupDashboard\veeam-collector.json` (readable only by SYSTEM and Administrators)
- copies the script to `C:\Program Files\BackupDashboard\`
- registers the scheduled task **Backup Dashboard - Veeam collector** (SYSTEM, every 15 minutes)
3. Preview the payloads, then backfill 30 days so the history view is populated straight away:
- registers the scheduled task **Backup Dashboard - Veeam collector** (SYSTEM, every 15 minutes,
run by `C:\Program Files\PowerShell\7\pwsh.exe`; use `-PwshPath` if it's installed elsewhere)
3. Preview the payloads, then backfill 30 days so the history view is populated straight away
(from `pwsh`):
```powershell
& 'C:\Program Files\BackupDashboard\Send-VeeamBackupStatus.ps1' -DryRun
& 'C:\Program Files\BackupDashboard\Send-VeeamBackupStatus.ps1' -LookbackHours 720