Skip to content

Commit 492d009

Browse files
authored
Merge pull request #55 from AsBuiltReport/dev
v0.3.11
2 parents 0e8474d + 9c4c8e8 commit 492d009

37 files changed

+387
-314
lines changed

.github/workflows/Release.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,30 @@ jobs:
3333
shell: pwsh
3434
run: |
3535
Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose
36-
tweet:
37-
needs: publish-to-gallery
38-
runs-on: ubuntu-latest
39-
steps:
40-
- uses: Eomm/why-don-t-you-tweet@v2
41-
# We don't want to tweet if the repository is not a public one
42-
if: ${{ !github.event.repository.private }}
43-
with:
44-
# GitHub event payload
45-
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
46-
tweet-message: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Veeam #AsBuiltReport #PowerShell #VeeamVanguard #VeeamLegend"
47-
env:
48-
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
49-
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
50-
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
51-
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
52-
bsky-post:
53-
needs: publish-to-gallery
54-
runs-on: ubuntu-latest
55-
steps:
56-
- uses: zentered/[email protected]
57-
with:
58-
post: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Veeam #AsBuiltReport #PowerShell #VeeamVanguard #VeeamLegend"
59-
env:
60-
BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }}
61-
BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }}
36+
# tweet:
37+
# needs: publish-to-gallery
38+
# runs-on: ubuntu-latest
39+
# steps:
40+
# - uses: Eomm/why-don-t-you-tweet@v2
41+
# # We don't want to tweet if the repository is not a public one
42+
# if: ${{ !github.event.repository.private }}
43+
# with:
44+
# # GitHub event payload
45+
# # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
46+
# tweet-message: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Veeam #AsBuiltReport #PowerShell #VeeamVanguard #VeeamLegend"
47+
# env:
48+
# TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
49+
# TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
50+
# TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
51+
# TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
52+
# bsky-post:
53+
# needs: publish-to-gallery
54+
# runs-on: ubuntu-latest
55+
# steps:
56+
# - uses: zentered/[email protected]
57+
# with:
58+
# post: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Veeam #AsBuiltReport #PowerShell #VeeamVanguard #VeeamLegend"
59+
# env:
60+
# BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }}
61+
# BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }}
6262

AsBuiltReport.Veeam.VB365.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'AsBuiltReport.Veeam.VB365.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.3.10'
15+
ModuleVersion = '0.3.11'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -63,7 +63,7 @@
6363
},
6464
@{
6565
ModuleName = 'Diagrammer.Core';
66-
ModuleVersion = '0.2.22'
66+
ModuleVersion = '0.2.25'
6767
}
6868
)
6969

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
##### This project is community maintained and has no sponsorship from Veeam, its employees or any of its affiliates.
99

10+
## [0.3.11] - 2025-05-05
11+
12+
### Added
13+
14+
- Add the `Export-AbrVb365Diagram` function to enhance diagram export capabilities.
15+
16+
### Changed
17+
18+
- Update the module version to `0.3.11`.
19+
- Upgrade the `Diagrammer.Core` module to version `0.2.25`.
20+
- Move the infrastructure diagram to appear as the first section in the report.
21+
- Refactore `Write-PScriboMessage` calls to use the `-Message` parameter for consistency across scripts.
22+
23+
### Removed
24+
25+
- Remove unused diagram generation code.
26+
1027
## [0.3.10] - 2025-04-11
1128

