diff --git a/Src/Private/Get-AbrVb365Organization.ps1 b/Src/Private/Get-AbrVb365Organization.ps1 index b708aae..d14c295 100644 --- a/Src/Private/Get-AbrVb365Organization.ps1 +++ b/Src/Private/Get-AbrVb365Organization.ps1 @@ -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 @@ -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 @@ -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") @@ -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 diff --git a/Src/Private/Get-AbrVb365OrganizationBackupApplication.ps1 b/Src/Private/Get-AbrVb365OrganizationBackupApplication.ps1 new file mode 100644 index 0000000..00b2c16 --- /dev/null +++ b/Src/Private/Get-AbrVb365OrganizationBackupApplication.ps1 @@ -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 {} +} \ No newline at end of file