From 2fafae00134acfd060999c02cd4c8aa003c9a283 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Mon, 4 Nov 2024 20:55:43 -0400 Subject: [PATCH] Fix [Bug]: Veeam.Backup.PowerShell 12 or higher is required to run the Veeam VBR As Built Report. #187 --- Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 index a905146..4f23cad 100644 --- a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 @@ -5,7 +5,7 @@ function Invoke-AsBuiltReport.Veeam.VBR { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -24,6 +24,8 @@ function Invoke-AsBuiltReport.Veeam.VBR { #Requires -Version 5.1 #Requires -PSEdition Desktop #Requires -RunAsAdministrator + #Requires -Modules @{ ModuleName="Veeam.Backup.PowerShell"; MaximumVersion="12.2.0.334" } + if ($psISE) { Write-Error -Message "You cannot run this script inside the PowerShell ISE. Please execute it from the PowerShell Command Window." @@ -90,7 +92,6 @@ function Invoke-AsBuiltReport.Veeam.VBR { if (Select-String -InputObject $System -Pattern "^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$") { throw "Please use the FQDN instead of an IP address to connect to the Backup Server: $System" } - Get-AbrVbrRequiredModule -Name 'Veeam.Backup.PowerShell' -Version '12' Get-AbrVbrServerConnection $VeeamBackupServer = ((Get-VBRServerSession).Server).ToString().ToUpper().Split(".")[0] $script:VbrLicenses = Get-VBRInstalledLicense