1229
### Changed
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
function Export-AbrVb365Diagram {
2+
<#
3+
.SYNOPSIS
4+
Used by As Built Report to export Veeam VB365 infrastructure diagram
5+
.DESCRIPTION
6+
Documents the configuration of Veeam VB365 in Word/HTML/Text formats using PScribo.
7+
.NOTES
8+
Version: 0.3.11
9+
Author: Jonathan Colon
10+
Twitter: @jcolonfzenpr
11+
Github: rebelinux
12+
Credits: Iain Brighton (@iainbrighton) - PScribo module
13+
14+
.LINK
15+
https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VB365
16+
#>
17+
[CmdletBinding()]
18+
param (
19+
)
20+
21+
begin {
22+
Write-PScriboMessage -Message "EnableDiagrams set to $($Options.EnableDiagrams)."
23+
}
24+
25+
process {
26+
if ($Options.EnableDiagrams) {
27+
Write-PScriboMessage -Message "Collecting Veeam Infrastructure diagram"
28+
29+
# Variable translating Icon to Image Path ($IconPath)
30+
$script:Images = @{
31+
"VB365_Server" = "VBR_server.png"
32+
"VB365_Proxy_Server" = "Proxy_Server.png"
33+
"VB365_Proxy" = "Veeam_Proxy.png"
34+
"VBR_LOGO" = "Veeam_logo_new.png"
35+
"VB365_LOGO_Footer" = "verified_recoverability.png"
36+
"VB365_Repository" = "VBO_Repository.png"
37+
"VB365_Windows_Repository" = "Windows_Repository.png"
38+
"VB365_Object_Repository" = "Object_Storage.png"
39+
"VB365_Object_Support" = "Object Storage support.png"
40+
"Veeam_Repository" = "Veeam_Repository.png"
41+
"VB365_On_Premises" = "SMB.png"
42+
"VB365_Microsoft_365" = "Cloud.png"
43+
"Microsoft_365" = "Microsoft_365.png"
44+
"Datacenter" = "Datacenter.png"
45+
"VB365_Restore_Portal" = "Web_console.png"
46+
"VB365_User_Group" = "User_Group.png"
47+
"VB365_User" = "User.png"
48+
"VBR365_Amazon_S3_Compatible" = "S3-compatible.png"
49+
"VBR365_Amazon_S3" = "AWS S3.png"
50+
"VBR365_Azure_Blob" = "Azure Blob.png"
51+
}
52+
53+
$RootPath = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
54+
[System.IO.FileInfo]$IconPath = Join-Path $RootPath 'icons'
55+
56+
$DiagramParams = @{
57+
'FileName' = "AsBuiltReport.Veeam.VB365"
58+
'OutputFolderPath' = $OutputFolderPath
59+
'Direction' = 'top-to-bottom'
60+
'MainDiagramLabel' = 'Backup for Microsoft 365'
61+
'MainDiagramLabelFontsize' = 28
62+
'MainDiagramLabelFontcolor' = '#565656'
63+
'MainDiagramLabelFontname' = 'Segoe UI Black'
64+
'IconPath' = $IconPath
65+
'ImagesObj' = $Images
66+
'LogoName' = 'VBR_LOGO'
67+
'SignatureLogoName' = 'VB365_LOGO_Footer'
68+
'WaterMarkText' = $Options.DiagramWaterMark
69+
}
70+
71+
if ($Options.DiagramTheme -eq 'Black') {
72+
$DiagramParams.add('MainGraphBGColor', 'Black')
73+
$DiagramParams.add('Edgecolor', 'White')
74+
$DiagramParams.add('Fontcolor', 'White')
75+
$DiagramParams.add('NodeFontcolor', 'White')
76+
$DiagramParams.add('WaterMarkColor', 'White')
77+
} elseif ($Options.DiagramTheme -eq 'Neon') {
78+
$DiagramParams.add('MainGraphBGColor', 'grey14')
79+
$DiagramParams.add('Edgecolor', 'gold2')
80+
$DiagramParams.add('Fontcolor', 'gold2')
81+
$DiagramParams.add('NodeFontcolor', 'gold2')
82+
$DiagramParams.add('WaterMarkColor', '#FFD700')
83+
} else {
84+
$DiagramParams.add('WaterMarkColor', 'DarkGreen')
85+
}
86+
87+
if ($Options.ExportDiagrams) {
88+
if (-Not $Options.ExportDiagramsFormat) {
89+
$DiagramFormat = 'png'
90+
} else {
91+
$DiagramFormat = $Options.ExportDiagramsFormat
92+
}
93+
$DiagramParams.Add('Format', $DiagramFormat)
94+
} else {
95+
$DiagramParams.Add('Format', "base64")
96+
}
97+
98+
if ($Options.EnableDiagramDebug) {
99+
100+
$DiagramParams.Add('EnableEdgeDebug', $True)
101+
$DiagramParams.Add('EnableSubGraphDebug', $True)
102+
103+
}
104+
105+
if ($Options.EnableDiagramSignature) {
106+
$DiagramParams.Add('Signature', $True)
107+
$DiagramParams.Add('AuthorName', $Options.SignatureAuthorName)
108+
$DiagramParams.Add('CompanyName', $Options.SignatureCompanyName)
109+
}
110+
111+
if ($Options.ExportDiagrams) {
112+
Try {
113+
Write-PScriboMessage -Message "Generating Veeam Infrastructure diagram"
114+
$Graph = Get-AbrVb365Diagram
115+
if ($Graph) {
116+
Write-PScriboMessage -Message "Saving Veeam Infrastructure diagram"
117+
$Diagram = New-Diagrammer @DiagramParams -InputObject $Graph
118+
if ($Diagram) {
119+
foreach ($OutputFormat in $DiagramFormat) {
120+
Write-Information -MessageData "Saved 'AsBuiltReport.Veeam.VB365.$($OutputFormat)' diagram to '$($OutputFolderPath)'." -InformationAction Continue
121+
}
122+
}
123+
}
124+
} Catch {
125+
Write-PScriboMessage -IsWarning -Message "Unable to export the Infrastructure Diagram: $($_.Exception.Message)"
126+
}
127+
}
128+
try {
129+
$DiagramParams.Remove('Format')
130+
$DiagramParams.Add('Format', "base64")
131+
132+
$Graph = Get-AbrVb365Diagram
133+
$Diagram = New-Diagrammer @DiagramParams -InputObject $Graph
134+
if ($Diagram) {
135+
If ((Get-DiaImagePercent -GraphObj $Diagram).Width -gt 1500) { $ImagePrty = 20 } else { $ImagePrty = 50 }
136+
Section -Style Heading1 "Infrastructure Diagram." -Orientation Landscape {
137+
Image -Base64 $Diagram -Text "Veeam Backup for Microsoft 365 Diagram" -Percent $ImagePrty -Align Center
138+
Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2
139+
}
140+
}
141+
} catch {
142+
Write-PScriboMessage -IsWarning -Message "Unable to generate the Infrastructure Diagram: $($_.Exception.Message)"
143+
}
144+
}
145+
}
146+
147+
end {}
148+
}

