From 58930d84e9453aadf63ab021226bf5b9527a3509 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Thu, 25 Jan 2024 14:53:52 -0400 Subject: [PATCH] v0.8.5 --- AsBuiltReport.Veeam.VBR.psd1 | 2 +- CHANGELOG.md | 11 ++ Src/Private/Get-AbrVbrBackupProxy.ps1 | 46 +++++--- Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 | 110 +++++++++++------- 4 files changed, 104 insertions(+), 65 deletions(-) diff --git a/AsBuiltReport.Veeam.VBR.psd1 b/AsBuiltReport.Veeam.VBR.psd1 index 1f61e0f..5ffe4c7 100644 --- a/AsBuiltReport.Veeam.VBR.psd1 +++ b/AsBuiltReport.Veeam.VBR.psd1 @@ -63,7 +63,7 @@ RequiredModules = @( } @{ ModuleName = 'Veeam.Diagrammer'; - ModuleVersion = '0.5.7' + ModuleVersion = '0.5.8' } ) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3578924..93eb757 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # :arrows_clockwise: Veeam VBR As Built Report Changelog +## [0.8.5] - 2024-01-25 + +### Changed + +- Removed Graphviz install check code. + +### Fixed + +- Improved error handling on Diagram section. +- Fixed issue with Veeam.Diagrammer module. + ## [0.8.4] - 2024-01-16 ### Added diff --git a/Src/Private/Get-AbrVbrBackupProxy.ps1 b/Src/Private/Get-AbrVbrBackupProxy.ps1 index d802788..220fcc6 100644 --- a/Src/Private/Get-AbrVbrBackupProxy.ps1 +++ b/Src/Private/Get-AbrVbrBackupProxy.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrBackupProxy { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.3 + Version: 0.8.5 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -442,16 +442,20 @@ function Get-AbrVbrBackupProxy { } if ($Options.EnableDiagrams) { Try { - $Graph = New-VeeamDiagram -Target $System -Credential $Credential -Format base64 -Direction top-to-bottom -DiagramType "Backup-to-vSphere-Proxy" - } Catch { - Write-PscriboMessage -IsWarning "VMware Backup Proxy Diagram: $($_.Exception.Message)" - } - if ($Graph) { - Section -Style Heading3 "VMware Backup Proxy Diagram." { - Image -Base64 $Graph -Text "VMware Backup Proxy Diagram" -Percent 20 -Align Center - Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + Try { + $Graph = New-VeeamDiagram -Target $System -Credential $Credential -Format base64 -Direction top-to-bottom -DiagramType "Backup-to-vSphere-Proxy" + } Catch { + Write-PscriboMessage -IsWarning "VMware Backup Proxy Diagram: $($_.Exception.Message)" + } + if ($Graph) { + Section -Style Heading3 "VMware Backup Proxy Diagram." { + Image -Base64 $Graph -Text "VMware Backup Proxy Diagram" -Percent 20 -Align Center + Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + } + BlankLine } - BlankLine + } Catch { + Write-PscriboMessage -IsWarning "VMware Backup Proxy Diagram Section: $($_.Exception.Message)" } } } @@ -880,16 +884,20 @@ function Get-AbrVbrBackupProxy { } if ($Options.EnableDiagrams) { Try { - $Graph = New-VeeamDiagram -Target $System -Credential $Credential -Format base64 -Direction top-to-bottom -DiagramType "Backup-to-HyperV-Proxy" - } Catch { - Write-PscriboMessage -IsWarning "HyperV Backup Proxy Diagram: $($_.Exception.Message)" - } - if ($Graph) { - Section -Style Heading3 "HyperV Backup Proxy Diagram." { - Image -Base64 $Graph -Text "HyperV Backup Proxy Diagram" -Percent 20 -Align Center - Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + Try { + $Graph = New-VeeamDiagram -Target $System -Credential $Credential -Format base64 -Direction top-to-bottom -DiagramType "Backup-to-HyperV-Proxy" + } Catch { + Write-PscriboMessage -IsWarning "HyperV Backup Proxy Diagram: $($_.Exception.Message)" } - BlankLine + if ($Graph) { + Section -Style Heading3 "HyperV Backup Proxy Diagram." { + Image -Base64 $Graph -Text "HyperV Backup Proxy Diagram" -Percent 20 -Align Center + Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + } + BlankLine + } + } Catch { + Write-PscriboMessage -IsWarning "HyperV Backup Proxy Diagram Section: $($_.Exception.Message)" } } } diff --git a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 index 3f1faf2..e35f5e8 100644 --- a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 @@ -114,16 +114,20 @@ function Invoke-AsBuiltReport.Veeam.VBR { Get-AbrVbrWANAccelerator if ($Options.EnableDiagrams -and ((Get-VBRWANAccelerator).count -gt 0)) { Try { - $Graph = New-VeeamDiagram -Target $System -Credential $Credential -Format base64 -Direction top-to-bottom -DiagramType "Backup-to-WanAccelerator" - } Catch { - Write-PscriboMessage -IsWarning "Wan Accelerator Diagram: $($_.Exception.Message)" - } - if ($Graph) { - Section -Style Heading3 "Wan Accelerator Diagram." { - Image -Base64 $Graph -Text "Wan Accelerator Diagram" -Percent (Get-ImagePercent -Graph $Graph) -Align Center - Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + Try { + $Graph = New-VeeamDiagram -Target $System -Credential $Credential -Format base64 -Direction top-to-bottom -DiagramType "Backup-to-WanAccelerator" + } Catch { + Write-PscriboMessage -IsWarning "Wan Accelerator Diagram: $($_.Exception.Message)" + } + if ($Graph) { + Section -Style Heading3 "Wan Accelerator Diagram." { + Image -Base64 $Graph -Text "Wan Accelerator Diagram" -Percent (Get-ImagePercent -Graph $Graph) -Align Center + Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + } + BlankLine } - BlankLine + } Catch { + Write-PscriboMessage -IsWarning "Wan Accelerator Diagram Section: $($_.Exception.Message)" } } } @@ -137,16 +141,20 @@ function Invoke-AsBuiltReport.Veeam.VBR { Get-AbrVbrObjectRepository if ($Options.EnableDiagrams) { Try { - $Graph = New-VeeamDiagram -Target $System -Credential $Credential -Format base64 -Direction top-to-bottom -DiagramType "Backup-to-Repository" - } Catch { - Write-PscriboMessage -IsWarning "Backup Repository Diagram: $($_.Exception.Message)" - } - if ($Graph) { - Section -Style Heading3 "Backup Repository Diagram." { - Image -Base64 $Graph -Text "Backup Repository Diagram" -Percent (Get-ImagePercent -Graph $Graph) -Align Center - Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + Try { + $Graph = New-VeeamDiagram -Target $System -Credential $Credential -Format base64 -Direction top-to-bottom -DiagramType "Backup-to-Repository" + } Catch { + Write-PscriboMessage -IsWarning "Backup Repository Diagram: $($_.Exception.Message)" + } + if ($Graph) { + Section -Style Heading3 "Backup Repository Diagram." { + Image -Base64 $Graph -Text "Backup Repository Diagram" -Percent (Get-ImagePercent -Graph $Graph) -Align Center + Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + } + BlankLine } - BlankLine + } Catch { + Write-PscriboMessage -IsWarning "Backup Repository Diagram Section: $($_.Exception.Message)" } } } @@ -155,16 +163,20 @@ function Invoke-AsBuiltReport.Veeam.VBR { Get-AbrVbrScaleOutRepository if ($Options.EnableDiagrams -and (Get-VBRBackupRepository -ScaleOut)) { Try { - $Graph = New-VeeamDiagram -Target $System -Credential $Credential -Format base64 -Direction top-to-bottom -DiagramType "Backup-to-Sobr" - } Catch { - Write-PscriboMessage -IsWarning "ScaleOut Backup Repository Diagram: $($_.Exception.Message)" - } - if ($Graph) { - Section -Style Heading3 "ScaleOut Backup Repository Diagram." { - Image -Base64 $Graph -Text "ScaleOut Backup Repository Diagram" -Percent (Get-ImagePercent -Graph $Graph) -Align Center - Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + Try { + $Graph = New-VeeamDiagram -Target $System -Credential $Credential -Format base64 -Direction top-to-bottom -DiagramType "Backup-to-Sobr" + } Catch { + Write-PscriboMessage -IsWarning "ScaleOut Backup Repository Diagram: $($_.Exception.Message)" } - BlankLine + if ($Graph) { + Section -Style Heading3 "ScaleOut Backup Repository Diagram." { + Image -Base64 $Graph -Text "ScaleOut Backup Repository Diagram" -Percent (Get-ImagePercent -Graph $Graph) -Align Center + Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + } + BlankLine + } + } Catch { + Write-PscriboMessage -IsWarning "ScaleOut Backup Repository Diagram Section: $($_.Exception.Message)" } } } @@ -206,16 +218,20 @@ function Invoke-AsBuiltReport.Veeam.VBR { if ($Options.EnableDiagrams -and ((Get-VBRTapeServer).count -gt 0) -and ((Get-VBRTapeLibrary).count -gt 0)) { Try { - $Graph = New-VeeamDiagram -Target $System -Credential $Credential -Format base64 -Direction top-to-bottom -DiagramType "Backup-to-Tape" - } Catch { - Write-PscriboMessage -IsWarning "Tape Infrastructure Diagram: $($_.Exception.Message)" - } - if ($Graph) { - Section -Style Heading3 "Tape Infrastructure Diagram." { - Image -Base64 $Graph -Text "Tape Infrastructure Diagram" -Percent (Get-ImagePercent -Graph $Graph) -Align Center - Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + Try { + $Graph = New-VeeamDiagram -Target $System -Credential $Credential -Format base64 -Direction top-to-bottom -DiagramType "Backup-to-Tape" + } Catch { + Write-PscriboMessage -IsWarning "Tape Infrastructure Diagram: $($_.Exception.Message)" } - BlankLine + if ($Graph) { + Section -Style Heading3 "Tape Infrastructure Diagram." { + Image -Base64 $Graph -Text "Tape Infrastructure Diagram" -Percent (Get-ImagePercent -Graph $Graph) -Align Center + Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + } + BlankLine + } + } Catch { + Write-PscriboMessage -IsWarning "Tape Infrastructure Diagram Section: $($_.Exception.Message)" } } } @@ -242,16 +258,20 @@ function Invoke-AsBuiltReport.Veeam.VBR { if ($Options.EnableDiagrams -and $InventObjs) { Try { - $Graph = New-VeeamDiagram -Target $System -Credential $Credential -Format base64 -Direction top-to-bottom -DiagramType "Backup-to-ProtectedGroup" - } Catch { - Write-PscriboMessage -IsWarning "Physical Infrastructure Diagram: $($_.Exception.Message)" - } - if ($Graph) { - Section -Style Heading3 "Physical Infrastructure Diagram." { - Image -Base64 $Graph -Text "Physical Infrastructure Diagram" -Percent (Get-ImagePercent -Graph $Graph) -Align Center - Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + Try { + $Graph = New-VeeamDiagram -Target $System -Credential $Credential -Format base64 -Direction top-to-bottom -DiagramType "Backup-to-ProtectedGroup" + } Catch { + Write-PscriboMessage -IsWarning "Physical Infrastructure Diagram: $($_.Exception.Message)" } - BlankLine + if ($Graph) { + Section -Style Heading3 "Physical Infrastructure Diagram." { + Image -Base64 $Graph -Text "Physical Infrastructure Diagram" -Percent (Get-ImagePercent -Graph $Graph) -Align Center + Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + } + BlankLine + } + } Catch { + Write-PscriboMessage -IsWarning "Physical Infrastructure Diagram Section: $($_.Exception.Message)" } } }