-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
Summary
During installation/config deployment, DeployVeeamConfiguration.ps1 fails when importing Veeam.Backup.PowerShell because the Veeam module requires PowerShell 7+, but the installer/deployment tool is running under Windows PowerShell 5.1.
Environment
- VeeamNotify version: v2.1.2
- Windows PowerShell version: 5.1.17763.8146
- PowerShell 7 installed?: [Yes/No]
- If Yes:
pwsh -voutput: [paste here]
- If Yes:
- Veeam Backup & Replication build number: 13.0.1.1071
- OS version: [e.g., Windows Server 2019/2022 + build] (optional)
Steps to reproduce
- Run the installer:
Set-ExecutionPolicy Bypass -Scope Process -Force; ` [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; ` iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/tigattack/VeeamNotify/main/Installer.ps1'))
- Select:
- Download source: Version
- Version: v2.1.2
- Choose to configure now (Y)
- Run the configuration deployment tool (Y)
- Error occurs during
Import-Module Veeam.Backup.PowerShell
Expected behavior
The deployment tool should either:
- run under PowerShell 7 automatically / instruct the user to run it with
pwsh, OR - detect the PowerShell version and show a clear message before proceeding.
Actual behavior / error
Import-Module : The version of Windows PowerShell on this computer is '5.1.17763.8146'.
The module 'C:\Program Files\Veeam\Backup and Replication\Console\Veeam.Backup.PowerShell\Veeam.Backup.PowerShell.psd1'
requires a minimum Windows PowerShell version of '7.0' to run.
At C:\VeeamScripts\VeeamNotify\resources\DeployVeeamConfiguration.ps1:322 char:1
+ Import-Module Veeam.Backup.PowerShell -DisableNameChecking
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable (...) [Import-Module], InvalidOperationException
+ FullyQualifiedErrorId : Modules_InsufficientPowerShellVersion,Microsoft.PowerShell.Commands.ImportModuleCommand
Suggested fix (optional)
Add a PowerShell version check at the start of the deployment script and/or installer.
If $PSVersionTable.PSVersion.Major -lt 7, print instructions to run:
pwsh -NoProfile -ExecutionPolicy Bypass -File "C:\VeeamScripts\VeeamNotify\resources\DeployVeeamConfiguration.ps1"References (format examples)
- File path + line number:
resources/DeployVeeamConfiguration.ps1line ~322 (Import-Module Veeam.Backup.PowerShell)
- Permalink (preferred):
- https://github.com/tigattack/VeeamNotify/blob//resources/DeployVeeamConfiguration.ps1#L322
Steps To Reproduce
No response
VeeamNotify version
v2.1.2
PowerShell version
5.1
Veeam Backup & Replication build number
13.0.1.1071
Relevant log output
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working