Src/Private/Get-AbrVb365BackupCopyJob.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrVb365BackupCopyJob {
55
.DESCRIPTION
66
Documents the configuration of Veeam VB365 in Word/HTML/Text formats using PScribo.
77
.NOTES
8-
Version: 0.3.8
8+
Version: 0.3.11
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -19,14 +19,14 @@ function Get-AbrVb365BackupCopyJob {
1919
)
2020

2121
begin {
22-
Write-PScriboMessage "BackupCopyJob InfoLevel set at $($InfoLevel.Jobs.BackupCopyJob)."
22+
Write-PScriboMessage -Message "BackupCopyJob InfoLevel set at $($InfoLevel.Jobs.BackupCopyJob)."
2323
}
2424

2525
process {
2626
try {
2727
$BackupCopyJobs = Get-VBOCopyJob | Sort-Object -Property Name
2828
if (($InfoLevel.Jobs.BackupCopyJob -gt 0) -and ($BackupCopyJobs)) {
29-
Write-PScriboMessage "Collecting Veeam VB365 Backup Copy Jobs."
29+
Write-PScriboMessage -Message "Collecting Veeam VB365 Backup Copy Jobs."
3030
Section -Style Heading3 'Backup Copy Jobs' {
3131
$BackupCopyJobInfo = @()
3232
foreach ($BackupCopyJob in $BackupCopyJobs) {
@@ -71,7 +71,7 @@ function Get-AbrVb365BackupCopyJob {
7171
$chartFileItem = Get-ColumnChart -Status -SampleData $sampleDataObj -ChartName 'RestoreSessions' -XField 'Category' -YField 'Value' -ChartAreaName 'BackupJobs' -AxisXTitle 'Status' -AxisYTitle 'Count' -ChartTitleName 'BackupJob' -ChartTitleText 'Backup Copy Jobs Latest Results'
7272

7373
} catch {
74-
Write-PScriboMessage -IsWarning "Backup Copy Chart Section: $($_.Exception.Message)"
74+
Write-PScriboMessage -IsWarning -Message "Backup Copy Chart Section: $($_.Exception.Message)"
7575
}
7676

7777
if ($InfoLevel.Jobs.BackupCopyJob -ge 2) {
@@ -112,7 +112,7 @@ function Get-AbrVb365BackupCopyJob {
112112
}
113113
}
114114
} catch {
115-
Write-PScriboMessage -IsWarning "Backup Copy Jobs Section: $($_.Exception.Message)"
115+
Write-PScriboMessage -IsWarning -Message "Backup Copy Jobs Section: $($_.Exception.Message)"
116116
}
117117
}
118118

Src/Private/Get-AbrVb365BackupJob.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ function Get-AbrVb365BackupJob {
44
Used by As Built Report to retrieve Veeam VB365 Backup Jobs
55
.DESCRIPTION
66
Documents the configuration of Veeam VB365 in Word/HTML/Text formats using PScribo.
7-
.NOTES
8-
Version: 0.3.8
7+
.NOTE
8+
Version: 0.3.11
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -19,14 +19,14 @@ function Get-AbrVb365BackupJob {
1919
)
2020

2121
begin {
22-
Write-PScriboMessage "BackupJob InfoLevel set at $($InfoLevel.Jobs.BackupJob)."
22+
Write-PScriboMessage -Message "BackupJob InfoLevel set at $($InfoLevel.Jobs.BackupJob)."
2323
}
2424

2525
process {
2626
try {
2727
$BackupJobs = Get-VBOJob | Sort-Object -Property Name
2828
if (($InfoLevel.Jobs.BackupJob -gt 0) -and ($BackupJobs)) {
29-
Write-PScriboMessage "Collecting Veeam VB365 Backup Jobs."
29+
Write-PScriboMessage -Message "Collecting Veeam VB365 Backup Jobs."
3030
Section -Style Heading2 'Backup Jobs' {
3131
$BackupJobInfo = @()
3232
foreach ($BackupJob in $BackupJobs) {
@@ -89,7 +89,7 @@ function Get-AbrVb365BackupJob {
8989
$chartFileItem = Get-ColumnChart -Status -SampleData $sampleDataObj -ChartName 'RestoreSessions' -XField 'Category' -YField 'Value' -ChartAreaName 'BackupJobs' -AxisXTitle 'Status' -AxisYTitle 'Count' -ChartTitleName 'BackupJob' -ChartTitleText 'Backup Jobs Latest Results'
9090

9191
} catch {
92-
Write-PScriboMessage -IsWarning "Backup Copy Chart Section: $($_.Exception.Message)"
92+
Write-PScriboMessage -IsWarning -Message "Backup Copy Chart Section: $($_.Exception.Message)"
9393
}
9494

9595
if ($InfoLevel.Jobs.BackupJob -ge 2) {
@@ -134,7 +134,7 @@ function Get-AbrVb365BackupJob {
134134
}
135135
}
136136
} catch {
137-
Write-PScriboMessage -IsWarning "Backup Copy Section: $($_.Exception.Message)"
137+
Write-PScriboMessage -IsWarning -Message "Backup Copy Section: $($_.Exception.Message)"
138138
}
139139
}
140140

Src/Private/Get-AbrVb365BackupRepository.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrVB365BackupRepository {
55
.DESCRIPTION
66
Documents the configuration of Veeam VB365 in Word/HTML/Text formats using PScribo.
77
.NOTES
8-
Version: 0.3.8
8+
Version: 0.3.11
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -19,14 +19,14 @@ function Get-AbrVB365BackupRepository {
1919
)
2020

2121
begin {
22-
Write-PScriboMessage "Repository InfoLevel set at $($InfoLevel.Infrastructure.Repository)."
22+
Write-PScriboMessage -Message "Repository InfoLevel set at $($InfoLevel.Infrastructure.Repository)."
2323
}
2424

2525
process {
2626
try {
2727
$script:Repositories = Get-VBORepository | Sort-Object -Property Name
2828
if (($InfoLevel.Infrastructure.Repository -gt 0) -and ($Repositories)) {
29-
Write-PScriboMessage "Collecting Veeam VB365 Backup Repository."
29+
Write-PScriboMessage -Message "Collecting Veeam VB365 Backup Repository."
3030
Section -Style Heading2 'Backup Repositories' {
3131
$RepositoryInfo = @()
3232
foreach ($Repository in $Repositories) {
@@ -136,7 +136,7 @@ function Get-AbrVB365BackupRepository {
136136
}
137137
}
138138
} catch {
139-
Write-PScriboMessage -IsWarning "Repository Section: $($_.Exception.Message)"
139+
Write-PScriboMessage -IsWarning -Message "Repository Section: $($_.Exception.Message)"
140140
}
141141
}
142142

0 commit comments

Comments
 (0)