From 36f82b5279d25c90e6a2d8d939600053ffb6a178 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Sun, 1 Dec 2024 21:24:04 -0400 Subject: [PATCH 01/13] Fix #186: The diagram is begin saved in the PSScritpRoot, not in the specified output folder. --- Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 index faf32d9..738d562 100644 --- a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 @@ -500,7 +500,7 @@ function Invoke-AsBuiltReport.Veeam.VBR { $DiagramFormat = $Options.ExportDiagramsFormat } $DiagramParams = @{ - 'OutputFolderPath' = (Get-Location).Path + 'OutputFolderPath' = $OutputFolderPath 'Credential' = $Credential 'Target' = $System 'Direction' = 'top-to-bottom' @@ -525,7 +525,7 @@ function Invoke-AsBuiltReport.Veeam.VBR { foreach ($Format in $DiagramFormat) { $Graph = New-VeeamDiagram @DiagramParams -Format $Format -Filename "AsBuiltReport.Veeam.VBR.$($Format)" if ($Graph) { - Write-Information "Saved 'AsBuiltReport.Veeam.VBR.$($Format)' diagram to '$((Get-Location).Path)\'." -InformationAction Continue + Write-Information "Saved 'AsBuiltReport.Veeam.VBR.$($Format)' diagram to '$($OutputFolderPath)'." -InformationAction Continue } } } catch { From b491862a07dae502c2751d0a6054831c716bb5ba Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Sun, 1 Dec 2024 21:40:04 -0400 Subject: [PATCH 02/13] 0.8.13 --- AsBuiltReport.Veeam.VBR.psd1 | 4 ++-- CHANGELOG.md | 7 +++++++ Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/AsBuiltReport.Veeam.VBR.psd1 b/AsBuiltReport.Veeam.VBR.psd1 index 0c2f3cd..1fdc261 100644 --- a/AsBuiltReport.Veeam.VBR.psd1 +++ b/AsBuiltReport.Veeam.VBR.psd1 @@ -12,7 +12,7 @@ RootModule = 'AsBuiltReport.Veeam.VBR.psm1' # Version number of this module. - ModuleVersion = '0.8.12' + ModuleVersion = '0.8.13' # Supported PSEditions # CompatiblePSEditions = @() @@ -55,7 +55,7 @@ RequiredModules = @( @{ ModuleName = 'AsBuiltReport.Core'; - ModuleVersion = '1.4.0' + ModuleVersion = '1.4.1' } @{ ModuleName = 'PScriboCharts'; diff --git a/CHANGELOG.md b/CHANGELOG.md index 98635d6..a6bb0f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ##### This project is community maintained and has no sponsorship from Veeam, its employees or any of its affiliates. +## [0.8.13] - Unreleased + +### Changed + +- Change the infrastructure diagram default save location to $OutputFolderPath +- Increase AsBuiltReport.Core to v1.4.1 + ## [0.8.12] - 2024-11-22 ### Changed diff --git a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 index 738d562..fa06acf 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.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux From 6f283b96650144ecddec79ff6a53cbff731e7847 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Mon, 2 Dec 2024 12:26:09 -0400 Subject: [PATCH 03/13] v0.8.13 --- AsBuiltReport.Veeam.VBR.psd1 | 2 +- CHANGELOG.md | 5 +++++ Src/Private/Get-AbrVbrConfigurationBackupSetting.ps1 | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/AsBuiltReport.Veeam.VBR.psd1 b/AsBuiltReport.Veeam.VBR.psd1 index 1fdc261..c3508d9 100644 --- a/AsBuiltReport.Veeam.VBR.psd1 +++ b/AsBuiltReport.Veeam.VBR.psd1 @@ -67,7 +67,7 @@ } @{ ModuleName = 'Veeam.Diagrammer'; - ModuleVersion = '0.6.16' + ModuleVersion = '0.6.17' } ) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6bb0f6..4929d98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,9 +11,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Increase Veeam.Diagrammer minimum requirement to v0.6.17 - Change the infrastructure diagram default save location to $OutputFolderPath - Increase AsBuiltReport.Core to v1.4.1 +### Fixed + +- Fix error "A positional parameter cannot be found that accepts argument '-'" at Get-AbrVbrConfigurationBackupSetting cmdlet + ## [0.8.12] - 2024-11-22 ### Changed diff --git a/Src/Private/Get-AbrVbrConfigurationBackupSetting.ps1 b/Src/Private/Get-AbrVbrConfigurationBackupSetting.ps1 index 00763a8..cb69071 100644 --- a/Src/Private/Get-AbrVbrConfigurationBackupSetting.ps1 +++ b/Src/Private/Get-AbrVbrConfigurationBackupSetting.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrConfigurationBackupSetting { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -83,14 +83,14 @@ function Get-AbrVbrConfigurationBackupSetting { BlankLine if ($OutObj | Where-Object { $_.'Encryption Enabled' -like 'No' } ) { Paragraph { - Text "Best Practice:" - Bold + Text "Best Practice:" -Bold Text "Whenever possible, enable configuration backup encryption." } BlankLine } if ($OutObj | Where-Object { $_.'Run Job Automatically' -like 'No' }) { Paragraph { - Text "Best Practice:" - Bold + Text "Best Practice:" -Bold Text "It's a recommended best practice to activate the 'Run job automatically' option of the Backup Configuration job." } BlankLine From a29fdb3b867a69123f4951c9b2084e3b3c613879 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Mon, 2 Dec 2024 23:07:06 -0400 Subject: [PATCH 04/13] Fix ConvertTo-HashToYN cmdlet not generating an ordereddictionary output --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4929d98..b08a212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fix error "A positional parameter cannot be found that accepts argument '-'" at Get-AbrVbrConfigurationBackupSetting cmdlet +- Fix ConvertTo-HashToYN cmdlet not generating an ordereddictionary output ## [0.8.12] - 2024-11-22 From bd778e9cf1629cb7d11fcfc3a109d34c1d3e4e8b Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Tue, 3 Dec 2024 09:45:04 -0400 Subject: [PATCH 05/13] Fix ConvertTo-HashToYN cmdlet not generating an ordereddictionary output --- Src/Private/SharedUtilsFunctions.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Src/Private/SharedUtilsFunctions.ps1 b/Src/Private/SharedUtilsFunctions.ps1 index 0825204..d92f09e 100644 --- a/Src/Private/SharedUtilsFunctions.ps1 +++ b/Src/Private/SharedUtilsFunctions.ps1 @@ -969,7 +969,7 @@ function ConvertTo-HashToYN { .DESCRIPTION .NOTES - Version: 0.1.0 + Version: 0.2.0 Author: Jonathan Colon .EXAMPLE @@ -978,15 +978,15 @@ function ConvertTo-HashToYN { #> [CmdletBinding()] - [OutputType([Hashtable])] + [OutputType([System.Collections.Specialized.OrderedDictionary])] Param ( [Parameter (Position = 0, Mandatory)] [AllowEmptyString()] - [Hashtable] $TEXT + [System.Collections.Specialized.OrderedDictionary] $TEXT ) $result = [ordered] @{} - foreach ($i in $inObj.GetEnumerator()) { + foreach ($i in $TEXT.GetEnumerator()) { try { $result.add($i.Key, (ConvertTo-TextYN $i.Value)) } catch { From f6f6215d3e3cb37fb22dc3cb5558f543bf2526aa Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Sat, 7 Dec 2024 19:27:00 -0400 Subject: [PATCH 06/13] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 643b38f..6860a18 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -21,6 +21,7 @@ body: label: Veeam Backup & Replication version options: - vNEXT + - 12.3 - 12.2 - 12.1 - 12 From 70426701c88316c333b6545357baa0776f5622ca Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Sat, 7 Dec 2024 19:27:16 -0400 Subject: [PATCH 07/13] Update change_request.yml --- .github/ISSUE_TEMPLATE/change_request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/change_request.yml b/.github/ISSUE_TEMPLATE/change_request.yml index 055dd17..747216c 100644 --- a/.github/ISSUE_TEMPLATE/change_request.yml +++ b/.github/ISSUE_TEMPLATE/change_request.yml @@ -21,6 +21,7 @@ body: label: Veeam Backup & Replication version options: - vNEXT + - 12.3 - 12.2 - 12.1 - 12 From ebcc2036275bfe20f7ce392dcd22ad4668923886 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Mon, 9 Dec 2024 11:38:54 -0400 Subject: [PATCH 08/13] v0.8.13 --- AsBuiltreport.Veeam.VBR.json | 4 +- CHANGELOG.md | 5 + README.md | 2 + Src/Private/Get-AbrVbrAgentBackupjobConf.ps1 | 5 +- Src/Private/Get-AbrVbrBackupServerInfo.ps1 | 9 +- Src/Private/Get-AbrVbrCloudConnectCG.ps1 | 7 +- Src/Private/Get-AbrVbrCloudConnectGP.ps1 | 7 +- Src/Private/Get-AbrVbrCloudConnectTenant.ps1 | 7 +- Src/Private/Get-AbrVbrEntraIDBackupjob.ps1 | 67 ++++ .../Get-AbrVbrEntraIDBackupjobConf.ps1 | 326 ++++++++++++++++++ Src/Private/Get-AbrVbrEntraIDTenant.ps1 | 85 +++++ Src/Private/Get-AbrVbrFileSharesInfo.ps1 | 4 +- Src/Private/Get-AbrVbrReplFailoverPlan.ps1 | 9 +- Src/Private/Get-AbrVbrReplReplica.ps1 | 6 +- Src/Private/Get-AbrVbrTapeMediaPool.ps1 | 5 +- Src/Private/Get-AbrVbrTapeServer.ps1 | 7 +- Src/Private/Get-AbrVbrTapeVault.ps1 | 7 +- .../Get-AbrVbrUnstructuredDataInfo.ps1 | 4 +- .../Get-AbrVbrVirtualInfrastructure.ps1 | 6 +- Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 | 29 +- 20 files changed, 547 insertions(+), 54 deletions(-) create mode 100644 Src/Private/Get-AbrVbrEntraIDBackupjob.ps1 create mode 100644 Src/Private/Get-AbrVbrEntraIDBackupjobConf.ps1 create mode 100644 Src/Private/Get-AbrVbrEntraIDTenant.ps1 diff --git a/AsBuiltreport.Veeam.VBR.json b/AsBuiltreport.Veeam.VBR.json index 0d150c5..ced2013 100644 --- a/AsBuiltreport.Veeam.VBR.json +++ b/AsBuiltreport.Veeam.VBR.json @@ -48,7 +48,8 @@ "Inventory": { "FileShare": 1, "PHY": 1, - "VI": 1 + "VI": 1, + "EntraID": 1 }, "Storage": { "ISILON": 1, @@ -71,6 +72,7 @@ "Agent": 1, "Backup": 1, "BackupCopy": 1, + "EntraID": 3, "FileShare": 1, "Surebackup": 1, "Replication": 1, diff --git a/CHANGELOG.md b/CHANGELOG.md index b08a212..1f2d283 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.8.13] - Unreleased +### Added + +- Add EntraID Tenant configuration + - Add Objects Backup Job information + ### Changed - Increase Veeam.Diagrammer minimum requirement to v0.6.17 diff --git a/README.md b/README.md index 11b37a1..593bc81 100644 --- a/README.md +++ b/README.md @@ -212,6 +212,7 @@ The table below outlines the default and maximum **InfoLevel** settings for each | VI | 1 | 1 | | PHY | 1 | 2 | | FileShare | 1 | 1 | +| EntraID | 1 | 1 | The table below outlines the default and maximum **InfoLevel** settings for each Storage Infrastructure section. @@ -232,6 +233,7 @@ The table below outlines the default and maximum **InfoLevel** settings for each | FileShare | 1 | 2 | | Replication | 1 | 2 | | Restores | 0 | 1 | +| EntraID | 1 | 2 | The table below outlines the default and maximum **InfoLevel** settings for each Replication section. diff --git a/Src/Private/Get-AbrVbrAgentBackupjobConf.ps1 b/Src/Private/Get-AbrVbrAgentBackupjobConf.ps1 index cbb647a..f3e63be 100644 --- a/Src/Private/Get-AbrVbrAgentBackupjobConf.ps1 +++ b/Src/Private/Get-AbrVbrAgentBackupjobConf.ps1 @@ -56,7 +56,7 @@ function Get-AbrVbrAgentBackupjobConf { $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { - $OutObj | Where-Object { $Null -like $_.'Description' } | Set-Style -Style Warning -Property 'Description' + $OutObj | Where-Object { $_.'Description' -eq "--" } | Set-Style -Style Warning -Property 'Description' $OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description' } @@ -70,8 +70,7 @@ function Get-AbrVbrAgentBackupjobConf { } $OutObj | Table @TableParams if ($HealthCheck.Jobs.BestPractice) { - if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $Null -like $_.'Description' }) { - Paragraph "Health Check:" -Bold -Underline + if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '--' }) { Paragraph "Health Check:" -Bold -Underline BlankLine Paragraph { Text "Best Practice:" -Bold diff --git a/Src/Private/Get-AbrVbrBackupServerInfo.ps1 b/Src/Private/Get-AbrVbrBackupServerInfo.ps1 index 5fae871..b5f785b 100644 --- a/Src/Private/Get-AbrVbrBackupServerInfo.ps1 +++ b/Src/Private/Get-AbrVbrBackupServerInfo.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrBackupServerInfo { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -425,6 +425,12 @@ function Get-AbrVbrBackupServerInfo { "ProviderCredentialsId" = "" "ProviderInfo" = "" "ProviderId" = "" + "EntraIdSqlHostName" = "localhost" + "EntraIdSqlHostPort" = "5432" + "EntraIdSqlPassword" = "" + "EntraIdSqlServiceName" = "postgresql-x64-15" + "EntraIdSqlUserName" = "postgres" + "HighestDetectedVMCVersion" = "" } if ($VeeamInfo) { $OutObj = @() @@ -444,7 +450,6 @@ function Get-AbrVbrBackupServerInfo { 0 { '--' } 1 { $Registry.Value } default { $Registry.Value -Join ', ' } - } } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) diff --git a/Src/Private/Get-AbrVbrCloudConnectCG.ps1 b/Src/Private/Get-AbrVbrCloudConnectCG.ps1 index 4f2efa6..a36ff19 100644 --- a/Src/Private/Get-AbrVbrCloudConnectCG.ps1 +++ b/Src/Private/Get-AbrVbrCloudConnectCG.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrCloudConnectCG { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -66,7 +66,7 @@ function Get-AbrVbrCloudConnectCG { $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { - $OutObj | Where-Object { $Null -like $_.'Description' } | Set-Style -Style Warning -Property 'Description' + $OutObj | Where-Object { $_.'Description' -eq "--" } | Set-Style -Style Warning -Property 'Description' $OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description' } @@ -81,8 +81,7 @@ function Get-AbrVbrCloudConnectCG { } $OutObj | Sort-Object -Property 'Name' | Table @TableParams if ($HealthCheck.Jobs.BestPractice) { - if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $Null -like $_.'Description' }) { - Paragraph "Health Check:" -Bold -Underline + if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '--' }) { Paragraph "Health Check:" -Bold -Underline BlankLine Paragraph { Text "Best Practice:" -Bold diff --git a/Src/Private/Get-AbrVbrCloudConnectGP.ps1 b/Src/Private/Get-AbrVbrCloudConnectGP.ps1 index 5114e0b..4c76769 100644 --- a/Src/Private/Get-AbrVbrCloudConnectGP.ps1 +++ b/Src/Private/Get-AbrVbrCloudConnectGP.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrCloudConnectGP { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -50,7 +50,7 @@ function Get-AbrVbrCloudConnectGP { } if ($HealthCheck.Jobs.BestPractice) { - $OutObj | Where-Object { $Null -like $_.'Description' } | Set-Style -Style Warning -Property 'Description' + $OutObj | Where-Object { $_.'Description' -eq "--" } | Set-Style -Style Warning -Property 'Description' $OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description' } @@ -65,8 +65,7 @@ function Get-AbrVbrCloudConnectGP { } $OutObj | Sort-Object -Property 'Name' | Table @TableParams if ($HealthCheck.Jobs.BestPractice) { - if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $Null -like $_.'Description' }) { - Paragraph "Health Check:" -Bold -Underline + if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '--' }) { Paragraph "Health Check:" -Bold -Underline BlankLine Paragraph { Text "Best Practice:" -Bold diff --git a/Src/Private/Get-AbrVbrCloudConnectTenant.ps1 b/Src/Private/Get-AbrVbrCloudConnectTenant.ps1 index 23f14dd..c5b0cbc 100644 --- a/Src/Private/Get-AbrVbrCloudConnectTenant.ps1 +++ b/Src/Private/Get-AbrVbrCloudConnectTenant.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrCloudConnectTenant { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -134,7 +134,7 @@ function Get-AbrVbrCloudConnectTenant { $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.CloudConnect.BestPractice) { - $OutObj | Where-Object { $Null -like $_.'Description' } | Set-Style -Style Warning -Property 'Description' + $OutObj | Where-Object { $_.'Description' -eq "--" } | Set-Style -Style Warning -Property 'Description' $OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description' $OutObj | Where-Object { $_.'Expiration Date' -match '(Expired)' } | Set-Style -Style Warning -Property 'Expiration Date' } @@ -150,8 +150,7 @@ function Get-AbrVbrCloudConnectTenant { } $OutObj | Sort-Object -Property 'Name' | Table @TableParams if ($HealthCheck.Jobs.BestPractice) { - if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $Null -like $_.'Description' }) { - Paragraph "Health Check:" -Bold -Underline + if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '--' }) { Paragraph "Health Check:" -Bold -Underline BlankLine Paragraph { Text "Best Practice:" -Bold diff --git a/Src/Private/Get-AbrVbrEntraIDBackupjob.ps1 b/Src/Private/Get-AbrVbrEntraIDBackupjob.ps1 new file mode 100644 index 0000000..52d38b6 --- /dev/null +++ b/Src/Private/Get-AbrVbrEntraIDBackupjob.ps1 @@ -0,0 +1,67 @@ + +function Get-AbrVbrEntraIDBackupjob { + <# + .SYNOPSIS + Used by As Built Report to returns entraid jobs created in Veeam Backup & Replication. + .DESCRIPTION + Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. + .NOTES + Version: 0.8.13 + Author: Jonathan Colon + Twitter: @jcolonfzenpr + Github: rebelinux + Credits: Iain Brighton (@iainbrighton) - PScribo module + + .LINK + https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR + #> + [CmdletBinding()] + param ( + + ) + + begin { + Write-PScriboMessage "Discovering Veeam VBR EntraID Tenant Backup jobs information from $System." + } + + process { + try { + if ($Bkjobs = Get-VBREntraIDTenantBackupJob | Sort-Object -Property 'Name') { + Section -Style Heading3 'EntraID Tenant Backup Jobs' { + Paragraph "The following section list entraid tenant jobs created in Veeam Backup & Replication." + BlankLine + $OutObj = @() + foreach ($Bkjob in $Bkjobs) { + try { + Write-PScriboMessage "Discovered $($Bkjob.Name) Backup Job." + $inObj = [ordered] @{ + 'Name' = $Bkjob.Name + 'Tenant' = $Bkjob.Tenant.Name + 'Schedule Status' = Switch ($Bkjob.EnableSchedule) { + 'False' { 'Not Scheduled' } + 'True' { 'Scheduled' } + } + } + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) + } catch { + Write-PScriboMessage -IsWarning "EntraID Tenant Backup Jobs $($SBkjob.Name) Section: $($_.Exception.Message)" + } + } + + $TableParams = @{ + Name = "EntraID Tenant Backup Jobs - $VeeamBackupServer" + List = $false + ColumnWidths = 40, 40, 20 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Sort-Object -Property 'Tenant' | Table @TableParams + } + } + } catch { + Write-PScriboMessage -IsWarning "EntraID Tenant Backup Jobs Section: $($_.Exception.Message)" + } + } + end {} +} \ No newline at end of file diff --git a/Src/Private/Get-AbrVbrEntraIDBackupjobConf.ps1 b/Src/Private/Get-AbrVbrEntraIDBackupjobConf.ps1 new file mode 100644 index 0000000..e4ae6a1 --- /dev/null +++ b/Src/Private/Get-AbrVbrEntraIDBackupjobConf.ps1 @@ -0,0 +1,326 @@ + +function Get-AbrVbrEntraIDBackupjobConf { + <# + .SYNOPSIS + Used by As Built Report to returns entraid jobs created in Veeam Backup & Replication. + .DESCRIPTION + Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. + .NOTES + Version: 0.8.13 + Author: Jonathan Colon + Twitter: @jcolonfzenpr + Github: rebelinux + Credits: Iain Brighton (@iainbrighton) - PScribo module + + .LINK + https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR + #> + [CmdletBinding()] + param ( + + ) + + begin { + Write-PScriboMessage "Discovering Veeam VBR EntraID Tenant Backup jobs information from $System." + } + + process { + try { + if ($Bkjobs = Get-VBREntraIDTenantBackupJob | Sort-Object -Property 'Name') { + Section -Style Heading3 'EntraID Tenant Backup Jobs Configuration' { + Paragraph "The following section details the configuration of backup copy jobs." + BlankLine + $OutObj = @() + foreach ($Bkjob in $Bkjobs) { + try { + Section -Style Heading4 $($Bkjob.Name) { + Section -Style NOTOCHeading4 -ExcludeFromTOC 'Common Information' { + $OutObj = @() + try { + try { + Write-PScriboMessage "Discovered $($Bkjob.Name) common information." + $inObj = [ordered] @{ + 'Name' = $Bkjob.Name + 'Id' = $Bkjob.Id + 'Next Run' = $Bkjob.ScheduleOptions.NextRun + 'Description' = $Bkjob.Description + } + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message + } + + if ($HealthCheck.Jobs.BestPractice) { + $OutObj | Where-Object { $Null -like $_.'Description' -or $_.'Description' -eq "--" } | Set-Style -Style Warning -Property 'Description' + $OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description' + } + + $TableParams = @{ + Name = "Common Information - $($Bkjob.Name)" + List = $true + ColumnWidths = 40, 60 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Table @TableParams + if ($HealthCheck.Jobs.BestPractice) { + if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '--' }) { + Paragraph "Health Check:" -Bold -Underline + BlankLine + Paragraph { + Text "Best Practice:" -Bold + Text "It is a general rule of good practice to establish well-defined descriptions. This helps to speed up the fault identification process, as well as enabling better documentation of the environment." + } + BlankLine + } + } + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message + } + } + Section -Style NOTOCHeading4 -ExcludeFromTOC 'Tenant' { + $OutObj = @() + try { + Write-PScriboMessage "Discovered $($Bkjob.Tenant.Name) EntraID Tenant." + $inObj = [ordered] @{ + 'Name' = $Bkjob.Tenant.Name + 'Azure Tenant Id' = $Bkjob.Tenant.AzureTenantId + 'Application Id' = $Bkjob.Tenant.ApplicationId + 'Region' = $Bkjob.Tenant.Region + 'Cache Repository' = $Bkjob.Tenant.CacheRepository.Name + 'Retention Policy' = "$($Bkjob.RetentionPolicy) days" + 'Description' = $Bkjob.Tenant.Description + } + + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) + } catch { + Write-PScriboMessage -IsWarning "Entra ID Tenant Section: $($_.Exception.Message)" + } + + if ($HealthCheck.Jobs.BestPractice) { + $OutObj | Where-Object { $_.'Description' -eq "--" } | Set-Style -Style Warning -Property 'Description' + $OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description' + } + + $TableParams = @{ + Name = "Tenant Information - $($Bkjob.Name)" + List = $True + ColumnWidths = 40, 60 + } + + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Sort-Object -Property 'Name' | Table @TableParams + if ($HealthCheck.Jobs.BestPractice) { + if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '--' }) { + Paragraph "Health Check:" -Bold -Underline + BlankLine + Paragraph { + Text "Best Practice:" -Bold + Text "It is a general rule of good practice to establish well-defined descriptions. This helps to speed up the fault identification process, as well as enabling better documentation of the environment." + } + BlankLine + } + } + if ($InfoLevel.Jobs.EntraID -ge 2) { + Section -Style NOTOCHeading5 -ExcludeFromTOC 'Advanced Settings (Encryption)' { + $OutObj = @() + try { + Write-PScriboMessage "Discovered $($Bkjob.Tenant.Name) EntraID Encryption." + $inObj = [ordered] @{ + 'Enabled' = $Bkjob.EncryptionOptions.Enabled + 'Id' = $Bkjob.EncryptionOptions.key.Id + 'Last Modified Date' = $Bkjob.EncryptionOptions.key.LastModifiedDate + 'Description' = $Bkjob.EncryptionOptions.key.Description + } + + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) + } catch { + Write-PScriboMessage -IsWarning "Entra ID Encryption Section: $($_.Exception.Message)" + } + + if ($HealthCheck.Jobs.BestPractice) { + $OutObj | Where-Object { $_.'Enabled' -eq "No" } | Set-Style -Style Warning -Property 'Enabled' + } + + $TableParams = @{ + Name = "Encryption - $($Bkjob.Name)" + List = $True + ColumnWidths = 40, 60 + } + + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Table @TableParams + if ($HealthCheck.Jobs.BestPractice) { + if ($OutObj | Where-Object { $_.'Enabled Backup File Encryption' -eq 'No' }) { + Paragraph "Health Check:" -Bold -Underline + BlankLine + Paragraph { + Text "Best Practice:" -Bold + Text "Backup and replica data is a high potential source of vulnerability. To secure data stored in backups and replicas, use Veeam Backup & Replication inbuilt encryption to protect data in backups" + } + BlankLine + } + } + } + } + if ($InfoLevel.Jobs.EntraID -ge 2) { + Section -Style NOTOCHeading5 -ExcludeFromTOC "Advanced Settings (Notification)" { + $OutObj = @() + try { + Write-PScriboMessage "Discovered $($Bkjob.Name) notification options." + $inObj = [ordered] @{ + 'Send Snmp Notification' = $Bkjob.NotificationOptions.EnableSnmpNotification + 'Send Email Notification' = $Bkjob.NotificationOptions.EnableAdditionalNotification + 'Email Notification Additional Addresses' = Switch ($Bkjob.NotificationOptions.AdditionalAddress) { + $Null { '--' } + default { $Bkjob.NotificationOptions.AdditionalAddress } + } + 'Email Notify Time' = $Bkjob.NotificationOptions.SendTime + 'Use Custom Email Notification Options' = $Bkjob.NotificationOptions.UseNotificationOptions + 'Use Custom Notification Setting' = $Bkjob.NotificationOptions.NotificationSubject + 'Notify On Success' = $Bkjob.NotificationOptions.NotifyOnSuccess + 'Notify On Warning' = $Bkjob.NotificationOptions.NotifyOnWarning + 'Notify On Error' = $Bkjob.NotificationOptions.NotifyOnError + 'Send notification' = Switch ($Bkjob.NotificationOptions.EnableDailyNotification) { + 'False' { 'Immediately after each copied backup' } + 'True' { 'Daily as a summary' } + default { 'Unknown' } + } + } + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) + + $TableParams = @{ + Name = "Notification - $($Bkjob.Name)" + List = $true + ColumnWidths = 40, 60 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Table @TableParams + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message + } + } + } + if ($Bkjob.EnableSchedule) { + Section -Style NOTOCHeading5 -ExcludeFromTOC "Schedule" { + $OutObj = @() + try { + Write-PScriboMessage "Discovered $($Bkjob.Name) schedule options." + if ($Bkjob.ScheduleOptions.OptionsDaily.Enabled -eq "True") { + $ScheduleType = "Daily" + $Schedule = "Kind: $($Bkjob.ScheduleOptions.OptionsDaily.Kind),`r`nDays: $($Bkjob.ScheduleOptions.OptionsDaily.DaysSrv)" + } elseif ($Bkjob.ScheduleOptions.OptionsMonthly.Enabled -eq "True") { + $ScheduleType = "Monthly" + $Schedule = "Day Of Month: $($Bkjob.ScheduleOptions.OptionsMonthly.DayOfMonth),`r`nDay Number In Month: $($Bkjob.ScheduleOptions.OptionsMonthly.DayNumberInMonth),`r`nDay Of Week: $($Bkjob.ScheduleOptions.OptionsMonthly.DayOfWeek)" + } elseif ($Bkjob.ScheduleOptions.OptionsPeriodically.Enabled -eq "True") { + $ScheduleType = $Bkjob.ScheduleOptions.OptionsPeriodically.Kind + $Schedule = "Full Period: $($Bkjob.ScheduleOptions.OptionsPeriodically.FullPeriod),`r`nHourly Offset: $($Bkjob.ScheduleOptions.OptionsPeriodically.HourlyOffset),`r`nUnit: $($Bkjob.ScheduleOptions.OptionsPeriodically.Unit)" + } elseif ($Bkjob.ScheduleOptions.OptionsContinuous.Enabled -eq "True") { + $ScheduleType = 'Continuous' + $Schedule = "Schedule Time Period" + } elseif ($Bkjob.ScheduleOptions.OptionsScheduleAfterJob.IsEnabled) { + $ScheduleType = 'After Job' + } + $inObj = [ordered] @{ + 'Retry Failed item' = $Bkjob.ScheduleOptions.RetryTimes + 'Wait before each retry' = "$($Bkjob.ScheduleOptions.RetryTimeout)/min" + 'Backup Window' = $Bkjob.ScheduleOptions.OptionsBackupWindow.IsEnabled + 'Shedule type' = $ScheduleType + 'Shedule Options' = $Schedule + 'Start Time' = $Bkjob.ScheduleOptions.OptionsDaily.TimeLocal.ToShorttimeString() + 'Latest Run' = $Bkjob.ScheduleOptions.LatestRunLocal + } + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) + + $TableParams = @{ + Name = "Schedule Options - $($Bkjob.Name)" + List = $true + ColumnWidths = 40, 60 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Table @TableParams + if ($Bkjob.ScheduleOptions.OptionsBackupWindow.IsEnabled -or $Bkjob.ScheduleOptions.OptionsContinuous.Enabled) { + Section -Style NOTOCHeading6 -ExcludeFromTOC "Backup Window Time Period" { + Paragraph -ScriptBlock $Legend + + $OutObj = @() + try { + $ScheduleTimePeriod = @() + $Days = 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + foreach ($Day in $Days) { + + $Regex = [Regex]::new("(?<=<$Day>)(.*)(?=)") + if ($Bkjob.ScheduleOptions.OptionsPeriodically.Enabled) { + $BackupWindow = $Bkjob.ScheduleOptions.OptionsPeriodically.Schedule + } elseif ($Bkjob.ScheduleOptions.OptionsContinuous.Enabled) { + $BackupWindow = $Bkjob.ScheduleOptions.OptionsContinuous.Schedule + } else { $BackupWindow = $Bkjob.ScheduleOptions.OptionsBackupWindow.BackupWindow } + $Match = $Regex.Match($BackupWindow) + if ($Match.Success) { + $ScheduleTimePeriod += $Match.Value + } + } + + $OutObj = Get-WindowsTimePeriod -InputTimePeriod $ScheduleTimePeriod + + $TableParams = @{ + Name = "Backup Window - $($Bkjob.Name)" + List = $true + ColumnWidths = 6, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 + Key = 'H' + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + if ($OutObj) { + $OutObj2 = Table -Hashtable $OutObj @TableParams + $OutObj2.Rows | Where-Object { $_.Sun -eq "0" } | Set-Style -Style ON -Property "Sun" + $OutObj2.Rows | Where-Object { $_.Mon -eq "0" } | Set-Style -Style ON -Property "Mon" + $OutObj2.Rows | Where-Object { $_.Tue -eq "0" } | Set-Style -Style ON -Property "Tue" + $OutObj2.Rows | Where-Object { $_.Wed -eq "0" } | Set-Style -Style ON -Property "Wed" + $OutObj2.Rows | Where-Object { $_.Thu -eq "0" } | Set-Style -Style ON -Property "Thu" + $OutObj2.Rows | Where-Object { $_.Fri -eq "0" } | Set-Style -Style ON -Property "Fri" + $OutObj2.Rows | Where-Object { $_.Sat -eq "0" } | Set-Style -Style ON -Property "Sat" + + $OutObj2.Rows | Where-Object { $_.Sun -eq "1" } | Set-Style -Style OFF -Property "Sun" + $OutObj2.Rows | Where-Object { $_.Mon -eq "1" } | Set-Style -Style OFF -Property "Mon" + $OutObj2.Rows | Where-Object { $_.Tue -eq "1" } | Set-Style -Style OFF -Property "Tue" + $OutObj2.Rows | Where-Object { $_.Wed -eq "1" } | Set-Style -Style OFF -Property "Wed" + $OutObj2.Rows | Where-Object { $_.Thu -eq "1" } | Set-Style -Style OFF -Property "Thu" + $OutObj2.Rows | Where-Object { $_.Fri -eq "1" } | Set-Style -Style OFF -Property "Fri" + $OutObj2.Rows | Where-Object { $_.Sat -eq "1" } | Set-Style -Style OFF -Property "Sat" + $OutObj2 + } + } catch { + Write-PScriboMessage -IsWarning "Entra ID Backup Jobs $($Bkjob.Name) Backup Windows Section: $($_.Exception.Message)" + } + } + } + } catch { + Write-PScriboMessage -IsWarning "Entra ID Backup Jobs $($Bkjob.Name) Schedule Section: $($_.Exception.Message)" + } + } + } + } + } + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message + } + } + } + } + } catch { + Write-PScriboMessage -IsWarning "EntraID Tenant Backup Jobs Section: $($_.Exception.Message)" + } + } + end {} +} \ No newline at end of file diff --git a/Src/Private/Get-AbrVbrEntraIDTenant.ps1 b/Src/Private/Get-AbrVbrEntraIDTenant.ps1 new file mode 100644 index 0000000..eaca615 --- /dev/null +++ b/Src/Private/Get-AbrVbrEntraIDTenant.ps1 @@ -0,0 +1,85 @@ + +function Get-AbrVbrEntraIDTenant { + <# + .SYNOPSIS + Used by As Built Report to retrieve Veeam EntraID Information + .DESCRIPTION + Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. + .NOTES + Version: 0.8.13 + Author: Jonathan Colon + Twitter: @jcolonfzenpr + Github: rebelinux + Credits: Iain Brighton (@iainbrighton) - PScribo module + + .LINK + https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR + #> + [CmdletBinding()] + param ( + + ) + + begin { + Write-PScriboMessage "Discovering Veeam VBR EntraID information from $System." + } + + process { + if ($EntraIDObjs = Get-VBREntraIDTenant) { + Section -Style Heading3 'Entra ID Tenant' { + Paragraph "The following table provides a summary about the EntraID information from Veeam Server $VeeamBackupServer." + BlankLine + $OutObj = @() + try { + foreach ($EntraIDObj in $EntraIDObjs) { + try { + Write-PScriboMessage "Discovered $($EntraIDObj.Name) EntraID Tenant." + $inObj = [ordered] @{ + 'Name' = $EntraIDObj.Name + 'Azure Tenant Id' = $EntraIDObj.AzureTenantId + 'Application Id' = $EntraIDObj.ApplicationId + 'Region' = $EntraIDObj.Region + 'Cache Repository' = $EntraIDObj.CacheRepository.Name + 'Description' = $EntraIDObj.Description + } + + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) + } catch { + Write-PScriboMessage -IsWarning "Entra ID Tenant Section: $($_.Exception.Message)" + } + + if ($HealthCheck.Infrastructure.BestPractice) { + $OutObj | Where-Object { $_.'Description' -eq "--" } | Set-Style -Style Warning -Property 'Description' + $OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description' + } + + $TableParams = @{ + Name = "$($EntraIDObj.Name) - $VeeamBackupServer" + List = $True + ColumnWidths = 40, 60 + } + + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Sort-Object -Property 'Name' | Table @TableParams + if ($HealthCheck.Infrastructure.BestPractice) { + if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '--' }) { Paragraph "Health Check:" -Bold -Underline + BlankLine + Paragraph { + Text "Best Practice:" -Bold + Text "It is a general rule of good practice to establish well-defined descriptions. This helps to speed up the fault identification process, as well as enabling better documentation of the environment." + } + BlankLine + } + } + } + } catch { + Write-PScriboMessage -IsWarning "Entra ID Tenant Section: $($_.Exception.Message)" + } + } + } + } + end {} + +} \ No newline at end of file diff --git a/Src/Private/Get-AbrVbrFileSharesInfo.ps1 b/Src/Private/Get-AbrVbrFileSharesInfo.ps1 index ea3b9ef..3b95f12 100644 --- a/Src/Private/Get-AbrVbrFileSharesInfo.ps1 +++ b/Src/Private/Get-AbrVbrFileSharesInfo.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrFileSharesInfo { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -27,7 +27,7 @@ function Get-AbrVbrFileSharesInfo { process { if ($ShareObjs = Get-VBRNASServer -WarningAction SilentlyContinue) { Section -Style Heading3 'File Shares' { - Paragraph "The following table provides a summary about the file shares backed-up by Veeam Server $(((Get-VBRServerSession).Server))." + Paragraph "The following table provides a summary about the file shares backed-up by Veeam Server $VeeamBackupServer." BlankLine $OutObj = @() try { diff --git a/Src/Private/Get-AbrVbrReplFailoverPlan.ps1 b/Src/Private/Get-AbrVbrReplFailoverPlan.ps1 index 12107bf..d4c5d3f 100644 --- a/Src/Private/Get-AbrVbrReplFailoverPlan.ps1 +++ b/Src/Private/Get-AbrVbrReplFailoverPlan.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrReplFailoverPlan { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -27,7 +27,7 @@ function Get-AbrVbrReplFailoverPlan { process { if ($FailOverPlans = Get-VBRFailoverPlan | Sort-Object -Property Name) { Section -Style Heading3 'Failover Plans' { - Paragraph "The following section details failover plan information from Veeam Server $(((Get-VBRServerSession).Server))." + Paragraph "The following section details failover plan information from Veeam Server $VeeamBackupServer." $OutObj = @() foreach ($FailOverPlan in $FailOverPlans) { try { @@ -49,7 +49,7 @@ function Get-AbrVbrReplFailoverPlan { } if ($HealthCheck.Replication.BestPractice) { - $OutObj | Where-Object { $Null -like $_.'Description' } | Set-Style -Style Warning -Property 'Description' + $OutObj | Where-Object { $_.'Description' -eq "--" } | Set-Style -Style Warning -Property 'Description' $OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description' } @@ -63,8 +63,7 @@ function Get-AbrVbrReplFailoverPlan { } $OutObj | Table @TableParams if ($HealthCheck.Replication.BestPractice) { - if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $Null -like $_.'Description' }) { - Paragraph "Health Check:" -Bold -Underline + if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '--' }) { Paragraph "Health Check:" -Bold -Underline BlankLine Paragraph { Text "Best Practice:" -Bold diff --git a/Src/Private/Get-AbrVbrReplReplica.ps1 b/Src/Private/Get-AbrVbrReplReplica.ps1 index af91f4e..8867839 100644 --- a/Src/Private/Get-AbrVbrReplReplica.ps1 +++ b/Src/Private/Get-AbrVbrReplReplica.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrReplReplica { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -29,7 +29,7 @@ function Get-AbrVbrReplReplica { if ($Replicas = Get-VBRReplica | Sort-Object -Property VmName) { if ($InfoLevel.Replication.Replica -eq 1) { Section -Style Heading3 'Replicas' { - Paragraph "The following section details replica information from Veeam Server $(((Get-VBRServerSession).Server))." + Paragraph "The following section details replica information from Veeam Server $VeeamBackupServer." BlankLine $OutObj = @() foreach ($Replica in $Replicas) { @@ -62,7 +62,7 @@ function Get-AbrVbrReplReplica { if ($InfoLevel.Replication.Replica -ge 2) { try { Section -Style Heading3 'Replicas' { - Paragraph "The following section details replica information from Veeam Server $(((Get-VBRServerSession).Server))." + Paragraph "The following section details replica information from Veeam Server $VeeamBackupServer." BlankLine $OutObj = @() foreach ($Replica in $Replicas) { diff --git a/Src/Private/Get-AbrVbrTapeMediaPool.ps1 b/Src/Private/Get-AbrVbrTapeMediaPool.ps1 index 9c77d0f..8983658 100644 --- a/Src/Private/Get-AbrVbrTapeMediaPool.ps1 +++ b/Src/Private/Get-AbrVbrTapeMediaPool.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrTapeMediaPool { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -158,8 +158,7 @@ function Get-AbrVbrTapeMediaPool { } $OutObj | Sort-Object -Property 'Name' | Table @TableParams if ($HealthCheck.Tape.BestPractice) { - if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $Null -like $_.'Description' }) { - Paragraph "Health Check:" -Bold -Underline + if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '--' }) { Paragraph "Health Check:" -Bold -Underline BlankLine Paragraph { Text "Best Practice:" -Bold diff --git a/Src/Private/Get-AbrVbrTapeServer.ps1 b/Src/Private/Get-AbrVbrTapeServer.ps1 index 439f4d8..a2edac5 100644 --- a/Src/Private/Get-AbrVbrTapeServer.ps1 +++ b/Src/Private/Get-AbrVbrTapeServer.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrTapeServer { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -49,7 +49,7 @@ function Get-AbrVbrTapeServer { } if ($HealthCheck.Tape.BestPractice) { - $OutObj | Where-Object { $Null -like $_.'Description' } | Set-Style -Style Warning -Property 'Description' + $OutObj | Where-Object { $_.'Description' -eq "--" } | Set-Style -Style Warning -Property 'Description' $OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description' } @@ -64,8 +64,7 @@ function Get-AbrVbrTapeServer { } $OutObj | Sort-Object -Property 'Name' | Table @TableParams if ($HealthCheck.Tape.BestPractice) { - if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $Null -like $_.'Description' }) { - Paragraph "Health Check:" -Bold -Underline + if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '--' }) { Paragraph "Health Check:" -Bold -Underline BlankLine Paragraph { Text "Best Practice:" -Bold diff --git a/Src/Private/Get-AbrVbrTapeVault.ps1 b/Src/Private/Get-AbrVbrTapeVault.ps1 index 8dde5df..46886c1 100644 --- a/Src/Private/Get-AbrVbrTapeVault.ps1 +++ b/Src/Private/Get-AbrVbrTapeVault.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrTapeVault { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -47,7 +47,7 @@ function Get-AbrVbrTapeVault { } if ($HealthCheck.Tape.BestPractice) { - $OutObj | Where-Object { $Null -like $_.'Description' } | Set-Style -Style Warning -Property 'Description' + $OutObj | Where-Object { $_.'Description' -eq "--" } | Set-Style -Style Warning -Property 'Description' $OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description' } @@ -62,8 +62,7 @@ function Get-AbrVbrTapeVault { } $OutObj | Table @TableParams if ($HealthCheck.Tape.BestPractice) { - if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $Null -like $_.'Description' }) { - Paragraph "Health Check:" -Bold -Underline + if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '--' }) { Paragraph "Health Check:" -Bold -Underline BlankLine Paragraph { Text "Best Practice:" -Bold diff --git a/Src/Private/Get-AbrVbrUnstructuredDataInfo.ps1 b/Src/Private/Get-AbrVbrUnstructuredDataInfo.ps1 index fc50213..328de30 100644 --- a/Src/Private/Get-AbrVbrUnstructuredDataInfo.ps1 +++ b/Src/Private/Get-AbrVbrUnstructuredDataInfo.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrUnstructuredDataInfo { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -27,7 +27,7 @@ function Get-AbrVbrUnstructuredDataInfo { process { if ($ShareObjs = Get-VBRUnstructuredServer) { Section -Style Heading3 'Unstructured Data' { - Paragraph "The following table provides a summary about the unstructured data backed-up by Veeam Server $(((Get-VBRServerSession).Server))." + Paragraph "The following table provides a summary about the unstructured data backed-up by Veeam Server $VeeamBackupServer." $OutObj = @() try { foreach ($ShareObj in $ShareObjs | Where-Object { $_.Type -eq "FileServer" }) { diff --git a/Src/Private/Get-AbrVbrVirtualInfrastructure.ps1 b/Src/Private/Get-AbrVbrVirtualInfrastructure.ps1 index a98ff3e..b2e4d32 100644 --- a/Src/Private/Get-AbrVbrVirtualInfrastructure.ps1 +++ b/Src/Private/Get-AbrVbrVirtualInfrastructure.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrVirtualInfrastructure { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -28,7 +28,7 @@ function Get-AbrVbrVirtualInfrastructure { try { if ($VbrServer = Get-VBRServer) { Section -Style Heading3 'Virtual Infrastructure' { - Paragraph "The following sections detail the configuration about managed virtual servers backed-up by Veeam Server $(((Get-VBRServerSession).Server))." + Paragraph "The following sections detail the configuration about managed virtual servers backed-up by Veeam Server $VeeamBackupServer." BlankLine #---------------------------------------------------------------------------------------------# # VMware vSphere information Section # @@ -36,7 +36,7 @@ function Get-AbrVbrVirtualInfrastructure { try { if ($VbrServer | Where-Object { $_.Type -eq 'VC' -or $_.Type -eq 'ESXi' }) { Section -Style Heading4 'VMware vSphere' { - Paragraph "The following section details information about VMware Virtual Infrastructure backed-up by Veeam Server $(((Get-VBRServerSession).Server))." + Paragraph "The following section details information about VMware Virtual Infrastructure backed-up by Veeam Server $VeeamBackupServer." BlankLine $InventObjs = $VbrServer | Where-Object { $_.Type -eq 'VC' } if ($InventObjs) { diff --git a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 index fa06acf..173436e 100644 --- a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 @@ -24,14 +24,14 @@ 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." break } + Get-AbrVbrRequiredModule -Name 'Veeam.Backup.PowerShell' -Version '1.0' + Write-PScriboMessage -Plugin "Module" -IsWarning "Please refer to the AsBuiltReport.Veeam.VBR github website for more detailed information about this project." Write-PScriboMessage -Plugin "Module" -IsWarning "Do not forget to update your report configuration file after each new version release." Write-PScriboMessage -Plugin "Module" -IsWarning "Documentation: https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR" @@ -109,9 +109,9 @@ function Invoke-AsBuiltReport.Veeam.VBR { Paragraph "The following section details configuration information about the Backup Server: $($VeeamBackupServer)" BlankLine if ($InfoLevel.Infrastructure.BackupServer -ge 1) { - Get-AbrVbrInfrastructureSummary + # Get-AbrVbrInfrastructureSummary if ($VbrVersion -ge 12) { - Get-AbrVbrSecurityCompliance + # Get-AbrVbrSecurityCompliance } Get-AbrVbrBackupServerInfo Get-AbrVbrEnterpriseManagerInfo @@ -294,7 +294,7 @@ function Invoke-AsBuiltReport.Veeam.VBR { if ($InfoLevel.Inventory.PSObject.Properties.Value -ne 0) { if ((Get-VBRServer).count -gt 0) { Section -Style Heading2 'Inventory' { - Paragraph "The following section provides inventory information about the Virtual Infrastructure managed by Veeam Server $(((Get-VBRServerSession).Server))." + Paragraph "The following section provides inventory information about the Virtual Infrastructure managed by Veeam Server $VeeamBackupServer." BlankLine Get-AbrVbrInventorySummary Write-PScriboMessage "Virtual Inventory InfoLevel set at $($InfoLevel.Inventory.VI)." @@ -339,6 +339,10 @@ function Invoke-AsBuiltReport.Veeam.VBR { Get-AbrVbrUnstructuredDataInfo } } + Write-PScriboMessage "EntraID Inventory InfoLevel set at $($InfoLevel.Inventory.EntraID)." + if (($InfoLevel.Inventory.EntraID -ge 1) -and ($VbrVersion -ge 12.3)) { + Get-AbrVbrEntraIDTenant + } } } } @@ -348,7 +352,7 @@ function Invoke-AsBuiltReport.Veeam.VBR { if ($InfoLevel.Storage.PSObject.Properties.Value -ne 0) { if ((Get-NetAppHost).count -gt 0) { Section -Style Heading2 'Storage Infrastructure' { - Paragraph "The following section provides information about the storage infrastructure managed by Veeam Server $(((Get-VBRServerSession).Server))." + Paragraph "The following section provides information about the storage infrastructure managed by Veeam Server $VeeamBackupServer." BlankLine Get-AbrVbrStorageInfraSummary Write-PScriboMessage "NetApp Ontap InfoLevel set at $($InfoLevel.Storage.Ontap)." @@ -368,7 +372,7 @@ function Invoke-AsBuiltReport.Veeam.VBR { if ($InfoLevel.Replication.PSObject.Properties.Value -ne 0) { if ((Get-VBRReplica).count -gt 0 -or ((Get-VBRFailoverPlan).count -gt 0)) { Section -Style Heading2 'Replication' { - Paragraph "The following section provides information about the replications managed by Veeam Server $(((Get-VBRServerSession).Server))." + Paragraph "The following section provides information about the replications managed by Veeam Server $VeeamBackupServer." BlankLine Get-AbrVbrReplInfraSummary Write-PScriboMessage "Replica InfoLevel set at $($InfoLevel.Replication.Replica)." @@ -389,7 +393,7 @@ function Invoke-AsBuiltReport.Veeam.VBR { if ($VbrLicenses | Where-Object { $_.CloudConnect -ne "Disabled" -and $_.Status -ne "Expired" }) { if ((Get-VBRCloudGateway).count -gt 0 -or ((Get-VBRCloudTenant).count -gt 0)) { Section -Style Heading2 'Cloud Connect' { - Paragraph "The following section provides information about Cloud Connect components from server $(((Get-VBRServerSession).Server))." + Paragraph "The following section provides information about Cloud Connect components from server $VeeamBackupServer." BlankLine Get-AbrVbrCloudConnectSummary Get-AbrVbrCloudConnectStatus @@ -431,7 +435,7 @@ function Invoke-AsBuiltReport.Veeam.VBR { if ($InfoLevel.Jobs.PSObject.Properties.Value -ne 0) { if (((Get-VBRJob -WarningAction SilentlyContinue).count -gt 0) -or ((Get-VBRTapeJob).count -gt 0) -or ((Get-VBRSureBackupJob).count -gt 0)) { Section -Style Heading2 'Jobs Summary' { - Paragraph "The following section provides information about the configured jobs in Veeam Server: $(((Get-VBRServerSession).Server))." + Paragraph "The following section provides information about the configured jobs in Veeam Server: $VeeamBackupServer." BlankLine Write-PScriboMessage "Backup Jobs InfoLevel set at $($InfoLevel.Jobs.Backup)." if ($InfoLevel.Jobs.Backup -ge 1) { @@ -466,6 +470,11 @@ function Invoke-AsBuiltReport.Veeam.VBR { Get-AbrVbrFileShareBackupjob Get-AbrVbrFileShareBackupjobConf } + Write-PScriboMessage "Entra ID Jobs InfoLevel set at $($InfoLevel.Jobs.EntraID)." + if ($InfoLevel.Jobs.EntraID -ge 1 -and ($VbrVersion -ge 12.3)) { + Get-AbrVbrEntraIDBackupjob + Get-AbrVbrEntraIDBackupjobConf + } Write-PScriboMessage "Backup Copy Jobs InfoLevel set at $($InfoLevel.Jobs.BackupCopy)." if ($InfoLevel.Jobs.BackupCopy -ge 1 -and ($VbrVersion -ge 12)) { Get-AbrVbrBackupCopyjob @@ -481,7 +490,7 @@ function Invoke-AsBuiltReport.Veeam.VBR { if ($InfoLevel.Jobs.Restores -gt 0) { if (((Get-VBRBackup -WarningAction SilentlyContinue).count -gt 0) -or ((Get-VBRTapeJob).count -gt 0) -or ((Get-VBRSureBackupJob).count -gt 0)) { Section -Style Heading2 'Backups Summary' { - Paragraph "The following section provides information about the jobs restore points in Veeam Server: $(((Get-VBRServerSession).Server))." + Paragraph "The following section provides information about the jobs restore points in Veeam Server: $VeeamBackupServer." BlankLine Get-AbrVbrBackupsRPSummary Get-AbrVbrBackupJobsRP From 7402afdeade55100dfbc2ebe0d6e8ad57ad6010a Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Mon, 9 Dec 2024 11:39:28 -0400 Subject: [PATCH 09/13] Enable disabled sections --- Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 index 173436e..2c06c63 100644 --- a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 @@ -109,9 +109,9 @@ function Invoke-AsBuiltReport.Veeam.VBR { Paragraph "The following section details configuration information about the Backup Server: $($VeeamBackupServer)" BlankLine if ($InfoLevel.Infrastructure.BackupServer -ge 1) { - # Get-AbrVbrInfrastructureSummary + Get-AbrVbrInfrastructureSummary if ($VbrVersion -ge 12) { - # Get-AbrVbrSecurityCompliance + Get-AbrVbrSecurityCompliance } Get-AbrVbrBackupServerInfo Get-AbrVbrEnterpriseManagerInfo From 340b46dbf442cd7e68e6b234ed398d7c630f77bc Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Mon, 9 Dec 2024 22:16:50 -0400 Subject: [PATCH 10/13] Improved report content --- CHANGELOG.md | 4 ++ Src/Private/Get-AbrVbrEventForwarding.ps1 | 38 +++++++++++++++++++ .../Get-AbrVbrMalwareDetectionOption.ps1 | 8 +++- Src/Private/Get-AbrVbrSecurityCompliance.ps1 | 9 +++-- Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 | 4 +- 5 files changed, 56 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f2d283..d7b9489 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add EntraID Tenant configuration - Add Objects Backup Job information +- Update Malware detection setting + - Add Signature Detection +- Update Security & Compliance Best Practice content +- Add Syslog Event Filter information ### Changed diff --git a/Src/Private/Get-AbrVbrEventForwarding.ps1 b/Src/Private/Get-AbrVbrEventForwarding.ps1 index d6a6db0..7d69d64 100644 --- a/Src/Private/Get-AbrVbrEventForwarding.ps1 +++ b/Src/Private/Get-AbrVbrEventForwarding.ps1 @@ -66,6 +66,44 @@ function Get-AbrVbrEventForwarding { } BlankLine } + try { + $SyslogEventFilters = try { Get-VBRSyslogEventFilters } catch { Write-PScriboMessage "No syslog event filter configured" } + Section -Style Heading4 'Syslog Event Filter' { + $OutObj = @() + foreach ($SyslogEventFilter in $SyslogEventFilters) { + + $SyslogEventFilterLevel = @() + + if ($SyslogEventFilter.FilterInfos) { + $SyslogEventFilterLevel += 'Information' + } + if ($SyslogEventFilter.FilterWarnings) { + $SyslogEventFilterLevel += 'Warning' + } + if ($SyslogEventFilter.FilterErrors) { + $SyslogEventFilterLevel += 'Error' + } + + $inObj = [ordered] @{ + 'EventId' = $SyslogEventFilter.EventId + 'Level' = $SyslogEventFilterLevel -join ", " + } + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) + } + + $TableParams = @{ + Name = "Syslog Event Filter - $VeeamBackupServer" + List = $false + ColumnWidths = 50, 50 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Table @TableParams + } + } catch { + Write-PScriboMessage -IsWarning "Syslog Event Filter Section: $($_.Exception.Message)" + } } } catch { Write-PScriboMessage -IsWarning "Event Forwarding Section: $($_.Exception.Message)" diff --git a/Src/Private/Get-AbrVbrMalwareDetectionOption.ps1 b/Src/Private/Get-AbrVbrMalwareDetectionOption.ps1 index a1183fc..d63bba8 100644 --- a/Src/Private/Get-AbrVbrMalwareDetectionOption.ps1 +++ b/Src/Private/Get-AbrVbrMalwareDetectionOption.ps1 @@ -5,7 +5,7 @@ function Get-AbrVbrMalwareDetectionOption { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -33,6 +33,12 @@ function Get-AbrVbrMalwareDetectionOption { 'Sensitivity' = $MalwareDetectionOption.Sensitivity 'File system activity analisys' = $MalwareDetectionOption.GuestIndexScanEnabled 'Update malware definition automatically' = $MalwareDetectionOption.UpdateExtensionsListPeriodically + 'Indicators Of Compromise Enabled' = $MalwareDetectionOption.UseIndicatorsOfCompromiseEnabled + 'Signature Detection' = Switch ($MalwareDetectionOption.DetectionEngine) { + 'VeeamThreatHunter' {'Veeam Threat Hunter'} + 'External' {'Bring your own antivirus'} + } + 'Signature Detection - Scan Archives' = $MalwareDetectionOption.ScanArchives 'File Mask: Suspicious Extensions' = $MalwareDetectionOption.SuspiciousExtensions -join "," 'File Mask: Non Suspicious Extensions' = $MalwareDetectionOption.NonSuspiciousExtensions -join "," 'Incident API: Quick Backup On External Event' = $MalwareDetectionOption.QuickBackupOnExternalEventEnabled diff --git a/Src/Private/Get-AbrVbrSecurityCompliance.ps1 b/Src/Private/Get-AbrVbrSecurityCompliance.ps1 index c7ce83c..1c95db3 100644 --- a/Src/Private/Get-AbrVbrSecurityCompliance.ps1 +++ b/Src/Private/Get-AbrVbrSecurityCompliance.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrSecurityCompliance { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -74,6 +74,7 @@ function Get-AbrVbrSecurityCompliance { 'LsassProtectedProcess' = 'Local Security Authority Server Service (LSASS) should be set to run as a protected process' 'HardenedRepositoryNotContainsNBDProxies' = 'Hardened repositories should not be used as backup proxy servers due to expanded attack surface' 'PostgreSqlUseRecommendedSettings' = 'PostgreSQL server should be configured with recommended settings' + 'PasswordsComplexityRules' = 'Backup encryption password length and complexity recommendations should be followed' } $StatusObj = @{ 'Ok' = "Passed" @@ -86,7 +87,7 @@ function Get-AbrVbrSecurityCompliance { try { # Write-PscriboMessage -IsWarning "$($SecurityCompliance.Type) = $($RuleTypes[$SecurityCompliance.Type.ToString()])" $inObj = [ordered] @{ - 'Best Practice' = $RuleTypes[$SecurityCompliance.Type.ToString()] + 'Best Practices' = $RuleTypes[$SecurityCompliance.Type.ToString()] 'Status' = $StatusObj[$SecurityCompliance.Status.ToString()] } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) @@ -124,7 +125,7 @@ function Get-AbrVbrSecurityCompliance { $sampleDataObj = $sampleData.GetEnumerator() | Select-Object @{ Name = 'Category'; Expression = { $_.key } }, @{ Name = 'Value'; Expression = { $_.value } } - $chartFileItem = Get-ColumnChart -Status -SampleData $sampleDataObj -ChartName 'SecurityCompliance' -XField 'Category' -YField 'Value' -ChartAreaName 'Infrastructure' -AxisXTitle 'Status' -AxisYTitle 'Count' -ChartTitleName 'SecurityCompliance' -ChartTitleText 'Best Practice' + $chartFileItem = Get-ColumnChart -Status -SampleData $sampleDataObj -ChartName 'SecurityCompliance' -XField 'Category' -YField 'Value' -ChartAreaName 'Infrastructure' -AxisXTitle 'Status' -AxisYTitle 'Count' -ChartTitleName 'SecurityCompliance' -ChartTitleText 'Best Practices' } catch { Write-PScriboMessage -IsWarning "Security & Compliance chart section: $($_.Exception.Message)" @@ -136,7 +137,7 @@ function Get-AbrVbrSecurityCompliance { Image -Text 'Security & Compliance - Chart' -Align 'Center' -Percent 100 -Base64 $chartFileItem } BlankLine - $OutObj | Sort-Object -Property 'Best Practice' | Table @TableParams + $OutObj | Sort-Object -Property 'Best Practices' | Table @TableParams } } } catch { diff --git a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 index 2c06c63..173436e 100644 --- a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 @@ -109,9 +109,9 @@ function Invoke-AsBuiltReport.Veeam.VBR { Paragraph "The following section details configuration information about the Backup Server: $($VeeamBackupServer)" BlankLine if ($InfoLevel.Infrastructure.BackupServer -ge 1) { - Get-AbrVbrInfrastructureSummary + # Get-AbrVbrInfrastructureSummary if ($VbrVersion -ge 12) { - Get-AbrVbrSecurityCompliance + # Get-AbrVbrSecurityCompliance } Get-AbrVbrBackupServerInfo Get-AbrVbrEnterpriseManagerInfo From b4015bb8dc4bdf6fee0efcc3e1b212da94645091 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Tue, 10 Dec 2024 11:44:29 -0400 Subject: [PATCH 11/13] Increase module version --- Src/Private/Get-AbrVbrEventForwarding.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Private/Get-AbrVbrEventForwarding.ps1 b/Src/Private/Get-AbrVbrEventForwarding.ps1 index 7d69d64..65b42e0 100644 --- a/Src/Private/Get-AbrVbrEventForwarding.ps1 +++ b/Src/Private/Get-AbrVbrEventForwarding.ps1 @@ -5,7 +5,7 @@ function Get-AbrVbrEventForwarding { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux From 84ecd47fb4c4d72c34180546e9c2230a9a47ad31 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Tue, 10 Dec 2024 11:45:14 -0400 Subject: [PATCH 12/13] Enabled disabled content --- Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 index 173436e..2c06c63 100644 --- a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 @@ -109,9 +109,9 @@ function Invoke-AsBuiltReport.Veeam.VBR { Paragraph "The following section details configuration information about the Backup Server: $($VeeamBackupServer)" BlankLine if ($InfoLevel.Infrastructure.BackupServer -ge 1) { - # Get-AbrVbrInfrastructureSummary + Get-AbrVbrInfrastructureSummary if ($VbrVersion -ge 12) { - # Get-AbrVbrSecurityCompliance + Get-AbrVbrSecurityCompliance } Get-AbrVbrBackupServerInfo Get-AbrVbrEnterpriseManagerInfo From 42c826b4fb9efa4077cbc5d8ba71ec9474123dc2 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Wed, 11 Dec 2024 13:45:20 -0400 Subject: [PATCH 13/13] v0.8.13 --- AsBuiltReport.Veeam.VBR.psd1 | 2 +- CHANGELOG.md | 5 +++-- Src/Private/Get-AbrVbrBackupRepository.ps1 | 17 ++++++++++++++--- Src/Private/Get-AbrVbrObjectRepository.ps1 | 10 +++++++++- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/AsBuiltReport.Veeam.VBR.psd1 b/AsBuiltReport.Veeam.VBR.psd1 index c3508d9..0d9b457 100644 --- a/AsBuiltReport.Veeam.VBR.psd1 +++ b/AsBuiltReport.Veeam.VBR.psd1 @@ -67,7 +67,7 @@ } @{ ModuleName = 'Veeam.Diagrammer'; - ModuleVersion = '0.6.17' + ModuleVersion = '0.6.18' } ) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7b9489..08d5082 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ##### This project is community maintained and has no sponsorship from Veeam, its employees or any of its affiliates. -## [0.8.13] - Unreleased +## [0.8.13] - 2024-12-11 ### Added @@ -17,10 +17,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add Signature Detection - Update Security & Compliance Best Practice content - Add Syslog Event Filter information +- Add Google Cloud Storage repository information ### Changed -- Increase Veeam.Diagrammer minimum requirement to v0.6.17 +- Increase Veeam.Diagrammer minimum requirement to v0.6.18 - Change the infrastructure diagram default save location to $OutputFolderPath - Increase AsBuiltReport.Core to v1.4.1 diff --git a/Src/Private/Get-AbrVbrBackupRepository.ps1 b/Src/Private/Get-AbrVbrBackupRepository.ps1 index 344c705..d27d478 100644 --- a/Src/Private/Get-AbrVbrBackupRepository.ps1 +++ b/Src/Private/Get-AbrVbrBackupRepository.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrBackupRepository { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -226,11 +226,22 @@ function Get-AbrVbrBackupRepository { $inObj.Remove('Extent of ScaleOut Backup Repository') } - if ($BackupRepo.Type -in @('AmazonS3Compatible', 'WasabiS3')) { + if ($BackupRepo.Type -in @('GoogleCloudStorage')) { + $inObj.Add('Region Id', ($BackupRepos.GoogleCloudOptions.RegionId)) + $inObj.Add('Region Type', ( $BackupRepos.GoogleCloudOptions.RegionType)) + $inObj.Add('Bucket Name', ( $BackupRepos.GoogleCloudOptions.BucketName)) + $inObj.Add('Folder Name', ( $BackupRepos.GoogleCloudOptions.FolderName)) + $inObj.Add('Storage Class', ( $BackupRepos.GoogleCloudOptions.StorageClass)) + $inObj.Add('Enable Nearline Storage Class', ( $BackupRepos.GoogleCloudOptions.EnableNearlineStorageClass)) + $inObj.Add('Enable Coldline Storage Class', ( $BackupRepos.GoogleCloudOptions.EnableColdlineStorageClass)) + $inObj.Remove('Path') + } + + if ($BackupRepo.Type -in @('AmazonS3Compatible', 'WasabiS3', 'GoogleCloudStorage')) { $inObj.Add('Object Lock Enabled', ($BackupRepo.ObjectLockEnabled)) } - if ($BackupRepo.Type -in @('AmazonS3Compatible', 'WasabiS3')) { + if ($BackupRepo.Type -in @('AmazonS3Compatible', 'WasabiS3', 'GoogleCloudStorage')) { $inObj.Add('Mount Server', (Get-VBRServer | Where-Object { $_.id -eq $BackupRepo.MountHostId.Guid }).Name) } diff --git a/Src/Private/Get-AbrVbrObjectRepository.ps1 b/Src/Private/Get-AbrVbrObjectRepository.ps1 index ee1a466..af3f506 100644 --- a/Src/Private/Get-AbrVbrObjectRepository.ps1 +++ b/Src/Private/Get-AbrVbrObjectRepository.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrObjectRepository { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -130,8 +130,16 @@ function Get-AbrVbrObjectRepository { $inObj.remove('Service Point') $inObj.remove('Amazon S3 Folder') $inObj.remove('Immutability Period') + $inObj.remove('Immutability Enabled ') $inObj.add('Azure Blob Name', ($ObjectRepo.AzureBlobFolder).Name) $inObj.add('Azure Blob Container', ($ObjectRepo.AzureBlobFolder).Container) + } elseif (($ObjectRepo).Type -eq 'GoogleCloudStorage') { + $inObj.remove('Service Point') + $inObj.remove('Amazon S3 Folder') + $inObj.remove('Immutability Period') + $inObj.add('Folder Name', $ObjectRepo.Folder) + $inObj.add('Enable Nearline Storage Class', $ObjectRepo.EnableNearlineStorageClass) + $inObj.add('Enable Coldline Storage Class', $ObjectRepo.EnableColdlineStorageClass) } $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj)