Skip to content

Commit

Permalink
v0.8.13
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelinux committed Dec 9, 2024
1 parent bd778e9 commit ebcc203
Show file tree
Hide file tree
Showing 20 changed files with 547 additions and 54 deletions.
4 changes: 3 additions & 1 deletion AsBuiltreport.Veeam.VBR.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"Inventory": {
"FileShare": 1,
"PHY": 1,
"VI": 1
"VI": 1,
"EntraID": 1
},
"Storage": {
"ISILON": 1,
Expand All @@ -71,6 +72,7 @@
"Agent": 1,
"Backup": 1,
"BackupCopy": 1,
"EntraID": 3,
"FileShare": 1,
"Surebackup": 1,
"Replication": 1,
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.

Expand Down
5 changes: 2 additions & 3 deletions Src/Private/Get-AbrVbrAgentBackupjobConf.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand All @@ -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
Expand Down
9 changes: 7 additions & 2 deletions Src/Private/Get-AbrVbrBackupServerInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = @()
Expand All @@ -444,7 +450,6 @@ function Get-AbrVbrBackupServerInfo {
0 { '--' }
1 { $Registry.Value }
default { $Registry.Value -Join ', ' }

}
}
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
Expand Down
7 changes: 3 additions & 4 deletions Src/Private/Get-AbrVbrCloudConnectCG.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
}

Expand All @@ -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
Expand Down
7 changes: 3 additions & 4 deletions Src/Private/Get-AbrVbrCloudConnectGP.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
}

Expand All @@ -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
Expand Down
7 changes: 3 additions & 4 deletions Src/Private/Get-AbrVbrCloudConnectTenant.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
}
Expand All @@ -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
Expand Down
67 changes: 67 additions & 0 deletions Src/Private/Get-AbrVbrEntraIDBackupjob.ps1
Original file line number Diff line number Diff line change
@@ -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 {}
}
Loading

0 comments on commit ebcc203

Please sign in to comment.