@@ -5,7 +5,7 @@ function Invoke-AsBuiltReport.Veeam.VBR {
55 . DESCRIPTION
66 Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo.
77 . NOTES
8- Version: 0.8.17
8+ Version: 0.8.18
99 Author: Jonathan Colon
1010 Twitter: @jcolonfzenpr
1111 Github: rebelinux
@@ -82,13 +82,6 @@ function Invoke-AsBuiltReport.Veeam.VBR {
8282 }
8383 }
8484
85- # Set default theme styles
86- if (-Not $Options.DiagramTheme ) {
87- $DiagramTheme = ' White'
88- } else {
89- $DiagramTheme = $Options.DiagramTheme
90- }
91-
9285 # Used to set values to TitleCase where required
9386 $script :TextInfo = (Get-Culture ).TextInfo
9487
@@ -107,12 +100,12 @@ function Invoke-AsBuiltReport.Veeam.VBR {
107100 if ($Options.EnableDiagrams ) {
108101 Try {
109102 Try {
110- $Graph = Get-AbrVbrDiagrammer - DiagramType Backup-Infrastructure - DiagramOutput base64
103+ $Graph = Get-AbrVbrDiagrammer - DiagramType ' Backup-Infrastructure' - DiagramOutput base64
111104 } Catch {
112105 Write-PScriboMessage - IsWarning " Backup Infrastructure Diagram: $ ( $_.Exception.Message ) "
113106 }
114107 if ($Graph ) {
115- If ((Get-DiaImagePercent - GraphObj $Graph ).Width -gt 1500 ) { $ImagePrty = 10 } else { $ImagePrty = 40 }
108+ If ((Get-DiaImagePercent - GraphObj $Graph ).Width -gt 1500 ) { $ImagePrty = 10 } else { $ImagePrty = 30 }
116109 Section - Style Heading1 " Backup Infrastructure Diagram." - Orientation Landscape {
117110 Image - Base64 $Graph - Text " Backup Infrastructure Diagram" - Percent $ImagePrty - Align Center
118111 Paragraph " Image preview: Opens the image in a new tab to view it at full resolution." - Tabs 2
@@ -195,7 +188,7 @@ function Invoke-AsBuiltReport.Veeam.VBR {
195188 if ($Graph ) {
196189 If ((Get-DiaImagePercent - GraphObj $Graph ).Width -gt 1500 ) { $ImagePrty = 10 } else { $ImagePrty = 50 }
197190 Section - Style Heading3 " Wan Accelerator Diagram." {
198- Image - Base64 $Graph - Text " Wan Accelerator Diagram" - Align Center - Width 600 - Height 400
191+ Image - Base64 $Graph - Text " Wan Accelerator Diagram" - Percent $ImagePrty - Align Center
199192 Paragraph " Image preview: Opens the image in a new tab to view it at full resolution." - Tabs 2
200193 }
201194 BlankLine
@@ -526,11 +519,31 @@ function Invoke-AsBuiltReport.Veeam.VBR {
526519 }
527520
528521 # ---------------------------------------------------------------------------------------------#
529- # Backup Infrastructure Diagram Section #
522+ # Export Diagram Section #
530523 # ---------------------------------------------------------------------------------------------#
531524
532- Get-AbrVbrDiagrammer - DiagramType ' Backup-Infrastructure'
533-
525+ if ($Options.ExportDiagrams ) {
526+ $DiagramTypeHash = @ {
527+ ' Infrastructure' = ' Backup-Infrastructure'
528+ ' FileProxy' = ' Backup-to-File-Proxy'
529+ ' HyperVProxy' = ' Backup-to-HyperV-Proxy'
530+ ' ProtectedGroup' = ' Backup-to-ProtectedGroup'
531+ ' Repository' = ' Backup-to-Repository'
532+ ' Sobr' = ' Backup-to-Sobr'
533+ ' Tape' = ' Backup-to-Tape'
534+ ' vSphereProxy' = ' Backup-to-vSphere-Proxy'
535+ ' WanAccelerator' = ' Backup-to-WanAccelerator'
536+ }
537+ $Options.DiagramType.PSobject.Properties | ForEach-Object {
538+ try {
539+ if ($_.Value ) {
540+ Get-AbrVbrDiagrammer - DiagramType $DiagramTypeHash [$_.Name ]
541+ }
542+ } catch {
543+ Write-PScriboMessage - IsWarning " Export Diagram $ ( $_.Name ) Error: $ ( $_.Exception.Message ) "
544+ }
545+ }
546+ }
534547 }
535548
536549 if ((Get-VBRServerSession ).Server) {
0 commit comments