Skip to content

Commit

Permalink
Add Organization Backup Application support AsBuiltReport#15
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelinux committed Feb 29, 2024
1 parent 3fe86a5 commit 49675b7
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Src/Private/Get-AbrVb365Organization.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Get-AbrVb365Organization {
.DESCRIPTION
Documents the configuration of Veeam VB365 in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.2.1
Version: 0.3.0
Author: Jonathan Colon
Twitter: @jcolonfzenpr
Github: rebelinux
Expand Down Expand Up @@ -46,8 +46,6 @@ function Get-AbrVb365Organization {
'Skip Revocation Check' = ConvertTo-TextYN $Organization.SkipRevocationCheck
'Is Exchange Server' = ConvertTo-TextYN $Organization.IsExchange
'Is SharePoint' = ConvertTo-TextYN $Organization.IsSharePoint
'Backup Accounts' = $Organization.BackupAccounts
'Backup Applications' = $Organization.BackupApplications
'Backup Teams' = ConvertTo-TextYN $Organization.BackupTeams
'Backup Teams Chats' = ConvertTo-TextYN $Organization.BackupTeamsChats
'Grant Access To Site Collections' = ConvertTo-TextYN $Organization.GrantAccessToSiteCollections
Expand All @@ -58,8 +56,6 @@ function Get-AbrVb365Organization {
if ($inObj.Type -ne "Office365") {
$inObj.remove("Backup Teams")
$inObj.remove("Backup Teams Chats")
$inObj.remove("Backup Applications")
$inObj.remove("Backup Accounts")
$inObj.remove("Region")
$inObj.remove("Office Name")
$inObj.remove("Grant Access To Site Collections")
Expand Down Expand Up @@ -100,6 +96,7 @@ function Get-AbrVb365Organization {
$Organization | Table @TableParams

if ($Organization.Type -eq "Office365") {
Get-AbrVb365OrganizationBackupApplication -Organization $Organization.Name
Get-AbrVb365OrganizationRestoreOperator -Organization $Organization.Name
Get-AbrVb365OrganizationSyncState -Organization $Organization.Name
Get-AbrVb365OrganizationEXConnSetting -Organization $Organization.Name
Expand Down
66 changes: 66 additions & 0 deletions Src/Private/Get-AbrVb365OrganizationBackupApplication.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
function Get-AbrVb365OrganizationBackupApplication {
<#
.SYNOPSIS
Used by As Built Report to retrieve Veeam VB365 Office365 Backup Applications Settings
.DESCRIPTION
Documents the configuration of Veeam VB365 in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.3.0
Author: Jonathan Colon
Twitter: @jcolonfzenpr
Github: rebelinux
Credits: Iain Brighton (@iainbrighton) - PScribo module
.LINK
https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VB365
#>
[CmdletBinding()]
param (
[Parameter(
Position = 0,
Mandatory = $true
)]
[ValidateNotNullOrEmpty()]
[String] $Organization
)

begin {
Write-PScriboMessage "Organizations InfoLevel set at $($InfoLevel.Infrastructure.Organization)."
}

process {
try {
$Organizations = Get-VBOOrganization -Name $Organization
$BackupApplications = try { Get-VBOBackupApplication -Organization $Organizations | Sort-Object -Property DisplayName} catch { Out-Null }
if (($InfoLevel.Infrastructure.Organization -gt 0) -and ($BackupApplications)) {
Write-PScriboMessage "Collecting Veeam VB365 Office365 Organization Backup Applications Settings."
Section -Style Heading4 'Backup Applications' {
$BackupApplicationInfo = @()
foreach ($BackupApplication in $BackupApplications) {
$inObj = [ordered] @{
'Name' = $BackupApplication.DisplayName
'Certificate Thumbprint' = $BackupApplication.ApplicationCertificateThumbprint
}

$BackupApplicationInfo += [PSCustomObject]$InObj
}

$TableParams = @{
Name = "Backup Applications - $($Organizations.Name)"
List = $false
ColumnWidths = 40, 60
}
if ($Report.ShowTableCaptions) {
$TableParams['Caption'] = "- $($TableParams.Name)"
}

$BackupApplicationInfo | Table @TableParams
}
}
} catch {
Write-PScriboMessage -IsWarning "VB365 Office365 Organization Backup Applications Section: $($_.Exception.Message)"
}
}

end {}
}

0 comments on commit 49675b7

Please sign in to comment.