Skip to content

Commit

Permalink
Merge pull request AsBuiltReport#139 from rebelinux/dev
Browse files Browse the repository at this point in the history
v0.8.5
  • Loading branch information
rebelinux committed Jan 25, 2024
2 parents 5f20eb1 + 58930d8 commit 011fb85
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 68 deletions.
4 changes: 2 additions & 2 deletions AsBuiltReport.Veeam.VBR.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AsBuiltReport.Veeam.VBR.psm1'

# Version number of this module.
ModuleVersion = '0.8.4'
ModuleVersion = '0.8.5'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -63,7 +63,7 @@ RequiredModules = @(
}
@{
ModuleName = 'Veeam.Diagrammer';
ModuleVersion = '0.5.7'
ModuleVersion = '0.5.8'
}
)

Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
46 changes: 27 additions & 19 deletions Src/Private/Get-AbrVbrBackupProxy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)"
}
}
}
Expand Down Expand Up @@ -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)"
}
}
}
Expand Down
117 changes: 70 additions & 47 deletions Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function Invoke-AsBuiltReport.Veeam.VBR {
}
} Catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
}
}

# Import Report Configuration
$script:Report = $ReportConfig.Report
Expand Down Expand Up @@ -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)"
}
BlankLine
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
}
} Catch {
Write-PscriboMessage -IsWarning "Wan Accelerator Diagram Section: $($_.Exception.Message)"
}
}
}
Expand All @@ -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)"
}
}
}
Expand All @@ -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)"
}
}
}
Expand Down Expand Up @@ -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)"
}
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
}
BlankLine
} Catch {
Write-PscriboMessage -IsWarning "Tape Infrastructure Diagram Section: $($_.Exception.Message)"
}
}
}
Expand All @@ -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)"
}
}
}
Expand Down Expand Up @@ -399,7 +419,10 @@ function Invoke-AsBuiltReport.Veeam.VBR {
}
}
}
#Disconnect-VBRServer
if ((Get-VBRServerSession).Server) {
Write-PScriboMessage "Disconecting section from $((Get-VBRServerSession).Server)"
Disconnect-VBRServer
}
}
#endregion foreach loop
}

0 comments on commit 011fb85

Please sign in to comment.