diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f5553c..5b3c32e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,9 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.8.12] - Unreleased +### Changed + +- Improve detection of empty fields in tables +- Improve detection of true/false elements in tables +- Improve support for Veeam B&R v11 + ### Fixed - Fix [#187](https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR/issues/187) +- Fix Cloud Connect tenant expiration date healthcheck ## [0.8.11] - 2024-10-30 diff --git a/README.md b/README.md index 7e8af19..11b37a1 100644 --- a/README.md +++ b/README.md @@ -56,13 +56,14 @@ Below are the instructions on how to install, configure and generate a Veeam VBR The Veeam VBR As Built Report supports the following Veeam Backup & Replication version; +- Veeam Backup & Replication v11+ (Standard, Enterprise & Enterprise Plus Edition) - Veeam Backup & Replication v12+ (Standard, Enterprise & Enterprise Plus Edition) :exclamation:Community Edition is not supported:exclamation: ## :no_entry_sign: Unsupported Versions -The versions 10 and 11 are no longer supported by Veeam. So I will not be performing compatibility tests with those versions. The report may work on previous versions but I do not guarantee and will not address issues related to pre-v12. +The versions 10 are no longer supported by Veeam. So I will not be performing compatibility tests with these version. The report may work on previous versions but I do not guarantee and will not address issues related to pre-v11. [Veeam Product Lifecycle Policy](https://www.veeam.com/product-lifecycle.html) diff --git a/Src/Private/Get-AbrVbrAgentBackupjob.ps1 b/Src/Private/Get-AbrVbrAgentBackupjob.ps1 index 0d2f052..6c0e77c 100644 --- a/Src/Private/Get-AbrVbrAgentBackupjob.ps1 +++ b/Src/Private/Get-AbrVbrAgentBackupjob.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrAgentBackupjob { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -40,7 +40,7 @@ function Get-AbrVbrAgentBackupjob { 'OS Platform' = $ABkjob.OSPlatform 'Backup Object' = $ABkjob.BackupObject } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Agent Backup Jobs $($ABkjob.Name) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrAgentBackupjobConf.ps1 b/Src/Private/Get-AbrVbrAgentBackupjobConf.ps1 index cff3095..cbb647a 100644 --- a/Src/Private/Get-AbrVbrAgentBackupjobConf.ps1 +++ b/Src/Private/Get-AbrVbrAgentBackupjobConf.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrAgentBackupjobConf { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -53,7 +53,7 @@ function Get-AbrVbrAgentBackupjobConf { 'False' { 'Normal Priority' } } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $Null -like $_.'Description' } | Set-Style -Style Warning -Property 'Description' @@ -96,7 +96,7 @@ function Get-AbrVbrAgentBackupjobConf { $Null { 'Computer' } default { $BackupObject.Type } } - 'Enabled' = ConvertTo-TextYN $BackupObject.Enabled + 'Enabled' = $BackupObject.Enabled 'Container' = Switch ($BackupObject.Container) { $Null { 'Individual Computer' } 'ActiveDirectory' { 'Active Directory' } @@ -105,7 +105,7 @@ function Get-AbrVbrAgentBackupjobConf { default { $BackupObject.Container } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Agent Backup Jobs Protected Computers Section: $($_.Exception.Message)" } @@ -137,7 +137,7 @@ function Get-AbrVbrAgentBackupjobConf { } } if ($ABkjob.BackupType -eq 'EntireComputer') { - $inObj.add('Include external USB drives', (ConvertTo-TextYN $ABkjob.UsbDrivesIncluded)) + $inObj.add('Include external USB drives', ($ABkjob.UsbDrivesIncluded)) } elseif ($ABkjob.BackupType -eq 'SelectedVolumes') { if ($Null -ne $ABkjob.SelectedVolumes.Path) { $inObj.add('Backup the following volumes only', ($ABkjob.SelectedVolumes.Path -join ', ')) @@ -146,12 +146,12 @@ function Get-AbrVbrAgentBackupjobConf { } } elseif ($ABkjob.BackupType -eq 'SelectedFiles') { - $inObj.add('Backup Operating System Files', (ConvertTo-TextYN $ABkjob.SelectedFilesOptions.BackupOS)) - $inObj.add('Backup Personal Files', (ConvertTo-TextYN $ABkjob.SelectedFilesOptions.BackupPersonalFiles)) + $inObj.add('Backup Operating System Files', ($ABkjob.SelectedFilesOptions.BackupOS)) + $inObj.add('Backup Personal Files', ($ABkjob.SelectedFilesOptions.BackupPersonalFiles)) if ($ABkjob.SelectedFilesOptions.BackupPersonalFiles -eq $TRUE) { - $inObj.add('User Profile Folder to Backup', ("Desktop: $(ConvertTo-TextYN $ABkjob.SelectedFilesOptions.SelectedPersonalFolders.Desktop),`r`nDocuments: $(ConvertTo-TextYN $ABkjob.SelectedFilesOptions.SelectedPersonalFolders.Documents),`r`nPictures: $(ConvertTo-TextYN $ABkjob.SelectedFilesOptions.SelectedPersonalFolders.Pictures),`r`nVideo: $(ConvertTo-TextYN $ABkjob.SelectedFilesOptions.SelectedPersonalFolders.Video),`r`nFavorites: $(ConvertTo-TextYN $ABkjob.SelectedFilesOptions.SelectedPersonalFolders.Favorites),`r`nDownloads: $(ConvertTo-TextYN $ABkjob.SelectedFilesOptions.SelectedPersonalFolders.Downloads),`r`nApplicationData: $(ConvertTo-TextYN $ABkjob.SelectedFilesOptions.SelectedPersonalFolders.ApplicationData),`r`nOther Files and Folders: $(ConvertTo-TextYN $ABkjob.SelectedFilesOptions.SelectedPersonalFolders.Custom),`r`nExclude Roaming Profile: $(ConvertTo-TextYN $ABkjob.SelectedFilesOptions.SelectedPersonalFolders.ExcludeRoamingUsers)")) + $inObj.add('User Profile Folder to Backup', ("Desktop: $($ABkjob.SelectedFilesOptions.SelectedPersonalFolders.Desktop),`r`nDocuments: $($ABkjob.SelectedFilesOptions.SelectedPersonalFolders.Documents),`r`nPictures: $($ABkjob.SelectedFilesOptions.SelectedPersonalFolders.Pictures),`r`nVideo: $($ABkjob.SelectedFilesOptions.SelectedPersonalFolders.Video),`r`nFavorites: $($ABkjob.SelectedFilesOptions.SelectedPersonalFolders.Favorites),`r`nDownloads: $($ABkjob.SelectedFilesOptions.SelectedPersonalFolders.Downloads),`r`nApplicationData: $($ABkjob.SelectedFilesOptions.SelectedPersonalFolders.ApplicationData),`r`nOther Files and Folders: $($ABkjob.SelectedFilesOptions.SelectedPersonalFolders.Custom),`r`nExclude Roaming Profile: $($ABkjob.SelectedFilesOptions.SelectedPersonalFolders.ExcludeRoamingUsers)")) } - $inObj.add('Backup File System Files', (ConvertTo-TextYN $ABkjob.SelectedFilesOptions.BackupSelectedFiles)) + $inObj.add('Backup File System Files', ($ABkjob.SelectedFilesOptions.BackupSelectedFiles)) if ($Null -ne $ABkjob.SelectedFilesOptions.SelectedFiles) { $inObj.add('Files System Path', ($ABkjob.SelectedFilesOptions.SelectedFiles -join ', ')) } @@ -162,10 +162,10 @@ function Get-AbrVbrAgentBackupjobConf { $inObj.add('Filter Files (Exclude Mask)', ($ABkjob.SelectedFilesOptions.ExcludeMask)) } if ($ABkjob.SelectedFilesOptions.BackupPersonalFiles -eq $TRUE) { - $inObj.add('Exclude Microsoft Onedrive Folders', (ConvertTo-TextYN $ABkjob.SelectedFilesOptions.SelectedPersonalFolders.ExcludeOneDrive)) + $inObj.add('Exclude Microsoft Onedrive Folders', ($ABkjob.SelectedFilesOptions.SelectedPersonalFolders.ExcludeOneDrive)) } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Agent Backup Jobs Backup Mode Section: $($_.Exception.Message)" } @@ -233,18 +233,18 @@ function Get-AbrVbrAgentBackupjobConf { } elseif ($ABkjob.DestinationOptions.DestinationType -eq 'NetworkFolder') { $inObj.add('Shared Folder', ($ABkjob.DestinationOptions.NetworkFolderPath)) $inObj.add('Target Share Type', ($ABkjob.DestinationOptions.TargetShareType)) - $inObj.add('Use Network Credentials', (ConvertTo-TextYN $ABkjob.DestinationOptions.UseNetworkCredentials)) + $inObj.add('Use Network Credentials', ($ABkjob.DestinationOptions.UseNetworkCredentials)) if ($ABkjob.DestinationOptions.UseNetworkCredentials) { $inObj.add('Credentials', ($ABkjob.DestinationOptions.NetworkCredentials.Name)) } } if ($ABkjob.GFSRetentionEnabled) { - $inObj.add('Keep certain full backup longer for archival purposes (GFS)', (ConvertTo-TextYN $ABkjob.GFSRetentionEnabled)) + $inObj.add('Keep certain full backup longer for archival purposes (GFS)', ($ABkjob.GFSRetentionEnabled)) $inObj.add('Keep Weekly full backup for', ("$($ABkjob.GFSOptions.WeeklyOptions.RetentionPeriod) weeks,`r`nIf multiple backup exist use the one from: $($ABkjob.GFSOptions.WeeklyOptions.SelectedDay)")) $inObj.add('Keep Monthly full backup for', ("$($ABkjob.GFSOptions.MonthlyOptions.RetentionPeriod) months,`r`nUse weekly full backup from the following week of the month: $($ABkjob.GFSOptions.MonthlyOptions.SelectedWeek)")) $inObj.add('Keep Yearly full backup for', ("$($ABkjob.GFSOptions.YearlyOptions.RetentionPeriod) years,`r`nUse monthly full backup from the following month: $($ABkjob.GFSOptions.YearlyOptions.SelectedMonth)")) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Agent Backup Jobs Destination Section: $($_.Exception.Message)" } @@ -271,7 +271,7 @@ function Get-AbrVbrAgentBackupjobConf { 'State' = $SecondaryTarget.info.LatestStatus 'Description' = $SecondaryTarget.Description } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } $TableParams = @{ @@ -332,18 +332,18 @@ function Get-AbrVbrAgentBackupjobConf { } elseif ($ABkjob.DestinationOptions.DestinationType -eq 'NetworkFolder') { $inObj.add('Shared Folder', ($ABkjob.DestinationOptions.NetworkFolderPath)) $inObj.add('Target Share Type', ($ABkjob.DestinationOptions.TargetShareType)) - $inObj.add('Use Network Credentials', (ConvertTo-TextYN $ABkjob.DestinationOptions.UseNetworkCredentials)) + $inObj.add('Use Network Credentials', ($ABkjob.DestinationOptions.UseNetworkCredentials)) if ($ABkjob.DestinationOptions.UseNetworkCredentials) { $inObj.add('Credentials', ($ABkjob.DestinationOptions.NetworkCredentials.Name)) } } if ($ABkjob.GFSRetentionEnabled) { - $inObj.add('Keep certain full backup longer for archival purposes (GFS)', (ConvertTo-TextYN $ABkjob.GFSRetentionEnabled)) + $inObj.add('Keep certain full backup longer for archival purposes (GFS)', ($ABkjob.GFSRetentionEnabled)) $inObj.add('Keep Weekly full backup for', ("$($ABkjob.GFSOptions.WeeklyOptions.RetentionPeriod) weeks,`r`nIf multiple backup exist use the one from: $($ABkjob.GFSOptions.WeeklyOptions.SelectedDay)")) $inObj.add('Keep Monthly full backup for', ("$($ABkjob.GFSOptions.MonthlyOptions.RetentionPeriod) months,`r`nUse weekly full backup from the following week of the month: $($ABkjob.GFSOptions.MonthlyOptions.SelectedWeek)")) $inObj.add('Keep Yearly full backup for', ("$($ABkjob.GFSOptions.YearlyOptions.RetentionPeriod) years,`r`nUse monthly full backup from the following month: $($ABkjob.GFSOptions.YearlyOptions.SelectedMonth)")) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Agent Backup Jobs Destination Section: $($_.Exception.Message)" } @@ -370,7 +370,7 @@ function Get-AbrVbrAgentBackupjobConf { 'State' = $SecondaryTarget.info.LatestStatus 'Description' = $SecondaryTarget.Description } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } $TableParams = @{ @@ -396,13 +396,13 @@ function Get-AbrVbrAgentBackupjobConf { Write-PScriboMessage "Discovered $($ABkjob.Name) backup options." $inObj = [ordered] @{ - 'Syntethic Full Backup' = ConvertTo-TextYN $ABkjob.SyntheticFullOptions.Enabled + 'Syntethic Full Backup' = $ABkjob.SyntheticFullOptions.Enabled } if ($ABkjob.SyntheticFullOptions.Enabled) { $inObj.add('Create Syntethic on Days', $ABkjob.SyntheticFullOptions.Days -join ", ") } $inObj += [ordered] @{ - 'Active Full Backup' = ConvertTo-TextYN $ABkjob.ActiveFullOptions.Enabled + 'Active Full Backup' = $ABkjob.ActiveFullOptions.Enabled } if ($ABkjob.ActiveFullOptions.ScheduleType -eq 'Weekly' -and $ABkjob.ActiveFullOptions.Enabled) { $inObj.add('Active Full Backup Schedule Type', $ABkjob.ActiveFullOptions.ScheduleType) @@ -413,7 +413,7 @@ function Get-AbrVbrAgentBackupjobConf { $inObj.add('Active Full Backup Monthly on', "Day Number In Month: $($ABkjob.ActiveFullOptions.DayNumber)`r`nDay Of Week: $($ABkjob.ActiveFullOptions.DayOfWeek)`r`nDay of Month: $($ABkjob.ActiveFullOptions.DayOfMonth)`r`nMonths: $($ABkjob.ActiveFullOptions.SelectedMonths)") } - $OutObj += [pscustomobject]$inObj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Backup) - $($ABkjob.Name)" @@ -438,7 +438,7 @@ function Get-AbrVbrAgentBackupjobConf { Write-PScriboMessage "Discovered $($ABkjob.Name) maintenance options." $inObj = [ordered] @{ - 'Storage-Level Corruption Guard (SLCG)' = ConvertTo-TextYN $ABkjob.HealthCheckOptions.Enabled + 'Storage-Level Corruption Guard (SLCG)' = $ABkjob.HealthCheckOptions.Enabled } if ($ABkjob.HealthCheckOptions.Enabled) { $inObj.add('SLCG Schedule Type', $ABkjob.HealthCheckOptions.ScheduleType) @@ -449,7 +449,7 @@ function Get-AbrVbrAgentBackupjobConf { } $inObj += [ordered] @{ - 'Defragment and Compact Full Backup (DCFB)' = ConvertTo-TextYN $ABkjob.CompactFullOptions.Enabled + 'Defragment and Compact Full Backup (DCFB)' = $ABkjob.CompactFullOptions.Enabled } if ($ABkjob.CompactFullOptions.Enabled) { $inObj.add('DCFB Schedule Type', $ABkjob.CompactFullOptions.ScheduleType) @@ -458,7 +458,7 @@ function Get-AbrVbrAgentBackupjobConf { if ($ABkjob.CompactFullOptions.ScheduleType -ne 'Weekly' -and $ABkjob.CompactFullOptions.Enabled) { $inObj.add('DCFB Backup Monthly Schedule', "Day Of Week: $($ABkjob.CompactFullOptions.DayOfWeek)`r`nDay Number In Month: $($ABkjob.CompactFullOptions.DayNumber)`r`nDay of Month: $($ABkjob.CompactFullOptions.DayOfMonth)`r`nMonths: $($ABkjob.CompactFullOptions.SelectedMonths)") } - $OutObj += [pscustomobject]$inObj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Storage-Level Corruption Guard (SLCG)' -eq "No" } | Set-Style -Style Warning -Property 'Storage-Level Corruption Guard (SLCG)' @@ -498,13 +498,13 @@ function Get-AbrVbrAgentBackupjobConf { $inObj = [ordered] @{ 'Compression Level' = $ABkjob.StorageOptions.CompressionLevel 'Storage optimization' = $ABkjob.StorageOptions.StorageOptimizationType - 'Enabled Backup File Encryption' = ConvertTo-TextYN $ABkjob.StorageOptions.EncryptionEnabled + 'Enabled Backup File Encryption' = $ABkjob.StorageOptions.EncryptionEnabled 'Encryption Key' = Switch ($ABkjob.StorageOptions.EncryptionEnabled) { $false { 'None' } default { (Get-VBREncryptionKey | Where-Object { $_.id -eq $ABkjob.StorageOptions.EncryptionKey.Id }).Description } } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Enabled Backup File Encryption' -eq 'No' } | Set-Style -Style Warning -Property 'Enabled Backup File Encryption' @@ -539,19 +539,19 @@ function Get-AbrVbrAgentBackupjobConf { $OutObj = @() Write-PScriboMessage "Discovered $($ABkjob.Name) notification options." $inObj = [ordered] @{ - 'Send Snmp Notification' = ConvertTo-TextYN $ABkjob.NotificationOptions.EnableSnmpNotification - 'Send Email Notification' = ConvertTo-TextYN $ABkjob.NotificationOptions.EnableAdditionalNotification + 'Send Snmp Notification' = $ABkjob.NotificationOptions.EnableSnmpNotification + 'Send Email Notification' = $ABkjob.NotificationOptions.EnableAdditionalNotification } if ($ABkjob.NotificationOptions.EnableAdditionalNotification) { $inObj.add('Email Notification Additional Addresses', $ABkjob.NotificationOptions.AdditionalAddress) - $inObj.add('Use Custom Email Notification Options', (ConvertTo-TextYN $ABkjob.NotificationOptions.UseNotificationOptions)) + $inObj.add('Use Custom Email Notification Options', ($ABkjob.NotificationOptions.UseNotificationOptions)) $inObj.add('Use Custom Notification Setting', $ABkjob.NotificationOptions.NotificationSubject) - $inObj.add('Notify On Success', (ConvertTo-TextYN $ABkjob.NotificationOptions.NotifyOnSuccess)) - $inObj.add('Notify On Warning', (ConvertTo-TextYN $ABkjob.NotificationOptions.NotifyOnWarning)) - $inObj.add('Notify On Error', (ConvertTo-TextYN $ABkjob.NotificationOptions.NotifyOnError)) - $inObj.add('Suppress Notification until Last Retry', (ConvertTo-TextYN $ABkjob.NotificationOptions.NotifyOnLastRetryOnly)) + $inObj.add('Notify On Success', ($ABkjob.NotificationOptions.NotifyOnSuccess)) + $inObj.add('Notify On Warning', ($ABkjob.NotificationOptions.NotifyOnWarning)) + $inObj.add('Notify On Error', ($ABkjob.NotificationOptions.NotifyOnError)) + $inObj.add('Suppress Notification until Last Retry', ($ABkjob.NotificationOptions.NotifyOnLastRetryOnly)) } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Notification) - $($ABkjob.Name)" @@ -572,16 +572,16 @@ function Get-AbrVbrAgentBackupjobConf { $OutObj = @() Write-PScriboMessage "Discovered $($ABkjob.Name) Integration options." $inObj = [ordered] @{ - 'Enable Backup from Storage Snapshots' = ConvertTo-TextYN $ABkjob.SanIntegrationOptions.SanSnapshotsEnabled + 'Enable Backup from Storage Snapshots' = $ABkjob.SanIntegrationOptions.SanSnapshotsEnabled } if ($ABkjob.SanIntegrationOptions.SanSnapshotsEnabled) { - $inObj.add('Failover to On-Host Backup agent', (ConvertTo-TextYN $ABkjob.SanIntegrationOptions.FailoverFromSanEnabled)) - $inObj.add('Off-host Backup Proxy Automatic Selection', (ConvertTo-TextYN $ABkjob.SanIntegrationOptions.SanProxyAutodetectEnabled)) + $inObj.add('Failover to On-Host Backup agent', ($ABkjob.SanIntegrationOptions.FailoverFromSanEnabled)) + $inObj.add('Off-host Backup Proxy Automatic Selection', ($ABkjob.SanIntegrationOptions.SanProxyAutodetectEnabled)) } if (!$ABkjob.SanIntegrationOptions.SanProxyAutodetectEnabled) { $inObj.add('Off-host Backup Proxy Server', $ABkjob.SanIntegrationOptions.Proxy.Server.Name) } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Integration) - $($ABkjob.Name)" @@ -610,10 +610,10 @@ function Get-AbrVbrAgentBackupjobConf { } Write-PScriboMessage "Discovered $($ABkjob.Name) script options." $inObj = [ordered] @{ - 'Run the Following Script Before' = ConvertTo-TextYN $ABkjob.ScriptOptions.PreScriptEnabled + 'Run the Following Script Before' = $ABkjob.ScriptOptions.PreScriptEnabled } $inObj += [ordered] @{ - 'Run the Following Script After' = ConvertTo-TextYN $ABkjob.ScriptOptions.PostScriptEnabled + 'Run the Following Script After' = $ABkjob.ScriptOptions.PostScriptEnabled } if ($ABkjob.ScriptOptions.PreScriptEnabled) { $inObj.add('Run Script Before the Job', $ABkjob.ScriptOptions.PreCommand) @@ -625,7 +625,7 @@ function Get-AbrVbrAgentBackupjobConf { $inObj.add('Run Script Frequency', $ABkjob.ScriptOptions.Periodicity) $inObj.add($FrequencyText, $FrequencyValue) } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Script) - $($ABkjob.Name)" @@ -649,11 +649,11 @@ function Get-AbrVbrAgentBackupjobConf { try { Write-PScriboMessage "Discovered $($ABkjob.Name) guest processing." $inObj = [ordered] @{ - 'Enabled Application Process Processing' = ConvertTo-TextYN $ABkjob.ApplicationProcessingEnabled - 'Enabled Guest File System Indexing' = ConvertTo-TextYN $ABkjob.IndexingEnabled + 'Enabled Application Process Processing' = $ABkjob.ApplicationProcessingEnabled + 'Enabled Guest File System Indexing' = $ABkjob.IndexingEnabled } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Guest Processing Options - $($ABkjob.Name)" @@ -691,11 +691,11 @@ function Get-AbrVbrAgentBackupjobConf { $inObj = [ordered] @{ 'Retry Failed item' = $ABkjob.ScheduleOptions.RetryCount 'Wait before each retry' = "$($ABkjob.ScheduleOptions.RetryTimeout)/min" - 'Backup Window' = ConvertTo-TextYN $ABkjob.ScheduleOptions.BackupTerminationWindowEnabled + 'Backup Window' = $ABkjob.ScheduleOptions.BackupTerminationWindowEnabled 'Schedule type' = $ScheduleType 'Schedule Options' = $Schedule } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Schedule Options - $($ABkjob.Name)" @@ -764,7 +764,7 @@ function Get-AbrVbrAgentBackupjobConf { default { $ABkjob.BackupCacheOptions.LocalPath } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Backup Cache - $($ABkjob.Name)" @@ -818,17 +818,17 @@ function Get-AbrVbrAgentBackupjobConf { 'KeepRunning' { 'Keep Running' } default { $ABkjob.ScheduleOptions.PostBackupAction } } - 'Backup At LogOff' = ConvertTo-TextYN $ABkjob.ScheduleOptions.BackupAtLogOff - 'Backup At Lock' = ConvertTo-TextYN $ABkjob.ScheduleOptions.BackupAtLock - 'Backup At Target Connection' = ConvertTo-TextYN $ABkjob.ScheduleOptions.BackupAtTargetConnection - 'Eject Storage After Backup' = ConvertTo-TextYN $ABkjob.ScheduleOptions.EjectStorageAfterBackup + 'Backup At LogOff' = $ABkjob.ScheduleOptions.BackupAtLogOff + 'Backup At Lock' = $ABkjob.ScheduleOptions.BackupAtLock + 'Backup At Target Connection' = $ABkjob.ScheduleOptions.BackupAtTargetConnection + 'Eject Storage After Backup' = $ABkjob.ScheduleOptions.EjectStorageAfterBackup 'Backup Timeout' = Switch ([string]::IsNullOrEmpty($ABkjob.ScheduleOptions.BackupTimeout)) { $true { '--' } $false { "$($ABkjob.ScheduleOptions.BackupTimeout) $($ABkjob.ScheduleOptions.BackupTimeoutType)" } default { "Unknown" } } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Schedule Options - $($ABkjob.Name)" diff --git a/Src/Private/Get-AbrVbrBackupCopyjob .ps1 b/Src/Private/Get-AbrVbrBackupCopyjob .ps1 index d824510..56b4656 100644 --- a/Src/Private/Get-AbrVbrBackupCopyjob .ps1 +++ b/Src/Private/Get-AbrVbrBackupCopyjob .ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrBackupCopyjob { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -44,7 +44,7 @@ function Get-AbrVbrBackupCopyjob { 'Latest Result' = $BkCopyjob.LastResult 'Scheduled?' = $BkCopyjob.ScheduleOptions.Type } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Backup Copy Jobs $($BkCopyjob.Name) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrBackupCopyjobConf.ps1 b/Src/Private/Get-AbrVbrBackupCopyjobConf.ps1 index 1cdcba4..e5d1e2c 100644 --- a/Src/Private/Get-AbrVbrBackupCopyjobConf.ps1 +++ b/Src/Private/Get-AbrVbrBackupCopyjobConf.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrBackupCopyjobConf { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -46,12 +46,12 @@ function Get-AbrVbrBackupCopyjobConf { 'Copy Mode' = $Bkjob.Mode 'Last Result' = $Bkjob.LastResult 'Status' = $Bkjob.LastState - 'Next Run' = ConvertTo-EmptyToFiller $Bkjob.NextRun - 'Include database transaction log backup' = ConvertTo-TextYN $Bkjob.TransactionLogCopyEnabled - 'Description' = ConvertTo-EmptyToFiller $Bkjob.Description + 'Next Run' = $Bkjob.NextRun + 'Include database transaction log backup' = $Bkjob.TransactionLogCopyEnabled + 'Description' = $Bkjob.Description 'Modified By' = (Get-VBRJob -WarningAction SilentlyContinue -ErrorAction SilentlyContinue | Where-Object { $_.id -eq $Bkjob.Id }).Info.CommonInfo.ModifiedBy.FullName } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } @@ -101,7 +101,7 @@ function Get-AbrVbrBackupCopyjobConf { 'Size' = ConvertTo-FileSizeString -Size $LinkedBkJob.Info.IncludedSize 'Repository' = $LinkedBkJob.GetTargetRepository().Name } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } @@ -141,7 +141,7 @@ function Get-AbrVbrBackupCopyjobConf { 'Size' = ConvertTo-FileSizeString -Size $LinkedRepository.GetContainer().CachedTotalSpace.InBytesAsUInt64 } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } @@ -197,9 +197,9 @@ function Get-AbrVbrBackupCopyjobConf { } else { $inObj.add('Keep Yearly full backup for', ("$($Bkjob.GFSOptions.YearlyOptions.RetentionPeriod) years,`r`nUse monthly full backup from the following month: $($Bkjob.GFSOptions.YearlyOptions.SelectedMonth)")) } - $inObj.add('Read the entire RestorePoint fromSource Backup', (ConvertTo-TextYN $Bkjob.GFSOptions.ReadEntireRestorePoint)) + $inObj.add('Read the entire RestorePoint fromSource Backup', ($Bkjob.GFSOptions.ReadEntireRestorePoint)) } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Target Options - $($Bkjob.Name)" @@ -216,7 +216,7 @@ function Get-AbrVbrBackupCopyjobConf { try { Write-PScriboMessage "Discovered $($Bkjob.Name) maintenance options." $inObj = [ordered] @{ - 'Storage-Level Corruption Guard (SLCG)' = ConvertTo-TextYN $Bkjob.HealthCheckOptions.Enabled + 'Storage-Level Corruption Guard (SLCG)' = $Bkjob.HealthCheckOptions.Enabled 'SLCG Schedule Type' = $Bkjob.HealthCheckOptions.ScheduleType } @@ -228,7 +228,7 @@ function Get-AbrVbrBackupCopyjobConf { } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Storage-Level Corruption Guard (SLCG)' -eq "No" } | Set-Style -Style Warning -Property 'Storage-Level Corruption Guard (SLCG)' @@ -265,12 +265,12 @@ function Get-AbrVbrBackupCopyjobConf { try { Write-PScriboMessage "Discovered $($Bkjob.Name) storage options." $inObj = [ordered] @{ - 'Inline Data Deduplication' = ConvertTo-TextYN $Bkjob.StorageOptions.DataDeduplicationEnabled + 'Inline Data Deduplication' = $Bkjob.StorageOptions.DataDeduplicationEnabled 'Compression Level' = $Bkjob.StorageOptions.CompressionLevel - 'Enabled Backup File Encryption' = ConvertTo-TextYN $Bkjob.StorageOptions.EncryptionEnabled - 'Encryption Key' = ConvertTo-EmptyToFiller $Bkjob.StorageOptions.EncryptionKey.Description + 'Enabled Backup File Encryption' = $Bkjob.StorageOptions.EncryptionEnabled + 'Encryption Key' = $Bkjob.StorageOptions.EncryptionKey.Description } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Enabled Backup File Encryption' -eq 'No' } | Set-Style -Style Warning -Property 'Enabled Backup File Encryption' @@ -311,11 +311,11 @@ function Get-AbrVbrBackupCopyjobConf { $BackupLogJob = $Bkjob.RpoWarningOptions | Where-Object { $_.RpoType -eq 'BackupLogJob' } $inObj = [ordered] @{ - 'Alert me when new backup is not copied within' = "$($BackupJob.Value) $($BackupJob.TimeUnit)`r`nEnable:$(ConvertTo-TextYN $BackupJob.EnableRpoWarning)" - 'Alert me when new log backup is not copied within' = "$($BackupLogJob.Value) $($BackupLogJob.TimeUnit)`r`nEnabled:$(ConvertTo-TextYN $BackupLogJob.EnableRpoWarning)" + 'Alert me when new backup is not copied within' = "$($BackupJob.Value) $($BackupJob.TimeUnit)`r`nEnable:$($BackupJob.EnableRpoWarning)" + 'Alert me when new log backup is not copied within' = "$($BackupLogJob.Value) $($BackupLogJob.TimeUnit)`r`nEnabled:$($BackupLogJob.EnableRpoWarning)" } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (RPO Monitor) - $($Bkjob.Name)" @@ -338,25 +338,25 @@ function Get-AbrVbrBackupCopyjobConf { try { Write-PScriboMessage "Discovered $($Bkjob.Name) notification options." $inObj = [ordered] @{ - 'Send Snmp Notification' = ConvertTo-TextYN $Bkjob.NotificationOptions.EnableSnmpNotification - 'Send Email Notification' = ConvertTo-TextYN $Bkjob.NotificationOptions.EnableAdditionalNotification + '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' = ConvertTo-TextYN $Bkjob.NotificationOptions.UseNotificationOptions + 'Use Custom Email Notification Options' = $Bkjob.NotificationOptions.UseNotificationOptions 'Use Custom Notification Setting' = $Bkjob.NotificationOptions.NotificationSubject - 'Notify On Success' = ConvertTo-TextYN $Bkjob.NotificationOptions.NotifyOnSuccess - 'Notify On Warning' = ConvertTo-TextYN $Bkjob.NotificationOptions.NotifyOnWarning - 'Notify On Error' = ConvertTo-TextYN $Bkjob.NotificationOptions.NotifyOnError + '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]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Notification) - $($Bkjob.Name)" @@ -386,15 +386,15 @@ function Get-AbrVbrBackupCopyjobConf { } Write-PScriboMessage "Discovered $($Bkjob.Name) script options." $inObj = [ordered] @{ - 'Run the Following Script Before' = ConvertTo-TextYN $Bkjob.ScriptOptions.PreScriptEnabled - 'Run Script Before the Job' = ConvertTo-EmptyToFiller $Bkjob.ScriptOptions.PreCommand - 'Run the Following Script After' = ConvertTo-TextYN $Bkjob.ScriptOptions.PostScriptEnabled - 'Run Script After the Job' = ConvertTo-EmptyToFiller $Bkjob.ScriptOptions.PostCommand + 'Run the Following Script Before' = $Bkjob.ScriptOptions.PreScriptEnabled + 'Run Script Before the Job' = $Bkjob.ScriptOptions.PreCommand + 'Run the Following Script After' = $Bkjob.ScriptOptions.PostScriptEnabled + 'Run Script After the Job' = $Bkjob.ScriptOptions.PostCommand 'Run Script Frequency' = $Bkjob.ScriptOptions.Periodicity $FrequencyText = $FrequencyValue } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Script) - $($Bkjob.Name)" @@ -425,10 +425,10 @@ function Get-AbrVbrBackupCopyjobConf { 'Direct' { 'No' } default { 'Unkwnown' } } - 'Source Wan accelerator' = ConvertTo-EmptyToFiller $Bkjob.SourceAccelerator.Name - 'Target Wan accelerator' = ConvertTo-EmptyToFiller $Bkjob.TargetAccelerator.Name + 'Source Wan accelerator' = $Bkjob.SourceAccelerator.Name + 'Target Wan accelerator' = $Bkjob.TargetAccelerator.Name } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } @@ -465,14 +465,14 @@ function Get-AbrVbrBackupCopyjobConf { $Schedule = "After Job: $($BKjob.ScheduleOptions.Job.Name)" } $inObj = [ordered] @{ - 'Retry Failed Enabled?' = ConvertTo-TextYN $Bkjob.ScheduleOptions.RetryEnabled + 'Retry Failed Enabled?' = $Bkjob.ScheduleOptions.RetryEnabled 'Retry Failed item processing' = $Bkjob.ScheduleOptions.RetryCount 'Wait before each retry' = "$($Bkjob.ScheduleOptions.RetryTimeout)/min" - 'Backup Window' = ConvertTo-TextYN $Bkjob.ScheduleOptions.BackupTerminationWindowEnabled + 'Backup Window' = $Bkjob.ScheduleOptions.BackupTerminationWindowEnabled 'Shedule type' = $ScheduleType 'Shedule Options' = $Schedule } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Schedule Options - $($Bkjob.Name)" @@ -534,14 +534,14 @@ function Get-AbrVbrBackupCopyjobConf { try { Write-PScriboMessage "Discovered $($Bkjob.Name) schedule options." $inObj = [ordered] @{ - 'Retry Failed Enabled?' = ConvertTo-TextYN $Bkjob.ScheduleOptions.RetryEnabled + 'Retry Failed Enabled?' = $Bkjob.ScheduleOptions.RetryEnabled 'Retry Failed item processing' = $Bkjob.ScheduleOptions.RetryCount 'Wait before each retry' = "$($Bkjob.ScheduleOptions.RetryTimeout)/min" - 'Backup Window' = ConvertTo-TextYN $Bkjob.ScheduleOptions.BackupTerminationWindowEnabled + 'Backup Window' = $Bkjob.ScheduleOptions.BackupTerminationWindowEnabled 'Shedule type' = $Bkjob.ScheduleOptions.Type 'Shedule Options' = "Continuously" } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Schedule Options - $($Bkjob.Name)" diff --git a/Src/Private/Get-AbrVbrBackupJobsRP.ps1 b/Src/Private/Get-AbrVbrBackupJobsRP.ps1 index 63b1606..3063503 100644 --- a/Src/Private/Get-AbrVbrBackupJobsRP.ps1 +++ b/Src/Private/Get-AbrVbrBackupJobsRP.ps1 @@ -5,7 +5,7 @@ function Get-AbrVbrBackupJobsRP { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -48,7 +48,7 @@ function Get-AbrVbrBackupJobsRP { 'Compress Ratio' = [Math]::Round($CompressRatio, 2) 'Reduction' = [Math]::Round(($DedupRatio * $CompressRatio), 2) } - $RestorePointInfo += [PSCustomObject]$InObj + $RestorePointInfo += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Restore Point table: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrBackupProxy.ps1 b/Src/Private/Get-AbrVbrBackupProxy.ps1 index afb9b10..0631eae 100644 --- a/Src/Private/Get-AbrVbrBackupProxy.ps1 +++ b/Src/Private/Get-AbrVbrBackupProxy.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrBackupProxy { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -43,14 +43,14 @@ function Get-AbrVbrBackupProxy { 'Name' = $BackupProxy.Name 'Type' = $BackupProxy.Type 'Max Tasks Count' = $BackupProxy.MaxTasksCount - 'Disabled' = ConvertTo-TextYN $BackupProxy.IsDisabled + 'Disabled' = $BackupProxy.IsDisabled 'Status' = Switch (($BackupProxy.Host).IsUnavailable) { 'False' { 'Available' } 'True' { 'Unavailable' } default { ($BackupProxy.Host).IsUnavailable } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } if ($HealthCheck.Infrastructure.Proxy) { @@ -75,21 +75,21 @@ function Get-AbrVbrBackupProxy { 'Name' = $BackupProxy.Name 'Host Name' = $BackupProxy.Host.Name 'Type' = $BackupProxy.Type - 'Disabled' = ConvertTo-TextYN $BackupProxy.IsDisabled + 'Disabled' = $BackupProxy.IsDisabled 'Max Tasks Count' = $BackupProxy.MaxTasksCount - 'Use Ssl' = ConvertTo-TextYN $BackupProxy.UseSsl - 'Failover To Network' = ConvertTo-TextYN $BackupProxy.FailoverToNetwork + 'Use Ssl' = $BackupProxy.UseSsl + 'Failover To Network' = $BackupProxy.FailoverToNetwork 'Transport Mode' = $BackupProxy.TransportMode 'Chassis Type' = $BackupProxy.ChassisType 'OS Type' = $BackupProxy.Host.Type - 'Services Credential' = ConvertTo-EmptyToFiller $BackupProxy.Host.ProxyServicesCreds.Name + 'Services Credential' = $BackupProxy.Host.ProxyServicesCreds.Name 'Status' = Switch (($BackupProxy.Host).IsUnavailable) { 'False' { 'Available' } 'True' { 'Unavailable' } default { ($BackupProxy.Host).IsUnavailable } } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.Proxy) { $OutObj | Where-Object { $_.'Status' -eq 'Unavailable' } | Set-Style -Style Warning -Property 'Status' @@ -161,7 +161,7 @@ function Get-AbrVbrBackupProxy { 'Number of Logical Cores' = $HWCPU[0].NumberOfLogicalProcessors 'Physical Memory (GB)' = ConvertTo-FileSizeString -Size $HW.CsTotalPhysicalMemory } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.Server) { $OutObj | Where-Object { $_.'Number of CPU Cores' -lt 4 } | Set-Style -Style Warning -Property 'Number of CPU Cores' @@ -372,7 +372,7 @@ function Get-AbrVbrBackupProxy { Write-PScriboMessage -IsWarning "VMware Backup Proxies Section: $($_.Exception.Message)" } } else { - Write-PScriboMessage -IsWarning "VMware Backup Proxies Section: Unable to connect to $($BackupProxies.Host.Name) throuth WinRM, disabling section" + Write-PScriboMessage -IsWarning "VMware Backup Proxies Section: Unable to connect to $($BackupProxies.Host.Name) throuth WinRM, removing server from Hardware Inventory section" } } if ($vSphereVBProxyObj) { @@ -421,7 +421,7 @@ function Get-AbrVbrBackupProxy { 'Short Name' = $Service.Name 'Status' = $Service.Status } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } if ($HealthCheck.Infrastructure.Server) { @@ -444,7 +444,7 @@ function Get-AbrVbrBackupProxy { Write-PScriboMessage -IsWarning "VMware Backup Proxies $($BackupProxy.Host.Name) Services Status Section: $($_.Exception.Message)" } } else { - Write-PScriboMessage -IsWarning "VMware Backup Proxies Section: Unable to connect to $($BackupProxies.Host.Name) throuth WinRM, disabling section" + Write-PScriboMessage -IsWarning "VMware Backup Proxies Section: Unable to connect to $($BackupProxies.Host.Name) throuth WinRM, removing server from Veeam Services section" } } } @@ -490,14 +490,14 @@ function Get-AbrVbrBackupProxy { 'Name' = $BackupProxy.Name 'Type' = $BackupProxy.Type 'Max Tasks Count' = $BackupProxy.MaxTasksCount - 'Disabled' = ConvertTo-TextYN $BackupProxy.IsDisabled + 'Disabled' = $BackupProxy.IsDisabled 'Status' = Switch (($BackupProxy.Host).IsUnavailable) { 'False' { 'Available' } 'True' { 'Unavailable' } default { ($BackupProxy.Host).IsUnavailable } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Hyper-V Backup Proxies $($BackupProxy.Name) Section: $($_.Exception.Message)" } @@ -528,18 +528,18 @@ function Get-AbrVbrBackupProxy { 'Name' = $BackupProxy.Name 'Host Name' = $BackupProxy.Host.Name 'Type' = $BackupProxy.Type - 'Disabled' = ConvertTo-TextYN $BackupProxy.IsDisabled + 'Disabled' = $BackupProxy.IsDisabled 'Max Tasks Count' = $BackupProxy.MaxTasksCount - 'AutoDetect Volumes' = ConvertTo-TextYN $BackupProxy.Options.IsAutoDetectVolumes + 'AutoDetect Volumes' = $BackupProxy.Options.IsAutoDetectVolumes 'OS Type' = $BackupProxy.Host.Type - 'Services Credential' = ConvertTo-EmptyToFiller $BackupProxy.Host.ProxyServicesCreds.Name + 'Services Credential' = $BackupProxy.Host.ProxyServicesCreds.Name 'Status' = Switch (($BackupProxy.Host).IsUnavailable) { 'False' { 'Available' } 'True' { 'Unavailable' } default { ($BackupProxy.Host).IsUnavailable } } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.Proxy) { $OutObj | Where-Object { $_.'Status' -eq 'Unavailable' } | Set-Style -Style Warning -Property 'Status' @@ -613,7 +613,7 @@ function Get-AbrVbrBackupProxy { 'Number of Logical Cores' = $HWCPU[0].NumberOfLogicalProcessors 'Physical Memory (GB)' = ConvertTo-FileSizeString -Size $HW.CsTotalPhysicalMemory } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.Server) { $OutObj | Where-Object { $_.'Number of CPU Cores' -lt 4 } | Set-Style -Style Warning -Property 'Number of CPU Cores' @@ -827,7 +827,7 @@ function Get-AbrVbrBackupProxy { Write-PScriboMessage -IsWarning "Hyper-V Backup Proxies Hardware & Software Inventory Section: $($_.Exception.Message)" } } else { - Write-PScriboMessage -IsWarning "Hyper-V Backup Proxies Section: Unable to connect to $($BackupProxies.Host.Name) throuth WinRM, disabling section" + Write-PScriboMessage -IsWarning "Hyper-V Backup Proxies Section: Unable to connect to $($BackupProxies.Host.Name) throuth WinRM, removing server from Hardware Inventory section" } } if ($HyperVBProxyObj) { @@ -875,7 +875,7 @@ function Get-AbrVbrBackupProxy { 'Short Name' = $Service.Name 'Status' = $Service.Status } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } if ($HealthCheck.Infrastructure.Server) { @@ -898,7 +898,7 @@ function Get-AbrVbrBackupProxy { Write-PScriboMessage -IsWarning "Hyper-V Backup Proxies Services Status - $($BackupProxy.Host.Name.Split(".")[0]) Section: $($_.Exception.Message)" } } else { - Write-PScriboMessage -IsWarning "Hyper-V Backup Proxies Section: Unable to connect to $($BackupProxies.Host.Name) throuth WinRM, disabling section" + Write-PScriboMessage -IsWarning "Hyper-V Backup Proxies Section: Unable to connect to $($BackupProxies.Host.Name) throuth WinRM, removing server from Veeam Services section" } } } diff --git a/Src/Private/Get-AbrVbrBackupRepository.ps1 b/Src/Private/Get-AbrVbrBackupRepository.ps1 index d28c53c..344c705 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.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -56,7 +56,7 @@ function Get-AbrVbrBackupRepository { default { $BackupRepo.IsUnavailable } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } } catch { Write-PScriboMessage -IsWarning "Backup Repository Section: $($_.Exception.Message)" @@ -212,29 +212,29 @@ function Get-AbrVbrBackupRepository { $false { $BackupRepo.Options.MaxTaskCount } default { 'Unknown' } } - 'Use Nfs On Mount Host' = ConvertTo-TextYN $BackupRepo.UseNfsOnMountHost - 'San Snapshot Only' = ConvertTo-TextYN $BackupRepo.IsSanSnapshotOnly - 'Dedup Storage' = ConvertTo-TextYN $BackupRepo.IsDedupStorage - 'Split Storages Per Vm' = ConvertTo-TextYN $BackupRepo.SplitStoragesPerVm - 'Immutability Supported' = ConvertTo-TextYN $BackupRepo.IsImmutabilitySupported - 'Immutability Enabled' = ConvertTo-TextYN $BackupRepo.GetImmutabilitySettings().IsEnabled + 'Use Nfs On Mount Host' = $BackupRepo.UseNfsOnMountHost + 'San Snapshot Only' = $BackupRepo.IsSanSnapshotOnly + 'Dedup Storage' = $BackupRepo.IsDedupStorage + 'Split Storages Per Vm' = $BackupRepo.SplitStoragesPerVm + 'Immutability Supported' = $BackupRepo.IsImmutabilitySupported + 'Immutability Enabled' = $BackupRepo.GetImmutabilitySettings().IsEnabled 'Immutability Interval' = $BackupRepo.GetImmutabilitySettings().IntervalDays 'Version Of Creation' = $BackupRepo.VersionOfCreation - 'Has Backup Chain Length Limitation' = ConvertTo-TextYN $BackupRepo.HasBackupChainLengthLimitation + 'Has Backup Chain Length Limitation' = $BackupRepo.HasBackupChainLengthLimitation } if ($null -eq $inObj.'Extent of ScaleOut Backup Repository') { $inObj.Remove('Extent of ScaleOut Backup Repository') } if ($BackupRepo.Type -in @('AmazonS3Compatible', 'WasabiS3')) { - $inObj.Add('Object Lock Enabled', (ConvertTo-TextYN $BackupRepo.ObjectLockEnabled)) + $inObj.Add('Object Lock Enabled', ($BackupRepo.ObjectLockEnabled)) } if ($BackupRepo.Type -in @('AmazonS3Compatible', 'WasabiS3')) { $inObj.Add('Mount Server', (Get-VBRServer | Where-Object { $_.id -eq $BackupRepo.MountHostId.Guid }).Name) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.BR) { $OutObj | Where-Object { $_.'Immutability Supported' -eq 'Yes' } | Set-Style -Style OK -Property 'Immutability Supported' diff --git a/Src/Private/Get-AbrVbrBackupServerCertificate.ps1 b/Src/Private/Get-AbrVbrBackupServerCertificate.ps1 index 5f0ce4d..7f20274 100644 --- a/Src/Private/Get-AbrVbrBackupServerCertificate.ps1 +++ b/Src/Private/Get-AbrVbrBackupServerCertificate.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrBackupServerCertificate { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -40,7 +40,7 @@ function Get-AbrVbrBackupServerCertificate { 'Thumbprint' = $TLSSettings.Thumbprint 'Serial Number' = $TLSSettings.SerialNumber } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } } catch { Write-PScriboMessage -IsWarning "Backup Server TLS Certificate Section: $($_.Exception.Message)" diff --git a/Src/Private/Get-AbrVbrBackupServerInfo.ps1 b/Src/Private/Get-AbrVbrBackupServerInfo.ps1 index fa60832..5fae871 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.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -59,7 +59,7 @@ function Get-AbrVbrBackupServerInfo { } else { Write-PScriboMessage -IsWarning "Backup Server Section: Unable to connect to Backup Server throuth WinRM" } $inObj = [ordered] @{ 'Server Name' = $BackupServer.Name - 'Is Domain Joined?' = ConvertTo-TextYN $DomainJoined.PartOfDomain + 'Is Domain Joined?' = $DomainJoined.PartOfDomain 'Version' = Switch (($VeeamVersion).count) { 0 { "--" } default { $VeeamVersion.DisplayVersion } @@ -88,7 +88,7 @@ function Get-AbrVbrBackupServerInfo { default { $VeeamInfo.CorePath } } 'Audit Logs Path' = $SecurityOptions.AuditLogsPath - 'Compress Old Audit Logs' = ConvertTo-TextYN $SecurityOptions.CompressOldAuditLogs + 'Compress Old Audit Logs' = $SecurityOptions.CompressOldAuditLogs 'Fips Compliant Mode' = Switch ($SecurityOptions.FipsCompliantModeEnabled) { 'True' { "Enabled" } 'False' { "Disabled" } @@ -105,7 +105,7 @@ function Get-AbrVbrBackupServerInfo { $inObj.add('Log Directory', ($VeeamInfo.LogDirectory)) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } } catch { Write-PScriboMessage -IsWarning "Backup Server Section: $($_.Exception.Message)" @@ -177,7 +177,7 @@ function Get-AbrVbrBackupServerInfo { 'Number of Logical Cores' = ($HWCPU.NumberOfLogicalProcessors | Measure-Object -Sum).Sum 'Physical Memory (GB)' = ConvertTo-FileSizeString -Size $HW.CsTotalPhysicalMemory } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.Server) { $OutObj | Where-Object { $_.'Number of CPU Cores' -lt 2 } | Set-Style -Style Warning -Property 'Number of CPU Cores' @@ -447,7 +447,7 @@ function Get-AbrVbrBackupServerInfo { } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } } @@ -492,7 +492,7 @@ function Get-AbrVbrBackupServerInfo { 'Short Name' = $Service.Name 'Status' = $Service.Status } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } if ($HealthCheck.Infrastructure.Server) { @@ -528,7 +528,7 @@ function Get-AbrVbrBackupServerInfo { 'KB Article' = "KB$($Update.KBArticleIDs)" 'Name' = $Update.Title } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.OperatingSystem.Updates) { $OutObj | Set-Style -Style Warning diff --git a/Src/Private/Get-AbrVbrBackupToTape.ps1 b/Src/Private/Get-AbrVbrBackupToTape.ps1 index 96accad..5fe7bd0 100644 --- a/Src/Private/Get-AbrVbrBackupToTape.ps1 +++ b/Src/Private/Get-AbrVbrBackupToTape.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrBackupToTape { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -51,9 +51,9 @@ function Get-AbrVbrBackupToTape { 'False' { 'Disabled' } default { $TBkjob.NextRun } } - 'Description' = ConvertTo-EmptyToFiller $TBkjob.Description + 'Description' = $TBkjob.Description } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Description' -eq "--" } | Set-Style -Style Warning -Property 'Description' @@ -108,7 +108,7 @@ function Get-AbrVbrBackupToTape { 'Size' = $TotalBackupSize 'Repository' = $Repository } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Backups Objects - $($TBkjob.Name) Section: $($_.Exception.Message)" } @@ -193,14 +193,14 @@ function Get-AbrVbrBackupToTape { 'Pool Type' = $BackupMediaPool.Type 'Tape Count' = (Get-VBRTapeMedium -MediaPool $BackupMediaPool.Name).count 'Free Space' = ConvertTo-FileSizeString -Size ((Get-VBRTapeMedium -MediaPool $BackupMediaPool.Name).Free | Measure-Object -Sum).Sum - 'Encryption Enabled' = ConvertTo-TextYN $BackupMediaPool.EncryptionOptions.Enabled + 'Encryption Enabled' = $BackupMediaPool.EncryptionOptions.Enabled 'Encryption Key' = Switch ($BackupMediaPool.EncryptionOptions.Enabled) { 'True' { (Get-VBREncryptionKey | Where-Object { $_.Id -eq $BackupMediaPool.EncryptionOptions.Key.Id }).Description } 'False' { 'Disabled' } default { $BackupMediaPool.EncryptionOptions.Key.Id } } - 'Parallel Processing' = "$(ConvertTo-TextYN $BackupMediaPool.MultiStreamingOptions.NumberOfStreams) drives; Multiple Backup Chains: $(ConvertTo-TextYN $BackupMediaPool.MultiStreamingOptions.SplitJobFilesBetweenDrives)" - 'Is WORM' = ConvertTo-TextYN $BackupMediaPool.Worm + 'Parallel Processing' = "$($BackupMediaPool.MultiStreamingOptions.NumberOfStreams) drives; Multiple Backup Chains: $($BackupMediaPool.MultiStreamingOptions.SplitJobFilesBetweenDrives)" + 'Is WORM' = $BackupMediaPool.Worm } if ($BackupMediaPool.Type -eq "Gfs") { $inObj.add('Daily', ("$($TBkjob.FullBackupMediaPool.DailyMediaSetOptions.OverwritePeriod) days; $MoveFromMediaPoolAutomatically; $AppendToCurrentTape; $MoveOfflineToVault")) @@ -227,7 +227,7 @@ function Get-AbrVbrBackupToTape { 'Never' { 'Do not create, always continue using current media set' } } $inObj.add('Retention', ($Retention)) - $inObj.add('Export to Vault', (ConvertTo-TextYN $TBkjob.FullBackupMediaPool.MoveOfflineToVault)) + $inObj.add('Export to Vault', ($TBkjob.FullBackupMediaPool.MoveOfflineToVault)) $inObj.add('Vault', ($Vault)) $inObj.add('Media Set Name', ($TBkjob.FullBackupMediaPool.MediaSetName)) $inObj.add('Automatically create new media set', ($MediaSetPolicy)) @@ -248,7 +248,7 @@ function Get-AbrVbrBackupToTape { $inObj.add('Full Backup Schedule', ("Monthly on: $($TBkjob.FullBackupPolicy.MonthlyOptions.DayNumberInMonth), $($TBkjob.FullBackupPolicy.MonthlyOptions.DayOfWeek) of $Months")) } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Media Pool - $($TBkjob.Name) Section: $($_.Exception.Message)" } @@ -333,14 +333,14 @@ function Get-AbrVbrBackupToTape { 'Pool Type' = $BackupMediaPool.Type 'Tape Count' = (Get-VBRTapeMedium -MediaPool $BackupMediaPool.Name).count 'Free Space' = ConvertTo-FileSizeString -Size ((Get-VBRTapeMedium -MediaPool $BackupMediaPool.Name).Free | Measure-Object -Sum).Sum - 'Encryption Enabled' = ConvertTo-TextYN $BackupMediaPool.EncryptionOptions.Enabled + 'Encryption Enabled' = $BackupMediaPool.EncryptionOptions.Enabled 'Encryption Key' = Switch ($BackupMediaPool.EncryptionOptions.Enabled) { 'True' { (Get-VBREncryptionKey | Where-Object { $_.Id -eq $BackupMediaPool.EncryptionOptions.Key.Id }).Description } 'False' { 'Disabled' } default { $BackupMediaPool.EncryptionOptions.Key.Id } } - 'Parallel Processing' = "$(ConvertTo-TextYN $BackupMediaPool.MultiStreamingOptions.NumberOfStreams) drives; Multiple Backup Chains: $(ConvertTo-TextYN $BackupMediaPool.MultiStreamingOptions.SplitJobFilesBetweenDrives)" - 'Is WORM' = ConvertTo-TextYN $BackupMediaPool.Worm + 'Parallel Processing' = "$($BackupMediaPool.MultiStreamingOptions.NumberOfStreams) drives; Multiple Backup Chains: $($BackupMediaPool.MultiStreamingOptions.SplitJobFilesBetweenDrives)" + 'Is WORM' = $BackupMediaPool.Worm } if ($BackupMediaPool.Type -eq "Gfs") { $inObj.add('Daily', ("$($TBkjob.IncrementalBackupMediaPool.DailyMediaSetOptions.OverwritePeriod) days; $MoveFromMediaPoolAutomatically; $AppendToCurrentTape; $MoveOfflineToVault")) @@ -367,7 +367,7 @@ function Get-AbrVbrBackupToTape { 'Never' { 'Do not create, always continue using current media set' } } $inObj.add('Retention', ($Retention)) - $inObj.add('Export to Vault', (ConvertTo-TextYN $TBkjob.IncrementalBackupMediaPool.MoveOfflineToVault)) + $inObj.add('Export to Vault', ($TBkjob.IncrementalBackupMediaPool.MoveOfflineToVault)) $inObj.add('Vault', ($Vault)) $inObj.add('Media Set Name', ($TBkjob.IncrementalBackupMediaPool.MediaSetName)) $inObj.add('Automatically create new media set', ($MediaSetPolicy)) @@ -375,7 +375,7 @@ function Get-AbrVbrBackupToTape { $inObj.add('On these days', ($TBkjob.IncrementalBackupMediaPool.MediaSetCreationPolicy.DailyOptions.DayOfWeek -join ", ")) } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Incremental Backup - $($TBkjob.Name) Section: $($_.Exception.Message)" } @@ -401,12 +401,12 @@ function Get-AbrVbrBackupToTape { try { Write-PScriboMessage "Discovered $($TBkjob.Name) options." $inObj = [ordered] @{ - 'Eject Tape Media Upon Job Completion' = ConvertTo-TextYN $TBkjob.EjectCurrentMedium - 'Export the following MediaSet Upon Job Completion' = ConvertTo-TextYN $TBkjob.ExportCurrentMediaSet - 'Limit the number of drives this job can use' = "Enabled: $(ConvertTo-TextYN $TBkjob.ParallelDriveOptions.IsEnabled); Tape Drives Limit: $($TBkjob.ParallelDriveOptions.DrivesLimit)" + 'Eject Tape Media Upon Job Completion' = $TBkjob.EjectCurrentMedium + 'Export the following MediaSet Upon Job Completion' = $TBkjob.ExportCurrentMediaSet + 'Limit the number of drives this job can use' = "Enabled: $($TBkjob.ParallelDriveOptions.IsEnabled); Tape Drives Limit: $($TBkjob.ParallelDriveOptions.DrivesLimit)" } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Options - $($TBkjob.Name) Section: $($_.Exception.Message)" } @@ -427,21 +427,21 @@ function Get-AbrVbrBackupToTape { try { Write-PScriboMessage "Discovered $($TBkjob.Name) notification options." $inObj = [ordered] @{ - 'Send Email Notification' = ConvertTo-TextYN $TBkjob.NotificationOptions.EnableAdditionalNotification + 'Send Email Notification' = $TBkjob.NotificationOptions.EnableAdditionalNotification 'Email Notification Additional Recipients' = $TBkjob.NotificationOptions.AdditionalAddress -join "," } if (!$TBkjob.NotificationOptions.UseNotificationOptions) { - $inObj.add('Use Global Notification Settings', (ConvertTo-TextYN $TBkjob.NotificationOptions.UseNotificationOptions)) + $inObj.add('Use Global Notification Settings', ($TBkjob.NotificationOptions.UseNotificationOptions)) } elseif ($TBkjob.NotificationOptions.UseNotificationOptions) { $inObj.add('Use Custom Notification Settings', ('Yes')) $inObj.add('Subject', ($TBkjob.NotificationOptions.NotificationSubject)) - $inObj.add('Notify On Success', (ConvertTo-TextYN $TBkjob.NotificationOptions.NotifyOnSuccess)) - $inObj.add('Notify On Warning', (ConvertTo-TextYN $TBkjob.NotificationOptions.NotifyOnWarning)) - $inObj.add('Notify On Error', (ConvertTo-TextYN $TBkjob.NotificationOptions.NotifyOnError)) - $inObj.add('Notify On Last Retry Only', (ConvertTo-TextYN $TBkjob.NotificationOptions.NotifyOnLastRetryOnly)) - $inObj.add('Notify When Waiting For Tape', (ConvertTo-TextYN $TBkjob.NotificationOptions.NotifyWhenWaitingForTape)) + $inObj.add('Notify On Success', ($TBkjob.NotificationOptions.NotifyOnSuccess)) + $inObj.add('Notify On Warning', ($TBkjob.NotificationOptions.NotifyOnWarning)) + $inObj.add('Notify On Error', ($TBkjob.NotificationOptions.NotifyOnError)) + $inObj.add('Notify On Last Retry Only', ($TBkjob.NotificationOptions.NotifyOnLastRetryOnly)) + $inObj.add('Notify When Waiting For Tape', ($TBkjob.NotificationOptions.NotifyWhenWaitingForTape)) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Advanced Settings (Notifications) - $($TBkjob.Name) Section: $($_.Exception.Message)" } @@ -467,16 +467,16 @@ function Get-AbrVbrBackupToTape { try { Write-PScriboMessage "Discovered $($TBkjob.Name) advanced options." $inObj = [ordered] @{ - 'Process the most recent Restore Point instead of waiting' = ConvertTo-TextYN $TBkjob.AlwaysCopyFromLatestFull - 'Use Hardware Compression when available' = ConvertTo-TextYN $TBkjob.UseHardwareCompression + 'Process the most recent Restore Point instead of waiting' = $TBkjob.AlwaysCopyFromLatestFull + 'Use Hardware Compression when available' = $TBkjob.UseHardwareCompression } if (!$TBkjob.JobScriptOptions.PreScriptEnabled) { - $inObj.add('Pre Job Script Enabled', (ConvertTo-TextYN $TBkjob.JobScriptOptions.PreScriptEnabled)) + $inObj.add('Pre Job Script Enabled', ($TBkjob.JobScriptOptions.PreScriptEnabled)) } elseif ($TBkjob.JobScriptOptions.PreScriptEnabled) { $inObj.add('Run the following script before job', ($TBkjob.JobScriptOptions.PreCommand)) } if (!$TBkjob.JobScriptOptions.PostScriptEnabled) { - $inObj.add('Post Job Script Enabled', (ConvertTo-TextYN $TBkjob.JobScriptOptions.PostScriptEnabled)) + $inObj.add('Post Job Script Enabled', ($TBkjob.JobScriptOptions.PostScriptEnabled)) } elseif ($TBkjob.JobScriptOptions.PostScriptEnabled) { $inObj.add('Run the following script after job', ($TBkjob.JobScriptOptions.PostCommand)) } @@ -490,7 +490,7 @@ function Get-AbrVbrBackupToTape { } $inObj.add($FrequencyText, ($FrequencyValue)) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Advanced Settings (Advanced) - $($TBkjob.Name) Section: $($_.Exception.Message)" } @@ -519,7 +519,7 @@ function Get-AbrVbrBackupToTape { try { Write-PScriboMessage "Discovered $($TBkjob.Name) schedule options." $inObj = [ordered] @{ - 'Prevent this job from being interrupted by source backup job' = ConvertTo-TextYN $TBkjob.WaitForBackupJobs + 'Prevent this job from being interrupted by source backup job' = $TBkjob.WaitForBackupJobs } if ($TBkjob.GFSScheduleOptions) { @@ -554,7 +554,7 @@ function Get-AbrVbrBackupToTape { $inObj.add('Wait for Backup Job', ("$($TBkjob.WaitPeriod.ToString()) hours")) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Schedule - $($TBkjob.Name) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrBackupjob.ps1 b/Src/Private/Get-AbrVbrBackupjob.ps1 index 6575afe..0cad8d9 100644 --- a/Src/Private/Get-AbrVbrBackupjob.ps1 +++ b/Src/Private/Get-AbrVbrBackupjob.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrBackupjob { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -44,7 +44,7 @@ function Get-AbrVbrBackupjob { default { 'Unknown' } } } - $OutObj += [pscustomobject]$inObj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Backup Jobs Section: $($_.Exception.Message)" } @@ -142,7 +142,7 @@ function Get-AbrVbrBackupjob { # default { 'Unknown' } # } # } - # $OutObj += [pscustomobject]$inObj + # $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) # } catch { # Write-PScriboMessage -IsWarning "Backup Jobs $($Bkjob.Name) Time Table: $($_.Exception.Message)" # } diff --git a/Src/Private/Get-AbrVbrBackupjobHyperV.ps1 b/Src/Private/Get-AbrVbrBackupjobHyperV.ps1 index 4688b9a..6c0ed40 100644 --- a/Src/Private/Get-AbrVbrBackupjobHyperV.ps1 +++ b/Src/Private/Get-AbrVbrBackupjobHyperV.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrBackupjobHyperV { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -41,7 +41,7 @@ function Get-AbrVbrBackupjobHyperV { 'Creation Time' = $VMcount.CreationTime 'VM Count' = $VMcount.VmCount } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Hyper-V Backup Jobs Configuration Section: $($_.Exception.Message)" } @@ -77,10 +77,10 @@ function Get-AbrVbrBackupjobHyperV { 'Total Backup Size' = ConvertTo-FileSizeString -Size $CommonInfo.IncludedSize 'Target Address' = $CommonInfo.TargetDir 'Target File' = $CommonInfo.TargetFile - 'Description' = ConvertTo-EmptyToFiller $CommonInfo.CommonInfo.Description + 'Description' = $CommonInfo.CommonInfo.Description 'Modified By' = $CommonInfo.CommonInfo.ModifiedBy.FullName } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Hyper-V Backup Jobs Common Information Section: $($_.Exception.Message)" } @@ -129,7 +129,7 @@ function Get-AbrVbrBackupjobHyperV { 'Size' = ConvertTo-FileSizeString -Size $Job.Info.IncludedSize 'Repository' = $Job.GetTargetRepository().Name } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Hyper-V Backup Jobs Linked Backup Jobs Section: $($_.Exception.Message)" } @@ -168,7 +168,7 @@ function Get-AbrVbrBackupjobHyperV { } } $inObj = [ordered] @{ - 'Use Wan accelerator' = ConvertTo-TextYN $Bkjob.IsWanAcceleratorEnabled() + 'Use Wan accelerator' = $Bkjob.IsWanAcceleratorEnabled() 'Source Wan accelerator' = Switch ($Bkjob.IsWanAcceleratorEnabled()) { 'False' { 'Direct Mode' } 'True' { $SourceWanAccelerator } @@ -180,7 +180,7 @@ function Get-AbrVbrBackupjobHyperV { default { 'Unknown' } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Hyper-V Backup Jobs Data Transfer Section: $($_.Exception.Message)" } @@ -212,7 +212,7 @@ function Get-AbrVbrBackupjobHyperV { 'Approx Size' = $OBJ.ApproxSizeString 'Disk Filter Mode' = $OBJ.DiskFilterInfo.Mode } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } $TableParams = @{ @@ -256,24 +256,24 @@ function Get-AbrVbrBackupjobHyperV { } 'Retention Type' = $Bkjob.BackupStorageOptions.RetentionType $RetainString = $Retains - 'Keep First Full Backup' = ConvertTo-TextYN $Bkjob.BackupStorageOptions.KeepFirstFullBackup - 'Enable Full Backup' = ConvertTo-TextYN $Bkjob.BackupStorageOptions.EnableFullBackup - 'Integrity Checks' = ConvertTo-TextYN $Bkjob.BackupStorageOptions.EnableIntegrityChecks - 'Storage Encryption' = ConvertTo-TextYN $Bkjob.BackupStorageOptions.StorageEncryptionEnabled + 'Keep First Full Backup' = $Bkjob.BackupStorageOptions.KeepFirstFullBackup + 'Enable Full Backup' = $Bkjob.BackupStorageOptions.EnableFullBackup + 'Integrity Checks' = $Bkjob.BackupStorageOptions.EnableIntegrityChecks + 'Storage Encryption' = $Bkjob.BackupStorageOptions.StorageEncryptionEnabled 'Backup Mode' = Switch ($Bkjob.Options.BackupTargetOptions.Algorithm) { 'Syntethic' { "Reverse Incremental" } 'Increment' { 'Incremental' } } 'Active Full Backup Schedule Kind' = $Bkjob.Options.BackupTargetOptions.FullBackupScheduleKind 'Active Full Backup Days' = $Bkjob.Options.BackupTargetOptions.FullBackupDays - 'Transform Full To Syntethic' = ConvertTo-TextYN $Bkjob.Options.BackupTargetOptions.TransformFullToSyntethic - 'Transform Increments To Syntethic' = ConvertTo-TextYN $Bkjob.Options.BackupTargetOptions.TransformIncrementsToSyntethic + 'Transform Full To Syntethic' = $Bkjob.Options.BackupTargetOptions.TransformFullToSyntethic + 'Transform Increments To Syntethic' = $Bkjob.Options.BackupTargetOptions.TransformIncrementsToSyntethic 'Transform To Syntethic Days' = $Bkjob.Options.BackupTargetOptions.TransformToSyntethicDays } if ($Bkjob.Options.GfsPolicy.IsEnabled) { - $inObj.add('Keep certain full backup longer for archival purposes (GFS)', (ConvertTo-TextYN $Bkjob.Options.GfsPolicy.IsEnabled)) + $inObj.add('Keep certain full backup longer for archival purposes (GFS)', ($Bkjob.Options.GfsPolicy.IsEnabled)) if (-Not $Bkjob.Options.GfsPolicy.Weekly.IsEnabled) { $inObj.add('Keep Weekly full backup', ('Disabled')) } else { @@ -290,7 +290,7 @@ function Get-AbrVbrBackupjobHyperV { $inObj.add('Keep Yearly full backup for', ("$($Bkjob.Options.GfsPolicy.Yearly.KeepBackupsForNumberOfYears) years,`r`nUse monthly full backup from the following month: $($Bkjob.Options.GfsPolicy.Yearly.DesiredTime)")) } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "$Storage Options - $($Bkjob.Name)" @@ -307,17 +307,17 @@ function Get-AbrVbrBackupjobHyperV { try { Write-PScriboMessage "Discovered $($Bkjob.Name) maintenance options." $inObj = [ordered] @{ - 'Storage-Level Corruption Guard (SLCG)' = ConvertTo-TextYN $Bkjob.Options.GenerationPolicy.EnableRechek + 'Storage-Level Corruption Guard (SLCG)' = $Bkjob.Options.GenerationPolicy.EnableRechek 'SLCG Schedule Type' = $Bkjob.Options.GenerationPolicy.RecheckScheduleKind 'SLCG Schedule Day' = $Bkjob.Options.GenerationPolicy.RecheckDays 'SLCG Backup Monthly Schedule' = "Day Of Week: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayOfWeek)`r`nDay Number In Month: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayNumberInMonth)`r`nDay of Month: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayOfMonth)`r`nMonths: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.Months)" - 'Defragment and Compact Full Backup (DCFB)' = ConvertTo-TextYN $Bkjob.Options.GenerationPolicy.EnableCompactFull + 'Defragment and Compact Full Backup (DCFB)' = $Bkjob.Options.GenerationPolicy.EnableCompactFull 'DCFB Schedule Type' = $Bkjob.Options.GenerationPolicy.CompactFullBackupScheduleKind 'DCFB Schedule Day' = $Bkjob.Options.GenerationPolicy.CompactFullBackupDays 'DCFB Backup Monthly Schedule' = "Day Of Week: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.DayOfWeek)`r`nDay Number In Month: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.DayNumberInMonth)`r`nDay of Month: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.DayOfMonth)`r`nMonths: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.Months)" 'Remove deleted item data after' = $Bkjob.Options.BackupStorageOptions.RetainDays } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Storage-Level Corruption Guard (SLCG)' -eq "No" } | Set-Style -Style Warning -Property 'Storage-Level Corruption Guard (SLCG)' @@ -354,9 +354,9 @@ function Get-AbrVbrBackupjobHyperV { try { Write-PScriboMessage "Discovered $($Bkjob.Name) storage options." $inObj = [ordered] @{ - 'Inline Data Deduplication' = ConvertTo-TextYN $Bkjob.Options.BackupStorageOptions.EnableDeduplication - 'Exclude Swap Files Block' = ConvertTo-TextYN $Bkjob.HvSourceOptions.ExcludeSwapFile - 'Exclude Deleted Files Block' = ConvertTo-TextYN $Bkjob.HvSourceOptions.DirtyBlocksNullingEnabled + 'Inline Data Deduplication' = $Bkjob.Options.BackupStorageOptions.EnableDeduplication + 'Exclude Swap Files Block' = $Bkjob.HvSourceOptions.ExcludeSwapFile + 'Exclude Deleted Files Block' = $Bkjob.HvSourceOptions.DirtyBlocksNullingEnabled 'Compression Level' = Switch ($Bkjob.Options.BackupStorageOptions.CompressionLevel) { 0 { 'NONE' } -1 { 'AUTO' } @@ -372,13 +372,13 @@ function Get-AbrVbrBackupjobHyperV { 'KbBlockSize4096' { 'Local target (large blocks)' } default { $Bkjob.Options.BackupStorageOptions.StgBlockSize } } - 'Enabled Backup File Encryption' = ConvertTo-TextYN $Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled + 'Enabled Backup File Encryption' = $Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled 'Encryption Key' = Switch ($Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled) { $false { 'None' } default { (Get-VBREncryptionKey | Where-Object { $_.id -eq $Bkjob.Info.PwdKeyId }).Description } } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Enabled Backup File Encryption' -eq 'No' } | Set-Style -Style Warning -Property 'Enabled Backup File Encryption' @@ -417,21 +417,21 @@ function Get-AbrVbrBackupjobHyperV { try { Write-PScriboMessage "Discovered $($Bkjob.Name) notification options." $inObj = [ordered] @{ - 'Send Snmp Notification' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.SnmpNotification - 'Send Email Notification' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.SendEmailNotification2AdditionalAddresses + 'Send Snmp Notification' = $Bkjob.Options.NotificationOptions.SnmpNotification + 'Send Email Notification' = $Bkjob.Options.NotificationOptions.SendEmailNotification2AdditionalAddresses 'Email Notification Additional Addresses' = $Bkjob.Options.NotificationOptions.EmailNotificationAdditionalAddresses 'Email Notify Time' = $Bkjob.Options.NotificationOptions.EmailNotifyTime.ToShortTimeString() - 'Use Custom Email Notification Options' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.UseCustomEmailNotificationOptions + 'Use Custom Email Notification Options' = $Bkjob.Options.NotificationOptions.UseCustomEmailNotificationOptions 'Use Custom Notification Setting' = $Bkjob.Options.NotificationOptions.EmailNotificationSubject - 'Notify On Success' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnSuccess - 'Notify On Warning' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnWarning - 'Notify On Error' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnError - 'Suppress Notification until Last Retry' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnLastRetryOnly - 'Set Results To Vm Notes' = ConvertTo-TextYN $Bkjob.Options.HvSourceOptions.SetResultsToVmNotes + 'Notify On Success' = $Bkjob.Options.NotificationOptions.EmailNotifyOnSuccess + 'Notify On Warning' = $Bkjob.Options.NotificationOptions.EmailNotifyOnWarning + 'Notify On Error' = $Bkjob.Options.NotificationOptions.EmailNotifyOnError + 'Suppress Notification until Last Retry' = $Bkjob.Options.NotificationOptions.EmailNotifyOnLastRetryOnly + 'Set Results To Vm Notes' = $Bkjob.Options.HvSourceOptions.SetResultsToVmNotes 'VM Attribute Note Value' = $Bkjob.Options.HvSourceOptions.VmAttributeName - 'Append to Existing Attribute' = ConvertTo-TextYN $Bkjob.Options.HvSourceOptions.VmNotesAppend + 'Append to Existing Attribute' = $Bkjob.Options.HvSourceOptions.VmNotesAppend } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Notification) - $($Bkjob.Name)" @@ -453,12 +453,12 @@ function Get-AbrVbrBackupjobHyperV { try { Write-PScriboMessage "Discovered $($Bkjob.Name) Hyper-V options." $inObj = [ordered] @{ - 'Enable Hyper-V Guest Quiescence' = ConvertTo-TextYN $Bkjob.Options.HvSourceOptions.EnableHvQuiescence - 'Crash Consistent Backup' = ConvertTo-TextYN $Bkjob.Options.HvSourceOptions.CanDoCrashConsistent - 'Use Change Block Tracking' = ConvertTo-TextYN $Bkjob.Options.HvSourceOptions.UseChangeTracking - 'Volume Snapshot' = ConvertTo-TextYN $Bkjob.Options.HvSourceOptions.GroupSnapshotProcessing + 'Enable Hyper-V Guest Quiescence' = $Bkjob.Options.HvSourceOptions.EnableHvQuiescence + 'Crash Consistent Backup' = $Bkjob.Options.HvSourceOptions.CanDoCrashConsistent + 'Use Change Block Tracking' = $Bkjob.Options.HvSourceOptions.UseChangeTracking + 'Volume Snapshot' = $Bkjob.Options.HvSourceOptions.GroupSnapshotProcessing } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Hyper-V) - $($Bkjob.Name)" @@ -480,13 +480,13 @@ function Get-AbrVbrBackupjobHyperV { try { Write-PScriboMessage "Discovered $($Bkjob.Name) Integration options." $inObj = [ordered] @{ - 'Enable Backup from Storage Snapshots' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.UseSanSnapshots - 'Limit processed VM count per Storage Snapshot' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.MultipleStorageSnapshotEnabled + 'Enable Backup from Storage Snapshots' = $Bkjob.Options.SanIntegrationOptions.UseSanSnapshots + 'Limit processed VM count per Storage Snapshot' = $Bkjob.Options.SanIntegrationOptions.MultipleStorageSnapshotEnabled 'VM count per Storage Snapshot' = $Bkjob.Options.SanIntegrationOptions.MultipleStorageSnapshotVmsCount - 'Failover to Standard Backup' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.FailoverFromSan - 'Failover to Primary Storage Snapshot' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.Failover2StorageSnapshotBackup + 'Failover to Standard Backup' = $Bkjob.Options.SanIntegrationOptions.FailoverFromSan + 'Failover to Primary Storage Snapshot' = $Bkjob.Options.SanIntegrationOptions.Failover2StorageSnapshotBackup } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Integration) - $($Bkjob.Name)" @@ -515,15 +515,15 @@ function Get-AbrVbrBackupjobHyperV { } Write-PScriboMessage "Discovered $($Bkjob.Name) script options." $inObj = [ordered] @{ - 'Run the Following Script Before' = ConvertTo-TextYN $Bkjob.Options.JobScriptCommand.PreScriptEnabled + 'Run the Following Script Before' = $Bkjob.Options.JobScriptCommand.PreScriptEnabled 'Run Script Before the Job' = $Bkjob.Options.JobScriptCommand.PreScriptCommandLine - 'Run the Following Script After' = ConvertTo-TextYN $Bkjob.Options.JobScriptCommand.PostScriptEnabled + 'Run the Following Script After' = $Bkjob.Options.JobScriptCommand.PostScriptEnabled 'Run Script After the Job' = $Bkjob.Options.JobScriptCommand.PostScriptCommandLine 'Run Script Frequency' = $Bkjob.Options.JobScriptCommand.Periodicity $FrequencyText = $FrequencyValue } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Script) - $($Bkjob.Name)" @@ -545,12 +545,12 @@ function Get-AbrVbrBackupjobHyperV { try { Write-PScriboMessage "Discovered $($Bkjob.Name) rpo monitor options." $inObj = [ordered] @{ - 'RPO Monitor Enabled' = ConvertTo-TextYN $Bkjob.Options.RpoOptions.Enabled + 'RPO Monitor Enabled' = $Bkjob.Options.RpoOptions.Enabled 'If Backup is not Copied Within' = "$($Bkjob.Options.RpoOptions.Value) $($Bkjob.Options.RpoOptions.TimeUnit)" - 'Log Backup RPO Monitor Enabled' = ConvertTo-TextYN $Bkjob.Options.RpoOptions.LogBackupRpoEnabled + 'Log Backup RPO Monitor Enabled' = $Bkjob.Options.RpoOptions.LogBackupRpoEnabled 'If Log Backup is not Copied Within' = "$($Bkjob.Options.RpoOptions.LogBackupRpoValue) $($Bkjob.Options.RpoOptions.LogBackupRpoTimeUnit)" } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (RPO Monitor) - $($Bkjob.Name)" @@ -584,7 +584,7 @@ function Get-AbrVbrBackupjobHyperV { 'State' = $SecondaryTarget.info.LatestStatus 'Description' = $SecondaryTarget.Description } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Hyper-V Backup Jobs Secondary Target Section: $($_.Exception.Message)" } @@ -612,10 +612,10 @@ function Get-AbrVbrBackupjobHyperV { Write-PScriboMessage "Discovered $($Bkjob.Name) guest processing." $inObj = [ordered] @{ 'Name' = $VSSObj.Name - 'Enabled' = ConvertTo-TextYN $VSSObj.VssOptions.Enabled + 'Enabled' = $VSSObj.VssOptions.Enabled 'Resource Type' = ($Bkjob.GetHvOijs() | Where-Object { $_.Name -eq $VSSObj.Name -and ($_.Type -eq "Include" -or $_.Type -eq "VssChild") }).TypeDisplayName - 'Ignore Errors' = ConvertTo-TextYN $VSSObj.VssOptions.IgnoreErrors - 'Guest Proxy Auto Detect' = ConvertTo-TextYN $VSSObj.VssOptions.GuestProxyAutoDetect + 'Ignore Errors' = $VSSObj.VssOptions.IgnoreErrors + 'Guest Proxy Auto Detect' = $VSSObj.VssOptions.GuestProxyAutoDetect 'Default Credential' = Switch ((Get-VBRCredentials | Where-Object { $_.Id -eq $Bkjob.VssOptions.WinCredsId.Guid }).count) { 0 { 'None' } Default { Get-VBRCredentials | Where-Object { $_.Id -eq $Bkjob.VssOptions.WinCredsId.Guid } } @@ -624,12 +624,12 @@ function Get-AbrVbrBackupjobHyperV { '00000000-0000-0000-0000-000000000000' { 'Default Credential' } default { Get-VBRCredentials | Where-Object { $_.Id -eq $VSSObj.VssOptions.WinCredsId.Guid } } } - 'Application Processing' = ConvertTo-TextYN $VSSObj.VssOptions.VssSnapshotOptions.ApplicationProcessingEnabled + 'Application Processing' = $VSSObj.VssOptions.VssSnapshotOptions.ApplicationProcessingEnabled 'Transaction Logs' = Switch ($VSSObj.VssOptions.VssSnapshotOptions.IsCopyOnly) { 'False' { 'Process Transaction Logs' } 'True' { 'Perform Copy Only' } } - 'Use Persistent Guest Agent' = ConvertTo-TextYN $VSSObj.VssOptions.VssSnapshotOptions.UsePersistentGuestAgent + 'Use Persistent Guest Agent' = $VSSObj.VssOptions.VssSnapshotOptions.UsePersistentGuestAgent } if ($InfoLevel.Jobs.Backup -ge 2) { if (!$VSSObj.VssOptions.VssSnapshotOptions.IsCopyOnly) { @@ -670,7 +670,7 @@ function Get-AbrVbrBackupjobHyperV { $inObj.add('Oracle Retain Log Backups', $($RetainLogBackups)) } if ($VSSObj.VssOptions.GuestFSExcludeOptions.FileExcludeEnabled) { - $inObj.add('File Exclusions', (ConvertTo-TextYN $VSSObj.VssOptions.GuestFSExcludeOptions.FileExcludeEnabled)) + $inObj.add('File Exclusions', ($VSSObj.VssOptions.GuestFSExcludeOptions.FileExcludeEnabled)) if ($VSSObj.VssOptions.GuestFSExcludeOptions.BackupScope -eq 'ExcludeSpecifiedFolders') { $inObj.add('Exclude the following file and folders', ($VSSObj.VssOptions.GuestFSExcludeOptions.ExcludeList -join ',')) } elseif ($VSSObj.VssOptions.GuestFSExcludeOptions.BackupScope -eq 'IncludeSpecifiedFolders') { @@ -683,7 +683,7 @@ function Get-AbrVbrBackupjobHyperV { 'IgnoreErrors' { 'Ignore script execution failures' } 'Disabled' { 'Disable script execution' } } - $inObj.add('Scripts', (ConvertTo-TextYN $VSSObj.VssOptions.GuestScriptsOptions.IsAtLeastOneScriptSet)) + $inObj.add('Scripts', ($VSSObj.VssOptions.GuestScriptsOptions.IsAtLeastOneScriptSet)) $inObj.add('Scripts Mode', ($ScriptingMode)) if ($VSSObj.VssOptions.GuestScriptsOptions.WinScriptFiles.IsAtLeastOneScriptSet) { $inObj.add('Windows Pre-freeze script', ($VSSObj.VssOptions.GuestScriptsOptions.WinScriptFiles.PreScriptFilePath)) @@ -695,7 +695,7 @@ function Get-AbrVbrBackupjobHyperV { } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Guest Processing Options - $($VSSObj.Name)" @@ -734,15 +734,15 @@ function Get-AbrVbrBackupjobHyperV { 'Retry Failed item' = $Bkjob.ScheduleOptions.RetryTimes 'Wait before each retry' = "$($Bkjob.ScheduleOptions.RetryTimeout)/min" 'Backup Window' = Switch ($Bkjob.TypeToString) { - "Hyper-V Backup Copy" { ConvertTo-TextYN $Bkjob.ScheduleOptions.OptionsContinuous.Enabled } - default { ConvertTo-TextYN $Bkjob.ScheduleOptions.OptionsBackupWindow.IsEnabled } + "Hyper-V Backup Copy" { $Bkjob.ScheduleOptions.OptionsContinuous.Enabled } + default { $Bkjob.ScheduleOptions.OptionsBackupWindow.IsEnabled } } 'Shedule type' = $ScheduleType 'Shedule Options' = $Schedule 'Start Time' = $Bkjob.ScheduleOptions.OptionsDaily.TimeLocal.ToShorttimeString() 'Latest Run' = $Bkjob.LatestRunLocal } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Schedule Options - $($Bkjob.Name)" diff --git a/Src/Private/Get-AbrVbrBackupjobVMware.ps1 b/Src/Private/Get-AbrVbrBackupjobVMware.ps1 index 3691764..c41e023 100644 --- a/Src/Private/Get-AbrVbrBackupjobVMware.ps1 +++ b/Src/Private/Get-AbrVbrBackupjobVMware.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrBackupjobVMware { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -41,7 +41,7 @@ function Get-AbrVbrBackupjobVMware { 'Creation Time' = $VMcount.CreationTime 'VM Count' = $VMcount.VmCount } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "VMware Backup Jobs Configuration Section: $($_.Exception.Message)" } @@ -77,10 +77,10 @@ function Get-AbrVbrBackupjobVMware { 'Total Backup Size' = ConvertTo-FileSizeString -Size $CommonInfo.IncludedSize 'Target Address' = $CommonInfo.TargetDir 'Target File' = $CommonInfo.TargetFile - 'Description' = ConvertTo-EmptyToFiller $CommonInfo.CommonInfo.Description + 'Description' = $CommonInfo.CommonInfo.Description 'Modified By' = $CommonInfo.CommonInfo.ModifiedBy.FullName } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } @@ -129,7 +129,7 @@ function Get-AbrVbrBackupjobVMware { 'Size' = ConvertTo-FileSizeString -Size $Job.Info.IncludedSize 'Repository' = $Job.GetTargetRepository().Name } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } @@ -170,7 +170,7 @@ function Get-AbrVbrBackupjobVMware { 'Size' = ConvertTo-FileSizeString -Size (($ScaleRepo.Extent).Repository).GetContainer().CachedTotalSpace.InBytesAsUInt64 } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } @@ -209,7 +209,7 @@ function Get-AbrVbrBackupjobVMware { } } $inObj = [ordered] @{ - 'Use Wan accelerator' = ConvertTo-TextYN $Bkjob.IsWanAcceleratorEnabled() + 'Use Wan accelerator' = $Bkjob.IsWanAcceleratorEnabled() 'Source Wan accelerator' = Switch ($Bkjob.IsWanAcceleratorEnabled()) { 'False' { 'Direct Mode' } 'True' { $SourceWanAccelerator } @@ -221,7 +221,7 @@ function Get-AbrVbrBackupjobVMware { default { 'Unknown' } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } @@ -253,7 +253,7 @@ function Get-AbrVbrBackupjobVMware { 'Approx Size' = $OBJ.ApproxSizeString 'Disk Filter Mode' = $OBJ.DiskFilterInfo.Mode } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } $TableParams = @{ @@ -297,24 +297,24 @@ function Get-AbrVbrBackupjobVMware { } 'Retention Type' = $Bkjob.BackupStorageOptions.RetentionType $RetainString = $Retains - 'Keep First Full Backup' = ConvertTo-TextYN $Bkjob.BackupStorageOptions.KeepFirstFullBackup - 'Enable Full Backup' = ConvertTo-TextYN $Bkjob.BackupStorageOptions.EnableFullBackup - 'Integrity Checks' = ConvertTo-TextYN $Bkjob.BackupStorageOptions.EnableIntegrityChecks - 'Storage Encryption' = ConvertTo-TextYN $Bkjob.BackupStorageOptions.StorageEncryptionEnabled + 'Keep First Full Backup' = $Bkjob.BackupStorageOptions.KeepFirstFullBackup + 'Enable Full Backup' = $Bkjob.BackupStorageOptions.EnableFullBackup + 'Integrity Checks' = $Bkjob.BackupStorageOptions.EnableIntegrityChecks + 'Storage Encryption' = $Bkjob.BackupStorageOptions.StorageEncryptionEnabled 'Backup Mode' = Switch ($Bkjob.Options.BackupTargetOptions.Algorithm) { 'Synthetic' { "Reverse Incremental" } 'Increment' { 'Incremental' } } 'Active Full Backup Schedule Kind' = $Bkjob.Options.BackupTargetOptions.FullBackupScheduleKind 'Active Full Backup Days' = $Bkjob.Options.BackupTargetOptions.FullBackupDays - 'Transform Full To Synthetic' = ConvertTo-TextYN $Bkjob.Options.BackupTargetOptions.TransformFullToSyntethic - 'Transform Increments To Synthetic' = ConvertTo-TextYN $Bkjob.Options.BackupTargetOptions.TransformIncrementsToSyntethic + 'Transform Full To Synthetic' = $Bkjob.Options.BackupTargetOptions.TransformFullToSyntethic + 'Transform Increments To Synthetic' = $Bkjob.Options.BackupTargetOptions.TransformIncrementsToSyntethic 'Transform To Synthetic Days' = $Bkjob.Options.BackupTargetOptions.TransformToSyntethicDays } if ($Bkjob.Options.GfsPolicy.IsEnabled) { - $inObj.add('Keep certain full backup longer for archival purposes (GFS)', (ConvertTo-TextYN $Bkjob.Options.GfsPolicy.IsEnabled)) + $inObj.add('Keep certain full backup longer for archival purposes (GFS)', ($Bkjob.Options.GfsPolicy.IsEnabled)) if (-Not $Bkjob.Options.GfsPolicy.Weekly.IsEnabled) { $inObj.add('Keep Weekly full backup', ('Disabled')) } else { @@ -331,7 +331,7 @@ function Get-AbrVbrBackupjobVMware { $inObj.add('Keep Yearly full backup for', ("$($Bkjob.Options.GfsPolicy.Yearly.KeepBackupsForNumberOfYears) years,`r`nUse monthly full backup from the following month: $($Bkjob.Options.GfsPolicy.Yearly.DesiredTime)")) } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "$Storage Options - $($Bkjob.Name)" @@ -348,17 +348,17 @@ function Get-AbrVbrBackupjobVMware { try { Write-PScriboMessage "Discovered $($Bkjob.Name) maintenance options." $inObj = [ordered] @{ - 'Storage-Level Corruption Guard (SLCG)' = ConvertTo-TextYN $Bkjob.Options.GenerationPolicy.EnableRechek + 'Storage-Level Corruption Guard (SLCG)' = $Bkjob.Options.GenerationPolicy.EnableRechek 'SLCG Schedule Type' = $Bkjob.Options.GenerationPolicy.RecheckScheduleKind 'SLCG Schedule Day' = $Bkjob.Options.GenerationPolicy.RecheckDays 'SLCG Backup Monthly Schedule' = "Day Of Week: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayOfWeek)`r`nDay Number In Month: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayNumberInMonth)`r`nDay of Month: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayOfMonth)`r`nMonths: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.Months)" - 'Defragment and Compact Full Backup (DCFB)' = ConvertTo-TextYN $Bkjob.Options.GenerationPolicy.EnableCompactFull + 'Defragment and Compact Full Backup (DCFB)' = $Bkjob.Options.GenerationPolicy.EnableCompactFull 'DCFB Schedule Type' = $Bkjob.Options.GenerationPolicy.CompactFullBackupScheduleKind 'DCFB Schedule Day' = $Bkjob.Options.GenerationPolicy.CompactFullBackupDays 'DCFB Backup Monthly Schedule' = "Day Of Week: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.DayOfWeek)`r`nDay Number In Month: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.DayNumberInMonth)`r`nDay of Month: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.DayOfMonth)`r`nMonths: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.Months)" 'Remove deleted item data after' = $Bkjob.Options.BackupStorageOptions.RetainDays } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Storage-Level Corruption Guard (SLCG)' -eq "No" } | Set-Style -Style Warning -Property 'Storage-Level Corruption Guard (SLCG)' @@ -395,9 +395,9 @@ function Get-AbrVbrBackupjobVMware { try { Write-PScriboMessage "Discovered $($Bkjob.Name) storage options." $inObj = [ordered] @{ - 'Inline Data Deduplication' = ConvertTo-TextYN $Bkjob.Options.BackupStorageOptions.EnableDeduplication - 'Exclude Swap Files Block' = ConvertTo-TextYN $Bkjob.ViSourceOptions.ExcludeSwapFile - 'Exclude Deleted Files Block' = ConvertTo-TextYN $Bkjob.ViSourceOptions.DirtyBlocksNullingEnabled + 'Inline Data Deduplication' = $Bkjob.Options.BackupStorageOptions.EnableDeduplication + 'Exclude Swap Files Block' = $Bkjob.ViSourceOptions.ExcludeSwapFile + 'Exclude Deleted Files Block' = $Bkjob.ViSourceOptions.DirtyBlocksNullingEnabled 'Compression Level' = Switch ($Bkjob.Options.BackupStorageOptions.CompressionLevel) { 0 { 'NONE' } -1 { 'AUTO' } @@ -413,13 +413,13 @@ function Get-AbrVbrBackupjobVMware { 'KbBlockSize4096' { 'Local target (large blocks)' } default { $Bkjob.Options.BackupStorageOptions.StgBlockSize } } - 'Enabled Backup File Encryption' = ConvertTo-TextYN $Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled + 'Enabled Backup File Encryption' = $Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled 'Encryption Key' = Switch ($Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled) { $false { 'None' } default { (Get-VBREncryptionKey | Where-Object { $_.id -eq $Bkjob.Info.PwdKeyId }).Description } } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Enabled Backup File Encryption' -eq 'No' } | Set-Style -Style Warning -Property 'Enabled Backup File Encryption' @@ -458,21 +458,21 @@ function Get-AbrVbrBackupjobVMware { try { Write-PScriboMessage "Discovered $($Bkjob.Name) notification options." $inObj = [ordered] @{ - 'Send Snmp Notification' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.SnmpNotification - 'Send Email Notification' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.SendEmailNotification2AdditionalAddresses + 'Send Snmp Notification' = $Bkjob.Options.NotificationOptions.SnmpNotification + 'Send Email Notification' = $Bkjob.Options.NotificationOptions.SendEmailNotification2AdditionalAddresses 'Email Notification Additional Addresses' = $Bkjob.Options.NotificationOptions.EmailNotificationAdditionalAddresses 'Email Notify Time' = $Bkjob.Options.NotificationOptions.EmailNotifyTime.ToShortTimeString() - 'Use Custom Email Notification Options' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.UseCustomEmailNotificationOptions + 'Use Custom Email Notification Options' = $Bkjob.Options.NotificationOptions.UseCustomEmailNotificationOptions 'Use Custom Notification Setting' = $Bkjob.Options.NotificationOptions.EmailNotificationSubject - 'Notify On Success' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnSuccess - 'Notify On Warning' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnWarning - 'Notify On Error' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnError - 'Suppress Notification until Last Retry' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnLastRetryOnly - 'Set Results To Vm Notes' = ConvertTo-TextYN $Bkjob.Options.ViSourceOptions.SetResultsToVmNotes + 'Notify On Success' = $Bkjob.Options.NotificationOptions.EmailNotifyOnSuccess + 'Notify On Warning' = $Bkjob.Options.NotificationOptions.EmailNotifyOnWarning + 'Notify On Error' = $Bkjob.Options.NotificationOptions.EmailNotifyOnError + 'Suppress Notification until Last Retry' = $Bkjob.Options.NotificationOptions.EmailNotifyOnLastRetryOnly + 'Set Results To Vm Notes' = $Bkjob.Options.ViSourceOptions.SetResultsToVmNotes 'VM Attribute Note Value' = $Bkjob.Options.ViSourceOptions.VmAttributeName - 'Append to Existing Attribute' = ConvertTo-TextYN $Bkjob.Options.ViSourceOptions.VmNotesAppend + 'Append to Existing Attribute' = $Bkjob.Options.ViSourceOptions.VmNotesAppend } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Notification) - $($Bkjob.Name)" @@ -494,12 +494,12 @@ function Get-AbrVbrBackupjobVMware { try { Write-PScriboMessage "Discovered $($Bkjob.Name) vSphere options." $inObj = [ordered] @{ - 'Enable VMware Tools Quiescence' = ConvertTo-TextYN $Bkjob.Options.ViSourceOptions.VMToolsQuiesce - 'Use Change Block Tracking' = ConvertTo-TextYN $Bkjob.Options.ViSourceOptions.UseChangeTracking - 'Enable CBT for all protected VMs' = ConvertTo-TextYN $Bkjob.Options.ViSourceOptions.EnableChangeTracking - 'Reset CBT On each Active Full Backup' = ConvertTo-TextYN $Bkjob.Options.ViSourceOptions.ResetChangeTrackingOnActiveFull + 'Enable VMware Tools Quiescence' = $Bkjob.Options.ViSourceOptions.VMToolsQuiesce + 'Use Change Block Tracking' = $Bkjob.Options.ViSourceOptions.UseChangeTracking + 'Enable CBT for all protected VMs' = $Bkjob.Options.ViSourceOptions.EnableChangeTracking + 'Reset CBT On each Active Full Backup' = $Bkjob.Options.ViSourceOptions.ResetChangeTrackingOnActiveFull } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (vSphere) - $($Bkjob.Name)" @@ -521,13 +521,13 @@ function Get-AbrVbrBackupjobVMware { try { Write-PScriboMessage "Discovered $($Bkjob.Name) Integration options." $inObj = [ordered] @{ - 'Enable Backup from Storage Snapshots' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.UseSanSnapshots - 'Limit processed VM count per Storage Snapshot' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.MultipleStorageSnapshotEnabled + 'Enable Backup from Storage Snapshots' = $Bkjob.Options.SanIntegrationOptions.UseSanSnapshots + 'Limit processed VM count per Storage Snapshot' = $Bkjob.Options.SanIntegrationOptions.MultipleStorageSnapshotEnabled 'VM count per Storage Snapshot' = $Bkjob.Options.SanIntegrationOptions.MultipleStorageSnapshotVmsCount - 'Failover to Standard Backup' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.FailoverFromSan - 'Failover to Primary Storage Snapshot' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.Failover2StorageSnapshotBackup + 'Failover to Standard Backup' = $Bkjob.Options.SanIntegrationOptions.FailoverFromSan + 'Failover to Primary Storage Snapshot' = $Bkjob.Options.SanIntegrationOptions.Failover2StorageSnapshotBackup } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Integration) - $($Bkjob.Name)" @@ -556,15 +556,15 @@ function Get-AbrVbrBackupjobVMware { } Write-PScriboMessage "Discovered $($Bkjob.Name) script options." $inObj = [ordered] @{ - 'Run the Following Script Before' = ConvertTo-TextYN $Bkjob.Options.JobScriptCommand.PreScriptEnabled + 'Run the Following Script Before' = $Bkjob.Options.JobScriptCommand.PreScriptEnabled 'Run Script Before the Job' = $Bkjob.Options.JobScriptCommand.PreScriptCommandLine - 'Run the Following Script After' = ConvertTo-TextYN $Bkjob.Options.JobScriptCommand.PostScriptEnabled + 'Run the Following Script After' = $Bkjob.Options.JobScriptCommand.PostScriptEnabled 'Run Script After the Job' = $Bkjob.Options.JobScriptCommand.PostScriptCommandLine 'Run Script Frequency' = $Bkjob.Options.JobScriptCommand.Periodicity $FrequencyText = $FrequencyValue } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Script) - $($Bkjob.Name)" @@ -586,12 +586,12 @@ function Get-AbrVbrBackupjobVMware { try { Write-PScriboMessage "Discovered $($Bkjob.Name) rpo monitor options." $inObj = [ordered] @{ - 'RPO Monitor Enabled' = ConvertTo-TextYN $Bkjob.Options.RpoOptions.Enabled + 'RPO Monitor Enabled' = $Bkjob.Options.RpoOptions.Enabled 'If Backup is not Copied Within' = "$($Bkjob.Options.RpoOptions.Value) $($Bkjob.Options.RpoOptions.TimeUnit)" - 'Log Backup RPO Monitor Enabled' = ConvertTo-TextYN $Bkjob.Options.RpoOptions.LogBackupRpoEnabled + 'Log Backup RPO Monitor Enabled' = $Bkjob.Options.RpoOptions.LogBackupRpoEnabled 'If Log Backup is not Copied Within' = "$($Bkjob.Options.RpoOptions.LogBackupRpoValue) $($Bkjob.Options.RpoOptions.LogBackupRpoTimeUnit)" } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (RPO Monitor) - $($Bkjob.Name)" @@ -625,7 +625,7 @@ function Get-AbrVbrBackupjobVMware { 'State' = $SecondaryTarget.info.LatestStatus 'Description' = $SecondaryTarget.Description } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } @@ -653,10 +653,10 @@ function Get-AbrVbrBackupjobVMware { Write-PScriboMessage "Discovered $($Bkjob.Name) guest processing." $inObj = [ordered] @{ 'Name' = $VSSObj.Name - 'Enabled' = ConvertTo-TextYN $VSSObj.VssOptions.Enabled + 'Enabled' = $VSSObj.VssOptions.Enabled 'Resource Type' = ($Bkjob.GetViOijs() | Where-Object { $_.Name -eq $VSSObj.Name -and ($_.Type -eq "Include" -or $_.Type -eq "VssChild") }).TypeDisplayName - 'Ignore Errors' = ConvertTo-TextYN $VSSObj.VssOptions.IgnoreErrors - 'Guest Proxy Auto Detect' = ConvertTo-TextYN $VSSObj.VssOptions.GuestProxyAutoDetect + 'Ignore Errors' = $VSSObj.VssOptions.IgnoreErrors + 'Guest Proxy Auto Detect' = $VSSObj.VssOptions.GuestProxyAutoDetect 'Default Credential' = Switch ((Get-VBRCredentials | Where-Object { $_.Id -eq $Bkjob.VssOptions.WinCredsId.Guid }).count) { 0 { 'None' } Default { Get-VBRCredentials | Where-Object { $_.Id -eq $Bkjob.VssOptions.WinCredsId.Guid } } @@ -665,12 +665,12 @@ function Get-AbrVbrBackupjobVMware { '00000000-0000-0000-0000-000000000000' { 'Default Credential' } default { Get-VBRCredentials | Where-Object { $_.Id -eq $VSSObj.VssOptions.WinCredsId.Guid } } } - 'Application Processing' = ConvertTo-TextYN $VSSObj.VssOptions.VssSnapshotOptions.ApplicationProcessingEnabled + 'Application Processing' = $VSSObj.VssOptions.VssSnapshotOptions.ApplicationProcessingEnabled 'Transaction Logs' = Switch ($VSSObj.VssOptions.VssSnapshotOptions.IsCopyOnly) { 'False' { 'Process Transaction Logs' } 'True' { 'Perform Copy Only' } } - 'Use Persistent Guest Agent' = ConvertTo-TextYN $VSSObj.VssOptions.VssSnapshotOptions.UsePersistentGuestAgent + 'Use Persistent Guest Agent' = $VSSObj.VssOptions.VssSnapshotOptions.UsePersistentGuestAgent } if ($InfoLevel.Jobs.Backup -ge 2) { if (!$VSSObj.VssOptions.VssSnapshotOptions.IsCopyOnly) { @@ -711,7 +711,7 @@ function Get-AbrVbrBackupjobVMware { $inObj.add('Oracle Retain Log Backups', $($RetainLogBackups)) } if ($VSSObj.VssOptions.GuestFSExcludeOptions.FileExcludeEnabled) { - $inObj.add('File Exclusions', (ConvertTo-TextYN $VSSObj.VssOptions.GuestFSExcludeOptions.FileExcludeEnabled)) + $inObj.add('File Exclusions', ($VSSObj.VssOptions.GuestFSExcludeOptions.FileExcludeEnabled)) if ($VSSObj.VssOptions.GuestFSExcludeOptions.BackupScope -eq 'ExcludeSpecifiedFolders') { $inObj.add('Exclude the following file and folders', ($VSSObj.VssOptions.GuestFSExcludeOptions.ExcludeList -join ',')) } elseif ($VSSObj.VssOptions.GuestFSExcludeOptions.BackupScope -eq 'IncludeSpecifiedFolders') { @@ -724,7 +724,7 @@ function Get-AbrVbrBackupjobVMware { 'IgnoreErrors' { 'Ignore script execution failures' } 'Disabled' { 'Disable script execution' } } - $inObj.add('Scripts', (ConvertTo-TextYN $VSSObj.VssOptions.GuestScriptsOptions.IsAtLeastOneScriptSet)) + $inObj.add('Scripts', ($VSSObj.VssOptions.GuestScriptsOptions.IsAtLeastOneScriptSet)) $inObj.add('Scripts Mode', ($ScriptingMode)) if ($VSSObj.VssOptions.GuestScriptsOptions.WinScriptFiles.IsAtLeastOneScriptSet) { $inObj.add('Windows Pre-freeze script', ($VSSObj.VssOptions.GuestScriptsOptions.WinScriptFiles.PreScriptFilePath)) @@ -736,7 +736,7 @@ function Get-AbrVbrBackupjobVMware { } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Guest Processing Options - $($VSSObj.Name)" @@ -775,15 +775,15 @@ function Get-AbrVbrBackupjobVMware { 'Retry Failed item' = $Bkjob.ScheduleOptions.RetryTimes 'Wait before each retry' = "$($Bkjob.ScheduleOptions.RetryTimeout)/min" 'Backup Window' = Switch ($Bkjob.TypeToString) { - "VMware Backup Copy" { ConvertTo-TextYN $Bkjob.ScheduleOptions.OptionsContinuous.Enabled } - default { ConvertTo-TextYN $Bkjob.ScheduleOptions.OptionsBackupWindow.IsEnabled } + "VMware Backup Copy" { $Bkjob.ScheduleOptions.OptionsContinuous.Enabled } + default { $Bkjob.ScheduleOptions.OptionsBackupWindow.IsEnabled } } 'Shedule type' = $ScheduleType 'Shedule Options' = $Schedule 'Start Time' = $Bkjob.ScheduleOptions.OptionsDaily.TimeLocal.ToShorttimeString() 'Latest Run' = $Bkjob.LatestRunLocal } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Schedule Options - $($Bkjob.Name)" diff --git a/Src/Private/Get-AbrVbrBackupsRPSummary.ps1 b/Src/Private/Get-AbrVbrBackupsRPSummary.ps1 index 121528d..94cb9cb 100644 --- a/Src/Private/Get-AbrVbrBackupsRPSummary.ps1 +++ b/Src/Private/Get-AbrVbrBackupsRPSummary.ps1 @@ -5,7 +5,7 @@ function Get-AbrVbrBackupsRPSummary { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -64,7 +64,7 @@ function Get-AbrVbrBackupsRPSummary { 'Average Full Duration' = $FullDurationAvg 'Average Increment Duration ' = $IncrementDurationAvg } - $RestorePointInfo += [PSCustomObject]$InObj + $RestorePointInfo += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Restore Point table: $($_.Exception.Message)" diff --git a/Src/Private/Get-AbrVbrCloudConnectBS.ps1 b/Src/Private/Get-AbrVbrCloudConnectBS.ps1 index 3c50e66..cff8aaa 100644 --- a/Src/Private/Get-AbrVbrCloudConnectBS.ps1 +++ b/Src/Private/Get-AbrVbrCloudConnectBS.ps1 @@ -5,7 +5,7 @@ function Get-AbrVbrCloudConnectBS { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -63,7 +63,7 @@ function Get-AbrVbrCloudConnectBS { 'Description' = $CloudObject.Description } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Backup Storage - $($CloudObject.Name)" @@ -99,7 +99,7 @@ function Get-AbrVbrCloudConnectBS { } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } } diff --git a/Src/Private/Get-AbrVbrCloudConnectCG.ps1 b/Src/Private/Get-AbrVbrCloudConnectCG.ps1 index 51a433d..4f2efa6 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.5 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -43,7 +43,7 @@ function Get-AbrVbrCloudConnectCG { 'Network Mode' = $CloudObject.NetworkMode 'NAT Port' = $CloudObject.NATPort 'Incoming Port' = $CloudObject.IncomingPort - 'Enabled' = ConvertTo-TextYN $CloudObject.Enabled + 'Enabled' = $CloudObject.Enabled } if ($InfoLevel.CloudConnect.CloudGateway -ge 2) { @@ -59,12 +59,12 @@ function Get-AbrVbrCloudConnectCG { } if ($InfoLevel.CloudConnect.CloudGateway -eq 1) { - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } if ($InfoLevel.CloudConnect.CloudGateway -ge 2) { - $OutObj = [pscustomobject]$inobj + $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' -match "Created by" } | Set-Style -Style Warning -Property 'Description' diff --git a/Src/Private/Get-AbrVbrCloudConnectCert.ps1 b/Src/Private/Get-AbrVbrCloudConnectCert.ps1 index bafb37c..049b5a2 100644 --- a/Src/Private/Get-AbrVbrCloudConnectCert.ps1 +++ b/Src/Private/Get-AbrVbrCloudConnectCert.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrCloudConnectCert { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -47,7 +47,7 @@ function Get-AbrVbrCloudConnectCert { 'Serial Number' = $CloudObject.SerialNumber } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "$($CloudObject.DisplayName) Gateway SSL Certificate Section: $($_.Exception.Message)" diff --git a/Src/Private/Get-AbrVbrCloudConnectGP.ps1 b/Src/Private/Get-AbrVbrCloudConnectGP.ps1 index bf8b781..5114e0b 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.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -43,7 +43,7 @@ function Get-AbrVbrCloudConnectGP { 'Description' = $CloudObject.Description } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Gateways Pools $($CloudObject.Name) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrCloudConnectPublicIP.ps1 b/Src/Private/Get-AbrVbrCloudConnectPublicIP.ps1 index 4d68bfc..aa5867b 100644 --- a/Src/Private/Get-AbrVbrCloudConnectPublicIP.ps1 +++ b/Src/Private/Get-AbrVbrCloudConnectPublicIP.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrCloudConnectPublicIP { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.5 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -44,7 +44,7 @@ function Get-AbrVbrCloudConnectPublicIP { } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Cloud Public IP $($CloudObject.IpAddress) Section: $($_.Exception.Message)" diff --git a/Src/Private/Get-AbrVbrCloudConnectRR.ps1 b/Src/Private/Get-AbrVbrCloudConnectRR.ps1 index 9faf5c9..58059aa 100644 --- a/Src/Private/Get-AbrVbrCloudConnectRR.ps1 +++ b/Src/Private/Get-AbrVbrCloudConnectRR.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrCloudConnectRR { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -53,7 +53,7 @@ function Get-AbrVbrCloudConnectRR { 'Subscribers Count' = ($CloudObject.SubscribedTenantId).count } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Replica Resources $($CloudObject.Name) Section: $($_.Exception.Message)" } @@ -108,7 +108,7 @@ function Get-AbrVbrCloudConnectRR { 'Description' = $CloudObject.Description } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.CloudConnect.ReplicaResources) { $OutObj | Where-Object { $_.'Subscribed Tenant' -eq 'None' } | Set-Style -Style Warning -Property 'Subscribed Tenant' @@ -145,7 +145,7 @@ function Get-AbrVbrCloudConnectRR { } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Storage Quota - $($Storage.Datastore)" @@ -180,7 +180,7 @@ function Get-AbrVbrCloudConnectRR { $inObj.add('VLANs Without Internet', "$($VlanConfiguration.FirstVLANWithoutInternet) - $($VlanConfiguration.LastVLANWithoutInternet)") } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Network Quota - $($CloudObject.Name)" @@ -214,7 +214,7 @@ function Get-AbrVbrCloudConnectRR { 'Storage Usage' = $TenantUtil.StorageUsage | ForEach-Object { "$(ConvertTo-FileSizeString -Size $_.UsedSpace) ($($_.FriendlyName))" } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } $TableParams = @{ diff --git a/Src/Private/Get-AbrVbrCloudConnectStatus.ps1 b/Src/Private/Get-AbrVbrCloudConnectStatus.ps1 index 49317f9..944b69e 100644 --- a/Src/Private/Get-AbrVbrCloudConnectStatus.ps1 +++ b/Src/Private/Get-AbrVbrCloudConnectStatus.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrCloudConnectStatus { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -42,7 +42,7 @@ function Get-AbrVbrCloudConnectStatus { 'Service Response Delay' = $CloudConnectInfraServiceStatus.ServiceResponseDelay } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Cloud Connect Service Status $($CloudObject.DisplayName) Section: $($_.Exception.Message)" diff --git a/Src/Private/Get-AbrVbrCloudConnectSummary.ps1 b/Src/Private/Get-AbrVbrCloudConnectSummary.ps1 index c62dc5a..233565b 100644 --- a/Src/Private/Get-AbrVbrCloudConnectSummary.ps1 +++ b/Src/Private/Get-AbrVbrCloudConnectSummary.ps1 @@ -5,7 +5,7 @@ function Get-AbrVbrCloudConnectSummary { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.6 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -42,7 +42,7 @@ function Get-AbrVbrCloudConnectSummary { 'Public IP Addresses' = $CloudConnectPublicIP.Count 'Hardware Plans' = $CloudConnectRR.Count } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Cloud Connect Summary Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrCloudConnectTenant.ps1 b/Src/Private/Get-AbrVbrCloudConnectTenant.ps1 index 7e6c333..23f14dd 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.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -47,7 +47,7 @@ function Get-AbrVbrCloudConnectTenant { 'Last Result' = $CloudObject.LastResult } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Tenants $($CloudObject.Name) Section: $($_.Exception.Message)" } @@ -108,10 +108,16 @@ function Get-AbrVbrCloudConnectTenant { } 'Expiration Date' = Switch ([string]::IsNullOrEmpty($CloudObject.LeaseExpirationDate)) { $true { 'Never' } - $false { $CloudObject.LeaseExpirationDate } + $false { + & { + if ($CloudObject.LeaseExpirationDate -lt (Get-Date)) { + "$($CloudObject.LeaseExpirationDate.ToShortDateString()) (Expired)" + } else { $CloudObject.LeaseExpirationDate.ToShortDateString() } + } + } default { '--' } } - 'Backup Storage (Cloud Backup Repository)' = ConvertTo-TextYN $CloudObject.ResourcesEnabled + 'Backup Storage (Cloud Backup Repository)' = $CloudObject.ResourcesEnabled 'Replication Resource (Cloud Host)' = Switch ($CloudObject.ReplicationResourcesEnabled -or $CloudObject.vCDReplicationResourcesEnabled) { 'True' { 'Yes' } 'False' { 'No' } @@ -125,20 +131,12 @@ function Get-AbrVbrCloudConnectTenant { $inObj.add('Domain Username', $CloudObject.Name) } - $OutObj = [pscustomobject]$inobj + $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' -match "Created by" } | Set-Style -Style Warning -Property 'Description' - $OutObj | Where-Object { $_.'Expiration Date' -lt (Get-Date) -and $_.'Expiration Date' -ne 'Never' } | Set-Style -Style Warning -Property 'Expiration Date' - - foreach ( $OBJ in ($OutObj | Where-Object { $_.'Expiration Date' -ne 'Never' })) { - if ($OBJ | Where-Object { $_.'Expiration Date' -lt (Get-Date) }) { - $OBJ.'Expiration Date' = $OBJ.'Expiration Date'.ToLongDateString() + ' (Expired)' - } else { - $OBJ.'Expiration Date' = $OBJ.'Expiration Date'.ToLongDateString() - } - } + $OutObj | Where-Object { $_.'Expiration Date' -match '(Expired)' } | Set-Style -Style Warning -Property 'Expiration Date' } $TableParams = @{ @@ -173,7 +171,7 @@ function Get-AbrVbrCloudConnectTenant { } if ($CloudObject.ThrottlingEnabled) { - $inObj.add('Limit network traffic from this tenant?', (ConvertTo-TextYN $CloudObject.ThrottlingEnabled)) + $inObj.add('Limit network traffic from this tenant?', ($CloudObject.ThrottlingEnabled)) Switch ($CloudObject.ThrottlingUnit) { 'MbytePerSec' { $inObj.add('Throttling network traffic to', "$($CloudObject.ThrottlingValue) MB/s") } 'KbytePerSec' { $inObj.add('Throttling network traffic to', "$($CloudObject.ThrottlingValue) KB/s") } @@ -191,10 +189,10 @@ function Get-AbrVbrCloudConnectTenant { } $inObj.add('Gateway Type', 'Gateway Pool') $inObj.add('Gateway Pool', $GatewayPool) - $inObj.add('Gateway Failover', (ConvertTo-TextYN $CloudObject.GatewayFailoverEnabled)) + $inObj.add('Gateway Failover', ($CloudObject.GatewayFailoverEnabled)) } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Bandwidth - $($CloudObject.Name)" @@ -225,7 +223,7 @@ function Get-AbrVbrCloudConnectTenant { 'Friendly Name' = $CloudBackupRepo.RepositoryFriendlyName 'Quota' = ConvertTo-FileSizeString -Size $CloudBackupRepo.RepositoryQuota 'Quota Path' = $CloudBackupRepo.RepositoryQuotaPath - 'Use Wan Acceleration' = ConvertTo-TextYN $CloudBackupRepo.WanAccelerationEnabled + 'Use Wan Acceleration' = $CloudBackupRepo.WanAccelerationEnabled } if ($CloudBackupRepo.WanAccelerationEnabled) { @@ -235,7 +233,7 @@ function Get-AbrVbrCloudConnectTenant { $inObj.add('Keep deleted backup file for', "$($CloudObject.BackupProtectionPeriod) days") } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Backup Resources - $($CloudBackupRepo.RepositoryFriendlyName)" @@ -265,10 +263,10 @@ function Get-AbrVbrCloudConnectTenant { Write-PScriboMessage "Discovered $($CloudRepliRes.RepositoryFriendlyName) Replication Resources information." $inObj = [ordered] @{ 'Hardware Plans' = (Get-VBRCloudHardwarePlan | Where-Object { $_.SubscribedTenantId -contains $CloudObject.Id }).Name -join ', ' - 'Use Veeam Network Extension Capabilities during Partial and Full Site Failover' = ConvertTo-TextYN $CloudRepliRes.NetworkFailoverResourcesEnabled + 'Use Veeam Network Extension Capabilities during Partial and Full Site Failover' = $CloudRepliRes.NetworkFailoverResourcesEnabled } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Replication Resources - $($CloudObject.Name)" @@ -299,14 +297,14 @@ function Get-AbrVbrCloudConnectTenant { $inObj = [ordered] @{ 'Organization vDC Name' = $CloudRepliRes.OrganizationvDCName 'Allocation Model' = $CloudRepliRes.AllocationModel - 'WAN Accelaration?' = ConvertTo-TextYN $CloudRepliRes.WANAccelarationEnabled + 'WAN Accelaration?' = $CloudRepliRes.WANAccelarationEnabled } if ($CloudRepliRes.WANAccelarationEnabled) { $inObj.add('WAN Accelerator', $CloudRepliRes.WANAccelerator.Name) } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Replication Resources (vCD) - $($CloudObject.Name)" @@ -345,7 +343,7 @@ function Get-AbrVbrCloudConnectTenant { } $inObj.add('Production Network', $TenantNetworkAppliance.ProductionNetwork.Name) - $inObj.add('Obtain Ip Address Automatically', (ConvertTo-TextYN $TenantNetworkAppliance.ObtainIpAddressAutomatically)) + $inObj.add('Obtain Ip Address Automatically', ($TenantNetworkAppliance.ObtainIpAddressAutomatically)) if (-Not $TenantNetworkAppliance.ObtainIpAddressAutomatically) { $inObj.add('Ip Address', $TenantNetworkAppliance.IpAddress) @@ -353,7 +351,7 @@ function Get-AbrVbrCloudConnectTenant { $inObj.add('Default Gateway', $TenantNetworkAppliance.DefaultGateway) } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Network Extension - $($CloudObject.Name)" @@ -397,7 +395,7 @@ function Get-AbrVbrCloudConnectTenant { } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.CloudConnect.Tenants) { $OutObj | Where-Object { $_.'Used Space %' -gt 85 } | Set-Style -Style Warning -Property 'Used Space %' @@ -438,7 +436,7 @@ function Get-AbrVbrCloudConnectTenant { 'Rental Replica' = $CloudObject.RentalReplicaCount } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Licenses Utilization - $($CloudObject.Name)" diff --git a/Src/Private/Get-AbrVbrConfigurationBackupSetting.ps1 b/Src/Private/Get-AbrVbrConfigurationBackupSetting.ps1 index b0c0c13..00763a8 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.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -37,25 +37,25 @@ function Get-AbrVbrConfigurationBackupSetting { } $inObj = [ordered] @{ 'Name' = $BackupSettings.Name - 'Run Job Automatically' = ConvertTo-TextYN $BackupSettings.ScheduleOptions.Enabled + 'Run Job Automatically' = $BackupSettings.ScheduleOptions.Enabled 'Schedule Type' = $BackupSettings.ScheduleOptions.Type 'Schedule Options' = $ScheduleOptions 'Restore Points To Keep' = $BackupSettings.RestorePointsToKeep - 'Encryption Enabled' = ConvertTo-TextYN $BackupSettings.EncryptionOptions + 'Encryption Enabled' = $BackupSettings.EncryptionOptions 'Encryption Key' = $BackupSettings.EncryptionOptions.Key.Description 'Additional Address' = $BackupSettings.NotificationOptions.AdditionalAddress 'Email Subject' = $BackupSettings.NotificationOptions.NotificationSubject 'Notify On' = Switch ($BackupSettings.NotificationOptions.EnableAdditionalNotification) { "" { "--"; break } $Null { "--"; break } - default { "Notify On Success: $(ConvertTo-TextYN $BackupSettings.NotificationOptions.NotifyOnSuccess)`r`nNotify On Warning: $(ConvertTo-TextYN $BackupSettings.NotificationOptions.NotifyOnWarning)`r`nNotify On Error: $(ConvertTo-TextYN $BackupSettings.NotificationOptions.NotifyOnError)`r`nNotify On Last Retry Only: $(ConvertTo-TextYN $BackupSettings.NotificationOptions.NotifyOnLastRetryOnly)" } + default { "Notify On Success: $($BackupSettings.NotificationOptions.NotifyOnSuccess)`r`nNotify On Warning: $($BackupSettings.NotificationOptions.NotifyOnWarning)`r`nNotify On Error: $($BackupSettings.NotificationOptions.NotifyOnError)`r`nNotify On Last Retry Only: $($BackupSettings.NotificationOptions.NotifyOnLastRetryOnly)" } } 'NextRun' = $BackupSettings.NextRun 'Target' = $BackupSettings.Target - 'Enabled' = ConvertTo-TextYN $BackupSettings.Enabled + 'Enabled' = $BackupSettings.Enabled 'LastResult' = $BackupSettings.LastResult } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Configuration Backup Settings Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrCredential.ps1 b/Src/Private/Get-AbrVbrCredential.ps1 index 602ddd3..3f97ac7 100644 --- a/Src/Private/Get-AbrVbrCredential.ps1 +++ b/Src/Private/Get-AbrVbrCredential.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrCredential { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -43,7 +43,7 @@ function Get-AbrVbrCredential { } 'Description' = $Credential.Description } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Security Credentials $($Credential.Name) Section: $($_.Exception.Message)" } @@ -71,7 +71,7 @@ function Get-AbrVbrCredential { 'Name' = $CloudCredential.Name 'Description' = $CloudCredential.Description } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Service Provider Credentials $($CloudCredential.Name) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrEmailNotificationSetting.ps1 b/Src/Private/Get-AbrVbrEmailNotificationSetting.ps1 index 6d6d3e3..37debda 100644 --- a/Src/Private/Get-AbrVbrEmailNotificationSetting.ps1 +++ b/Src/Private/Get-AbrVbrEmailNotificationSetting.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrEmailNotificationSetting { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -35,18 +35,18 @@ function Get-AbrVbrEmailNotificationSetting { 'Email Sender' = $EmailSetting.Sender 'SMTP Server' = $EmailSetting.SmtpServer 'Email Subject' = $EmailSetting.Subject - 'SSL Enabled' = ConvertTo-TextYN $EmailSetting.SSLEnabled - 'Auth Enabled' = ConvertTo-TextYN $EmailSetting.AuthEnabled + 'SSL Enabled' = $EmailSetting.SSLEnabled + 'Auth Enabled' = $EmailSetting.AuthEnabled 'Credentials' = $EmailSetting.Credentials.Name 'Daily Reports Time' = $EmailSetting.DailyReportsTime.ToShortTimeString() - 'Enabled' = ConvertTo-TextYN $EmailSetting.Enabled + 'Enabled' = $EmailSetting.Enabled 'Notify On' = Switch ($EmailSetting.NotifyOnSuccess) { "" { "--"; break } $Null { "--"; break } - default { "Notify On Success: $(ConvertTo-TextYN $EmailSetting.NotifyOnSuccess)`r`nNotify On Warning: $(ConvertTo-TextYN $EmailSetting.NotifyOnWarning)`r`nNotify On Failure: $(ConvertTo-TextYN $EmailSetting.NotifyOnFailure)`r`nNotify On Last Retry Only: $(ConvertTo-TextYN $EmailSetting.NotifyOnLastRetryOnly)" } + default { "Notify On Success: $($EmailSetting.NotifyOnSuccess)`r`nNotify On Warning: $($EmailSetting.NotifyOnWarning)`r`nNotify On Failure: $($EmailSetting.NotifyOnFailure)`r`nNotify On Last Retry Only: $($EmailSetting.NotifyOnLastRetryOnly)" } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } if ($HealthCheck.Infrastructure.Settings) { diff --git a/Src/Private/Get-AbrVbrEnterpriseManagerInfo.ps1 b/Src/Private/Get-AbrVbrEnterpriseManagerInfo.ps1 index 04b3654..ff6f528 100644 --- a/Src/Private/Get-AbrVbrEnterpriseManagerInfo.ps1 +++ b/Src/Private/Get-AbrVbrEnterpriseManagerInfo.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrEnterpriseManagerInfo { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -44,12 +44,12 @@ function Get-AbrVbrEnterpriseManagerInfo { $true { 'Not Connected' } default { $EMInfo.URL } } - 'Skip License Push' = ConvertTo-TextYN $EMInfo.SkipLicensePush - 'Is Connected' = ConvertTo-TextYN $EMInfo.IsConnected + 'Skip License Push' = $EMInfo.SkipLicensePush + 'Is Connected' = $EMInfo.IsConnected } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($OutObj) { diff --git a/Src/Private/Get-AbrVbrEventForwarding.ps1 b/Src/Private/Get-AbrVbrEventForwarding.ps1 index 37147ed..d6a6db0 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.3 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -42,7 +42,7 @@ function Get-AbrVbrEventForwarding { default { "Unknown" } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.Settings) { $OutObj | Where-Object { $_.'Syslog Servers' -eq '--' } | Set-Style -Style Warning -Property 'Syslog Servers' diff --git a/Src/Private/Get-AbrVbrFileShareBackupjob.ps1 b/Src/Private/Get-AbrVbrFileShareBackupjob.ps1 index ee76df6..6f65cb1 100644 --- a/Src/Private/Get-AbrVbrFileShareBackupjob.ps1 +++ b/Src/Private/Get-AbrVbrFileShareBackupjob.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrFileShareBackupjob { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -52,7 +52,7 @@ function Get-AbrVbrFileShareBackupjob { default { $FSBkjob.FindLastSession().EndTimeUTC } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "$($BSName.ToLower()) $($FSBkjob.Name) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrFileShareBackupjobConf.ps1 b/Src/Private/Get-AbrVbrFileShareBackupjobConf.ps1 index 6404181..0b4ac73 100644 --- a/Src/Private/Get-AbrVbrFileShareBackupjobConf.ps1 +++ b/Src/Private/Get-AbrVbrFileShareBackupjobConf.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrFileShareBackupjobConf { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -50,10 +50,10 @@ function Get-AbrVbrFileShareBackupjobConf { 'Total Backup Size' = ConvertTo-FileSizeString -Size $CommonInfo.IncludedSize 'Target Address' = $CommonInfo.TargetDir 'Target File' = $CommonInfo.TargetFile - 'Description' = ConvertTo-EmptyToFiller $CommonInfo.CommonInfo.Description + 'Description' = $CommonInfo.CommonInfo.Description 'Modified By' = $CommonInfo.CommonInfo.ModifiedBy.FullName } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Common Information $($Bkjob.Name) Section: $($_.Exception.Message)" } @@ -104,7 +104,7 @@ function Get-AbrVbrFileShareBackupjobConf { 'File Filter Include Masks' = $OBJ.ExtendedOptions.FileSourceOptions.IncludeMasks 'File Filter Exclude Masks' = $OBJ.ExtendedOptions.FileSourceOptions.ExcludeMasks } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Files and Folders - $($OBJ.Name)" @@ -151,7 +151,7 @@ function Get-AbrVbrFileShareBackupjobConf { default { "Unknown" } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } $TableParams = @{ Name = "Objects - $($OBJ.Name)" @@ -193,7 +193,7 @@ function Get-AbrVbrFileShareBackupjobConf { $inObj.add('File to Archive', $FiletoArchive) } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Storage Options - $($Bkjob.Name)" @@ -228,7 +228,7 @@ function Get-AbrVbrFileShareBackupjobConf { if ($Bkjob.Options.NasBackupRetentionPolicy.LimitMaxDeletedFileVersionsCount) { $inObj.add('Delete file version limit', $Bkjob.Options.NasBackupRetentionPolicy.MaxDeletedFileVersionsCount) } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings ($FLVersion) - $($Bkjob.Name)" @@ -256,7 +256,7 @@ function Get-AbrVbrFileShareBackupjobConf { default { "--" } } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (acl handling) - $($Bkjob.Name)" @@ -278,7 +278,7 @@ function Get-AbrVbrFileShareBackupjobConf { try { Write-PScriboMessage "Discovered $($Bkjob.Name) storage options." $inObj = [ordered] @{ - 'Inline Data Deduplication' = ConvertTo-TextYN $Bkjob.Options.BackupStorageOptions.EnableDeduplication + 'Inline Data Deduplication' = $Bkjob.Options.BackupStorageOptions.EnableDeduplication 'Compression Level' = Switch ($Bkjob.Options.BackupStorageOptions.CompressionLevel) { 0 { 'NONE' } -1 { 'AUTO' } @@ -287,13 +287,13 @@ function Get-AbrVbrFileShareBackupjobConf { 6 { 'High' } 9 { 'EXTREME' } } - 'Enabled Backup File Encryption' = ConvertTo-TextYN $Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled + 'Enabled Backup File Encryption' = $Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled 'Encryption Key' = Switch ($Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled) { $false { 'None' } default { (Get-VBREncryptionKey | Where-Object { $_.id -eq $Bkjob.Info.PwdKeyId }).Description } } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Storage) - $($Bkjob.Name)" @@ -315,7 +315,7 @@ function Get-AbrVbrFileShareBackupjobConf { try { Write-PScriboMessage "Discovered $($Bkjob.Name) maintenance options." $inObj = [ordered] @{ - 'Storage-Level Corruption Guard (SLCG)' = ConvertTo-TextYN $Bkjob.Options.GenerationPolicy.EnableRechek + 'Storage-Level Corruption Guard (SLCG)' = $Bkjob.Options.GenerationPolicy.EnableRechek 'SLCG Schedule Type' = $Bkjob.Options.GenerationPolicy.RecheckScheduleKind } @@ -325,7 +325,7 @@ function Get-AbrVbrFileShareBackupjobConf { if ($Bkjob.Options.GenerationPolicy.RecheckScheduleKind -eq 'Monthly') { $inObj.add('SLCG Backup Monthly Schedule', "Day Of Week: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayOfWeek)`r`nDay Number In Month: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayNumberInMonth)`r`nDay of Month: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayOfMonth)`r`nMonths: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.Months)") } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Storage-Level Corruption Guard (SLCG)' -eq "No" } | Set-Style -Style Warning -Property 'Storage-Level Corruption Guard (SLCG)' @@ -362,21 +362,21 @@ function Get-AbrVbrFileShareBackupjobConf { try { Write-PScriboMessage "Discovered $($Bkjob.Name) notification options." $inObj = [ordered] @{ - 'Send Snmp Notification' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.SnmpNotification - 'Send Email Notification' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.SendEmailNotification2AdditionalAddresses + 'Send Snmp Notification' = $Bkjob.Options.NotificationOptions.SnmpNotification + 'Send Email Notification' = $Bkjob.Options.NotificationOptions.SendEmailNotification2AdditionalAddresses 'Email Notification Additional Addresses' = $Bkjob.Options.NotificationOptions.EmailNotificationAdditionalAddresses 'Email Notify Time' = $Bkjob.Options.NotificationOptions.EmailNotifyTime.ToShortTimeString() - 'Use Custom Email Notification Options' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.UseCustomEmailNotificationOptions + 'Use Custom Email Notification Options' = $Bkjob.Options.NotificationOptions.UseCustomEmailNotificationOptions 'Use Custom Notification Setting' = $Bkjob.Options.NotificationOptions.EmailNotificationSubject - 'Notify On Success' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnSuccess - 'Notify On Warning' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnWarning - 'Notify On Error' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnError - 'Suppress Notification until Last Retry' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnLastRetryOnly - 'Set Results To Vm Notes' = ConvertTo-TextYN $Bkjob.Options.ViSourceOptions.SetResultsToVmNotes + 'Notify On Success' = $Bkjob.Options.NotificationOptions.EmailNotifyOnSuccess + 'Notify On Warning' = $Bkjob.Options.NotificationOptions.EmailNotifyOnWarning + 'Notify On Error' = $Bkjob.Options.NotificationOptions.EmailNotifyOnError + 'Suppress Notification until Last Retry' = $Bkjob.Options.NotificationOptions.EmailNotifyOnLastRetryOnly + 'Set Results To Vm Notes' = $Bkjob.Options.ViSourceOptions.SetResultsToVmNotes 'VM Attribute Note Value' = $Bkjob.Options.ViSourceOptions.VmAttributeName - 'Append to Existing Attribute' = ConvertTo-TextYN $Bkjob.Options.ViSourceOptions.VmNotesAppend + 'Append to Existing Attribute' = $Bkjob.Options.ViSourceOptions.VmNotesAppend } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Notification) - $($Bkjob.Name)" @@ -405,15 +405,15 @@ function Get-AbrVbrFileShareBackupjobConf { } Write-PScriboMessage "Discovered $($Bkjob.Name) script options." $inObj = [ordered] @{ - 'Run the Following Script Before' = ConvertTo-TextYN $Bkjob.Options.JobScriptCommand.PreScriptEnabled + 'Run the Following Script Before' = $Bkjob.Options.JobScriptCommand.PreScriptEnabled 'Run Script Before the Job' = $Bkjob.Options.JobScriptCommand.PreScriptCommandLine - 'Run the Following Script After' = ConvertTo-TextYN $Bkjob.Options.JobScriptCommand.PostScriptEnabled + 'Run the Following Script After' = $Bkjob.Options.JobScriptCommand.PostScriptEnabled 'Run Script After the Job' = $Bkjob.Options.JobScriptCommand.PostScriptCommandLine 'Run Script Frequency' = $Bkjob.Options.JobScriptCommand.Periodicity $FrequencyText = $FrequencyValue } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Script) - $($Bkjob.Name)" @@ -455,7 +455,7 @@ function Get-AbrVbrFileShareBackupjobConf { } $inObj.add("Description", $ArchiveRepoTarget.LongTermBackupRepository.Description) - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Archive Repository $($ArchiveRepoTarget.Name) Section: $($_.Exception.Message)" } @@ -487,7 +487,7 @@ function Get-AbrVbrFileShareBackupjobConf { 'State' = $SecondaryTarget.info.LatestStatus 'Description' = $SecondaryTarget.Description } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Secondary Target $($SecondaryTarget.Name) Section: $($_.Exception.Message)" } @@ -528,15 +528,15 @@ function Get-AbrVbrFileShareBackupjobConf { 'Retry Failed item' = $Bkjob.ScheduleOptions.RetryTimes 'Wait before each retry' = "$($Bkjob.ScheduleOptions.RetryTimeout)/min" 'Backup Window' = Switch ($Bkjob.TypeToString) { - "Backup Copy" { ConvertTo-TextYN $Bkjob.ScheduleOptions.OptionsContinuous.Enabled } - default { ConvertTo-TextYN $Bkjob.ScheduleOptions.OptionsBackupWindow.IsEnabled } + "Backup Copy" { $Bkjob.ScheduleOptions.OptionsContinuous.Enabled } + default { $Bkjob.ScheduleOptions.OptionsBackupWindow.IsEnabled } } 'Shedule type' = $ScheduleType 'Shedule Options' = $Schedule 'Start Time' = $Bkjob.ScheduleOptions.OptionsDaily.TimeLocal.ToShorttimeString() 'Latest Run' = $Bkjob.LatestRunLocal } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Schedule Options - $($Bkjob.Name)" diff --git a/Src/Private/Get-AbrVbrFileSharesInfo.ps1 b/Src/Private/Get-AbrVbrFileSharesInfo.ps1 index 21c2f55..ea3b9ef 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.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -60,7 +60,7 @@ function Get-AbrVbrFileSharesInfo { 'Cache Repository' = $ShareObj.CacheRepository.Name } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "File Shares $($Path) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrFileToTape.ps1 b/Src/Private/Get-AbrVbrFileToTape.ps1 index 8ab4768..06eadab 100644 --- a/Src/Private/Get-AbrVbrFileToTape.ps1 +++ b/Src/Private/Get-AbrVbrFileToTape.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrFileToTape { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -45,9 +45,9 @@ function Get-AbrVbrFileToTape { 'False' { 'Disabled' } default { $TBkjob.NextRun } } - 'Description' = ConvertTo-EmptyToFiller $TBkjob.Description + 'Description' = $TBkjob.Description } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Description' -eq "--" } | Set-Style -Style Warning -Property 'Description' @@ -90,10 +90,10 @@ function Get-AbrVbrFileToTape { 'Type' = $File.Server.Type 'Selection Type' = $File.SelectionType 'Path' = $File.Path - 'Include Filter' = ConvertTo-EmptyToFiller $File.IncludeMask - 'Exclude Filter' = ConvertTo-EmptyToFiller $File.ExcludeMask + 'Include Filter' = $File.IncludeMask + 'Exclude Filter' = $File.ExcludeMask } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Files and Folders $($File.Name) Section: $($_.Exception.Message)" } @@ -113,7 +113,7 @@ function Get-AbrVbrFileToTape { 'Include Filter' = '--' 'Exclude Filter' = '--' } - $OutObj += [pscustomobject]$inobj2 + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Files and Folders $($NDMP.Name) Section: $($_.Exception.Message)" } @@ -147,8 +147,8 @@ function Get-AbrVbrFileToTape { 'Tape Count' = (Get-VBRTapeMedium -MediaPool $BackupMediaPool.Name).count 'Capacity' = ConvertTo-FileSizeString -Size $BackupMediaPool.Capacity 'Remaining' = ConvertTo-FileSizeString -Size $BackupMediaPool.FreeSpace - 'Is WORM' = ConvertTo-TextYN $BackupMediaPool.Worm - 'Schedule Enabled' = ConvertTo-TextYN $TBkjob.FullBackupPolicy.Enabled + 'Is WORM' = $BackupMediaPool.Worm + 'Schedule Enabled' = $TBkjob.FullBackupPolicy.Enabled } if ($BackupMediaPool.Type -eq "Custom" -and $TBkjob.FullBackupPolicy.Enabled) { if ($TBkjob.FullBackupPolicy.Type -eq 'Daily') { @@ -165,7 +165,7 @@ function Get-AbrVbrFileToTape { } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Full Backup $($BackupMediaPool.Name) Section: $($_.Exception.Message)" } @@ -198,8 +198,8 @@ function Get-AbrVbrFileToTape { 'Tape Count' = (Get-VBRTapeMedium -MediaPool $BackupMediaPool.Name).count 'Capacity' = ConvertTo-FileSizeString -Size $BackupMediaPool.Capacity 'Remaining' = ConvertTo-FileSizeString -Size $BackupMediaPool.FreeSpace - 'Is WORM' = ConvertTo-TextYN $BackupMediaPool.Worm - 'Schedule Enabled' = ConvertTo-TextYN $TBkjob.IncrementalBackupPolicy.Enabled + 'Is WORM' = $BackupMediaPool.Worm + 'Schedule Enabled' = $TBkjob.IncrementalBackupPolicy.Enabled } if ($BackupMediaPool.Type -eq "Custom" -and $TBkjob.IncrementalBackupPolicy.Enabled) { if ($TBkjob.IncrementalBackupPolicy.Type -eq 'Daily') { @@ -216,7 +216,7 @@ function Get-AbrVbrFileToTape { } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Incremental Backup $($BackupMediaPool.Name) Section: $($_.Exception.Message)" } @@ -242,11 +242,11 @@ function Get-AbrVbrFileToTape { try { Write-PScriboMessage "Discovered $($TBkjob.Name) options." $inObj = [ordered] @{ - 'Use Microsoft volume shadow copy (VSS)' = ConvertTo-TextYN $TBkjob.UseVss - 'Eject Tape Media Upon Job Completion' = ConvertTo-TextYN $TBkjob.EjectCurrentMedium - 'Export the following MediaSet Upon Job Completion' = ConvertTo-TextYN $TBkjob.ExportCurrentMediaSet + 'Use Microsoft volume shadow copy (VSS)' = $TBkjob.UseVss + 'Eject Tape Media Upon Job Completion' = $TBkjob.EjectCurrentMedium + 'Export the following MediaSet Upon Job Completion' = $TBkjob.ExportCurrentMediaSet } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Options $($TBkjob.Name) Section: $($_.Exception.Message)" } @@ -267,21 +267,21 @@ function Get-AbrVbrFileToTape { try { Write-PScriboMessage "Discovered $($TBkjob.Name) notification options." $inObj = [ordered] @{ - 'Send Email Notification' = ConvertTo-TextYN $TBkjob.NotificationOptions.EnableAdditionalNotification + 'Send Email Notification' = $TBkjob.NotificationOptions.EnableAdditionalNotification 'Email Notification Additional Recipients' = $TBkjob.NotificationOptions.AdditionalAddress -join "," } if (!$TBkjob.NotificationOptions.UseNotificationOptions) { - $inObj.add('Use Global Notification Settings', (ConvertTo-TextYN $TBkjob.NotificationOptions.UseNotificationOptions)) + $inObj.add('Use Global Notification Settings', ($TBkjob.NotificationOptions.UseNotificationOptions)) } elseif ($TBkjob.NotificationOptions.UseNotificationOptions) { $inObj.add('Use Custom Notification Settings', ('Yes')) $inObj.add('Subject', ($TBkjob.NotificationOptions.NotificationSubject)) - $inObj.add('Notify On Success', (ConvertTo-TextYN $TBkjob.NotificationOptions.NotifyOnSuccess)) - $inObj.add('Notify On Warning', (ConvertTo-TextYN $TBkjob.NotificationOptions.NotifyOnWarning)) - $inObj.add('Notify On Error', (ConvertTo-TextYN $TBkjob.NotificationOptions.NotifyOnError)) - $inObj.add('Notify On Last Retry Only', (ConvertTo-TextYN $TBkjob.NotificationOptions.NotifyOnLastRetryOnly)) - $inObj.add('Notify When Waiting For Tape', (ConvertTo-TextYN $TBkjob.NotificationOptions.NotifyWhenWaitingForTape)) + $inObj.add('Notify On Success', ($TBkjob.NotificationOptions.NotifyOnSuccess)) + $inObj.add('Notify On Warning', ($TBkjob.NotificationOptions.NotifyOnWarning)) + $inObj.add('Notify On Error', ($TBkjob.NotificationOptions.NotifyOnError)) + $inObj.add('Notify On Last Retry Only', ($TBkjob.NotificationOptions.NotifyOnLastRetryOnly)) + $inObj.add('Notify When Waiting For Tape', ($TBkjob.NotificationOptions.NotifyWhenWaitingForTape)) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Advanced Settings (Notifications) $($TBkjob.Name) Section: $($_.Exception.Message)" } @@ -307,15 +307,15 @@ function Get-AbrVbrFileToTape { try { Write-PScriboMessage "Discovered $($TBkjob.Name) advanced options." $inObj = [ordered] @{ - 'Use Hardware Compression when available' = ConvertTo-TextYN $TBkjob.UseHardwareCompression + 'Use Hardware Compression when available' = $TBkjob.UseHardwareCompression } if (!$TBkjob.JobScriptOptions.PreScriptEnabled) { - $inObj.add('Pre Job Script Enabled', (ConvertTo-TextYN $TBkjob.JobScriptOptions.PreScriptEnabled)) + $inObj.add('Pre Job Script Enabled', ($TBkjob.JobScriptOptions.PreScriptEnabled)) } elseif ($TBkjob.JobScriptOptions.PreScriptEnabled) { $inObj.add('Run the following script before job', ($TBkjob.JobScriptOptions.PreCommand)) } if (!$TBkjob.JobScriptOptions.PostScriptEnabled) { - $inObj.add('Post Job Script Enabled', (ConvertTo-TextYN $TBkjob.JobScriptOptions.PostScriptEnabled)) + $inObj.add('Post Job Script Enabled', ($TBkjob.JobScriptOptions.PostScriptEnabled)) } elseif ($TBkjob.JobScriptOptions.PostScriptEnabled) { $inObj.add('Run the following script after job', ($TBkjob.JobScriptOptions.PostCommand)) } @@ -329,7 +329,7 @@ function Get-AbrVbrFileToTape { } $inObj.add($FrequencyText, ($FrequencyValue)) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Advanced Settings (Advanced) $($TBkjob.Name) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrGlobalExclusion.ps1 b/Src/Private/Get-AbrVbrGlobalExclusion.ps1 index b6c64e9..9f7dae1 100644 --- a/Src/Private/Get-AbrVbrGlobalExclusion.ps1 +++ b/Src/Private/Get-AbrVbrGlobalExclusion.ps1 @@ -5,7 +5,7 @@ function Get-AbrVbrGlobalExclusion { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -36,9 +36,9 @@ function Get-AbrVbrGlobalExclusion { $inObj = [ordered] @{ 'Name' = $MalwareDetectionExclusion.Name 'Platform' = $MalwareDetectionExclusion.Platform - 'Note' = ConvertTo-EmptyToFiller $MalwareDetectionExclusion.Note + 'Note' = $MalwareDetectionExclusion.Note } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } $TableParams = @{ @@ -64,9 +64,9 @@ function Get-AbrVbrGlobalExclusion { $inObj = [ordered] @{ 'Name' = $VMExclusion.Name 'Platform' = $VMExclusion.Platform - 'Note' = ConvertTo-EmptyToFiller $VMExclusion.Note + 'Note' = $VMExclusion.Note } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } $TableParams = @{ diff --git a/Src/Private/Get-AbrVbrGlobalNotificationSetting.ps1 b/Src/Private/Get-AbrVbrGlobalNotificationSetting.ps1 index 9945924..efa518d 100644 --- a/Src/Private/Get-AbrVbrGlobalNotificationSetting.ps1 +++ b/Src/Private/Get-AbrVbrGlobalNotificationSetting.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrGlobalNotificationSetting { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -37,7 +37,7 @@ function Get-AbrVbrGlobalNotificationSetting { default { 'Unknown' } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.Settings) { $OutObj | Where-Object { $_.'Warn me when free disk space is below' -eq "Disabled" } | Set-Style -Style Warning -Property 'Warn me when free disk space is below' @@ -76,7 +76,7 @@ function Get-AbrVbrGlobalNotificationSetting { default { 'Unknown' } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.Settings) { $OutObj | Where-Object { $_.'Is (Warn me when free disk space is below) Enabled' -eq 'No' } | Set-Style -Style Warning -Property 'Is (Warn me when free disk space is below) Enabled' @@ -105,9 +105,9 @@ function Get-AbrVbrGlobalNotificationSetting { Section -ExcludeFromTOC -Style NOTOCHeading5 'Support Expiration' { $OutObj = @() $inObj = [ordered] @{ - 'Enable notification about support contract expiration' = ConvertTo-TextYN $GlobalNotifications.NotifyOnSupportExpiration + 'Enable notification about support contract expiration' = $GlobalNotifications.NotifyOnSupportExpiration } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.Settings) { $OutObj | Where-Object { $_.'Is (Enable notification about support contract expiration) Enabled' -eq 'No' } | Set-Style -Style Warning -Property 'Enabled' @@ -135,9 +135,9 @@ function Get-AbrVbrGlobalNotificationSetting { Section -ExcludeFromTOC -Style NOTOCHeading5 'Update Notification' { $OutObj = @() $inObj = [ordered] @{ - 'Check for product and hypervisor updates periodically' = ConvertTo-TextYN $GlobalNotifications.NotifyOnUpdates + 'Check for product and hypervisor updates periodically' = $GlobalNotifications.NotifyOnUpdates } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Update Notification Notification - $VeeamBackupServer" diff --git a/Src/Private/Get-AbrVbrHistorySetting.ps1 b/Src/Private/Get-AbrVbrHistorySetting.ps1 index d6e81f5..4a3b61e 100644 --- a/Src/Private/Get-AbrVbrHistorySetting.ps1 +++ b/Src/Private/Get-AbrVbrHistorySetting.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrHistorySetting { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -30,10 +30,10 @@ function Get-AbrVbrHistorySetting { Section -Style Heading4 'History Retention' { $OutObj = @() $inObj = [ordered] @{ - 'Keep All Sessions' = ConvertTo-TextYN $HistorySettings.KeepAllSessions + 'Keep All Sessions' = $HistorySettings.KeepAllSessions 'Retention Limit' = "$($HistorySettings.RetentionLimitWeeks) weeks" } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "History Settings - $VeeamBackupServer" diff --git a/Src/Private/Get-AbrVbrIOControlSetting.ps1 b/Src/Private/Get-AbrVbrIOControlSetting.ps1 index 7d10bf8..5f6cebd 100644 --- a/Src/Private/Get-AbrVbrIOControlSetting.ps1 +++ b/Src/Private/Get-AbrVbrIOControlSetting.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrIOControlSetting { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -35,9 +35,9 @@ function Get-AbrVbrIOControlSetting { $inObj = [ordered] @{ 'Latency Limit' = "$($StorageLatencyControl.LatencyLimitMs)/ms" 'Throttling IO Limit' = "$($StorageLatencyControl.ThrottlingIOLimitMs)/ms" - 'Enabled' = ConvertTo-TextYN $StorageLatencyControl.Enabled + 'Enabled' = $StorageLatencyControl.Enabled } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Storage Latency Control Section: $($_.Exception.Message)" } @@ -76,7 +76,7 @@ function Get-AbrVbrIOControlSetting { 'Latency Limit' = "$($StorageLatencyControl.LatencyLimitMs)/ms" 'Throttling IO Limit' = "$($StorageLatencyControl.ThrottlingIOLimitMs)/ms" } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Per Datastore Latency Control Options Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrInfrastructureSummary.ps1 b/Src/Private/Get-AbrVbrInfrastructureSummary.ps1 index 074914e..ebb2f7f 100644 --- a/Src/Private/Get-AbrVbrInfrastructureSummary.ps1 +++ b/Src/Private/Get-AbrVbrInfrastructureSummary.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrInfrastructureSummary { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.6 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -67,7 +67,7 @@ function Get-AbrVbrInfrastructureSummary { 'Socket Licenses (Total/Used)' = "$($SocketLicenses.LicensedSocketsNumber)/$($SocketLicenses.UsedSocketsNumber)" 'Capacity Licenses (Total/Used)' = "$($CapacityLicenses.LicensedCapacityTb)TB/$($CapacityLicenses.UsedCapacityTb)TB" } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Infrastructure Summary Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrInstalledLicense.ps1 b/Src/Private/Get-AbrVbrInstalledLicense.ps1 index 0113eb0..9569d41 100644 --- a/Src/Private/Get-AbrVbrInstalledLicense.ps1 +++ b/Src/Private/Get-AbrVbrInstalledLicense.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrInstalledLicense { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.6 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -51,11 +51,11 @@ function Get-AbrVbrInstalledLicense { $Null { '--'; break } default { $License.SupportExpirationDate.ToLongDateString() } } - 'Auto Update Enabled' = ConvertTo-TextYN $License.AutoUpdateEnabled - 'Free Agent Instance' = ConvertTo-TextYN $License.FreeAgentInstanceConsumptionEnabled + 'Auto Update Enabled' = $License.AutoUpdateEnabled + 'Free Agent Instance' = $License.FreeAgentInstanceConsumptionEnabled 'Cloud Connect' = $License.CloudConnect } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } } catch { Write-PScriboMessage -IsWarning "Installed License Information $($License.LicensedTo) Section: $($_.Exception.Message)" @@ -91,7 +91,7 @@ function Get-AbrVbrInstalledLicense { 'New Instances' = $License.NewInstancesNumber 'Rental Instances' = $License.RentalInstancesNumber } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } } catch { Write-PScriboMessage -IsWarning "Instance $($License.LicensedTo) Section: $($_.Exception.Message)" @@ -137,7 +137,7 @@ function Get-AbrVbrInstalledLicense { 'Multiplier' = $License.Multiplier 'Used Instances' = $License.UsedInstancesNumber } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } } catch { Write-PScriboMessage -IsWarning "Per Instance Type $($License.LicensedTo) Section: $($_.Exception.Message)" @@ -178,7 +178,7 @@ function Get-AbrVbrInstalledLicense { 'Used Sockets Licenses' = $License.UsedSocketsNumber 'Remaining Sockets Licenses' = $License.RemainingSocketsNumber } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } } catch { Write-PScriboMessage -IsWarning "CPU Socket License Section: $($_.Exception.Message)" @@ -225,7 +225,7 @@ function Get-AbrVbrInstalledLicense { 'Licensed Capacity in TB' = $License.LicensedCapacityTb 'Used Capacity in TB' = $License.UsedCapacityTb } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } } catch { Write-PScriboMessage -IsWarning "Capacity License Section: $($_.Exception.Message)" diff --git a/Src/Private/Get-AbrVbrInventorySummary.ps1 b/Src/Private/Get-AbrVbrInventorySummary.ps1 index a751928..f73c0e1 100644 --- a/Src/Private/Get-AbrVbrInventorySummary.ps1 +++ b/Src/Private/Get-AbrVbrInventorySummary.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrInventorySummary { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.6 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -62,7 +62,7 @@ function Get-AbrVbrInventorySummary { $inObj.add('Object Storage', ($ObjectStorage | Measure-Object).Count) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Inventory Summary Table: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrKMSInfo.ps1 b/Src/Private/Get-AbrVbrKMSInfo.ps1 index 30f7fef..520574d 100644 --- a/Src/Private/Get-AbrVbrKMSInfo.ps1 +++ b/Src/Private/Get-AbrVbrKMSInfo.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrKMSInfo { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -39,9 +39,9 @@ function Get-AbrVbrKMSInfo { 'CA Certificate' = $KMSServer.CACertificate 'Client Certificate' = $KMSServer.ClientCertificate 'Port' = "TCP/$($KMSServer.Port)" - 'Description' = ConvertTo-EmptyToFiller $KMSServer.Description + 'Description' = $KMSServer.Description } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Key Management Server $($KMSServer.Name) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrLocation.ps1 b/Src/Private/Get-AbrVbrLocation.ps1 index bd5be9c..ee13d2a 100644 --- a/Src/Private/Get-AbrVbrLocation.ps1 +++ b/Src/Private/Get-AbrVbrLocation.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrLocation { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -39,7 +39,7 @@ function Get-AbrVbrLocation { 'Name' = $Location.Name 'id' = $Location.id } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Geographical Locations $($Location.Name) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrMalwareDetectionOption.ps1 b/Src/Private/Get-AbrVbrMalwareDetectionOption.ps1 index 5d30377..a1183fc 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.6 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -29,22 +29,22 @@ function Get-AbrVbrMalwareDetectionOption { Section -Style Heading4 'Malware Detection' { $OutObj = @() $inObj = [ordered] @{ - 'Inline entropy analisys' = ConvertTo-TextYN $MalwareDetectionOption.InlineMalwareScanEnabled + 'Inline entropy analisys' = $MalwareDetectionOption.InlineMalwareScanEnabled 'Sensitivity' = $MalwareDetectionOption.Sensitivity - 'File system activity analisys' = ConvertTo-TextYN $MalwareDetectionOption.GuestIndexScanEnabled - 'Update malware definition automatically' = ConvertTo-TextYN $MalwareDetectionOption.UpdateExtensionsListPeriodically + 'File system activity analisys' = $MalwareDetectionOption.GuestIndexScanEnabled + 'Update malware definition automatically' = $MalwareDetectionOption.UpdateExtensionsListPeriodically 'File Mask: Suspicious Extensions' = $MalwareDetectionOption.SuspiciousExtensions -join "," 'File Mask: Non Suspicious Extensions' = $MalwareDetectionOption.NonSuspiciousExtensions -join "," - 'Incident API: Quick Backup On External Event' = ConvertTo-TextYN $MalwareDetectionOption.QuickBackupOnExternalEventEnabled - 'Send SNMP notification for detected malware' = ConvertTo-TextYN $MalwareDetectionOption.NotificationOptions.EnableSnmpNotification - 'Send email notification for detected malware' = ConvertTo-TextYN $MalwareDetectionOption.NotificationOptions.EnableAdditionalNotification + 'Incident API: Quick Backup On External Event' = $MalwareDetectionOption.QuickBackupOnExternalEventEnabled + 'Send SNMP notification for detected malware' = $MalwareDetectionOption.NotificationOptions.EnableSnmpNotification + 'Send email notification for detected malware' = $MalwareDetectionOption.NotificationOptions.EnableAdditionalNotification 'Additional email address' = $MalwareDetectionOption.NotificationOptions.AdditionalAddress - 'Use custom notification settings' = ConvertTo-TextYN $MalwareDetectionOption.NotificationOptions.UseNotificationOptions - 'Notify on success' = ConvertTo-TextYN $MalwareDetectionOption.NotificationOptions.NotifyOnSuccess - 'Notify on warning' = ConvertTo-TextYN $MalwareDetectionOption.NotificationOptions.NotifyOnWarning - 'Notify on error' = ConvertTo-TextYN $MalwareDetectionOption.NotificationOptions.NotifyOnError + 'Use custom notification settings' = $MalwareDetectionOption.NotificationOptions.UseNotificationOptions + 'Notify on success' = $MalwareDetectionOption.NotificationOptions.NotifyOnSuccess + 'Notify on warning' = $MalwareDetectionOption.NotificationOptions.NotifyOnWarning + 'Notify on error' = $MalwareDetectionOption.NotificationOptions.NotifyOnError } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.Settings) { $OutObj | Where-Object { $_.'Update malware definition automatically' -eq 'No' } | Set-Style -Style Warning -Property 'Update malware definition automatically' diff --git a/Src/Private/Get-AbrVbrManagedServer.ps1 b/Src/Private/Get-AbrVbrManagedServer.ps1 index d14adb5..cad0996 100644 --- a/Src/Private/Get-AbrVbrManagedServer.ps1 +++ b/Src/Private/Get-AbrVbrManagedServer.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrManagedServer { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -41,7 +41,7 @@ function Get-AbrVbrManagedServer { default { $ManagedServer.IsUnavailable } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Virtualization Servers and Hosts $($ManagedServer.Name) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrNDMPInfo.ps1 b/Src/Private/Get-AbrVbrNDMPInfo.ps1 index f116ff4..59c2996 100644 --- a/Src/Private/Get-AbrVbrNDMPInfo.ps1 +++ b/Src/Private/Get-AbrVbrNDMPInfo.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrNDMPInfo { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -44,7 +44,7 @@ function Get-AbrVbrNDMPInfo { } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "NDMP Servers $($NDMPObj.Name) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrNetworkTrafficRule.ps1 b/Src/Private/Get-AbrVbrNetworkTrafficRule.ps1 index 8bebd7b..2fba535 100644 --- a/Src/Private/Get-AbrVbrNetworkTrafficRule.ps1 +++ b/Src/Private/Get-AbrVbrNetworkTrafficRule.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrNetworkTrafficRule { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -33,11 +33,11 @@ function Get-AbrVbrNetworkTrafficRule { $OutObj = @() try { $inObj = [ordered] @{ - 'Is Multiple Upload Streams Enabled?' = ConvertTo-TextYN $TrafficOptions.MultipleUploadStreamsEnabled + 'Is Multiple Upload Streams Enabled?' = $TrafficOptions.MultipleUploadStreamsEnabled 'Upload Streams Per Job' = $TrafficOptions.StreamsPerJobCount - 'Is IPv6 Enabled?' = ConvertTo-TextYN $TrafficOptions.IPv6Enabled + 'Is IPv6 Enabled?' = $TrafficOptions.IPv6Enabled } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Network Traffic Rule Options - $VeeamBackupServer" @@ -58,13 +58,13 @@ function Get-AbrVbrNetworkTrafficRule { $inObj = [ordered] @{ 'Name' = $TrafficRule.Name 'Source IP Start' = $TrafficRule.SourceIPStart - 'Source IP End' = ConvertTo-EmptyToFiller $TrafficRule.SourceIPEnd + 'Source IP End' = $TrafficRule.SourceIPEnd 'Target IP Start' = $TrafficRule.TargetIPStart - 'Target IP End' = ConvertTo-EmptyToFiller $TrafficRule.TargetIPEnd - 'Encryption Enabled' = ConvertTo-TextYN $TrafficRule.EncryptionEnabled - 'Throttling' = "Throttling Enabled: $(ConvertTo-TextYN $TrafficRule.ThrottlingEnabled)`r`nThrottling Unit: $($TrafficRule.ThrottlingUnit)`r`nThrottling Value: $($TrafficRule.ThrottlingValue)`r`nThrottling Windows: $(ConvertTo-TextYN $TrafficRule.ThrottlingWindowEnabled)" + 'Target IP End' = $TrafficRule.TargetIPEnd + 'Encryption Enabled' = $TrafficRule.EncryptionEnabled + 'Throttling' = "Throttling Enabled: $($TrafficRule.ThrottlingEnabled)`r`nThrottling Unit: $($TrafficRule.ThrottlingUnit)`r`nThrottling Value: $($TrafficRule.ThrottlingValue)`r`nThrottling Windows: $($TrafficRule.ThrottlingWindowEnabled)" } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.Settings) { $OutObj | Where-Object { $_.'Encryption Enabled' -like 'No' } | Set-Style -Style Warning -Property 'Encryption Enabled' @@ -140,7 +140,7 @@ function Get-AbrVbrNetworkTrafficRule { 'Subnet Mask' = $PreferedNetwork.SubnetMask 'CIDR Notation' = $PreferedNetwork.CIDRNotation } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Preferred Networks $($PreferedNetwork.IpAddress) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrObjectRepository.ps1 b/Src/Private/Get-AbrVbrObjectRepository.ps1 index af35d10..ee1a466 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.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -46,7 +46,7 @@ function Get-AbrVbrObjectRepository { } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Preferred Networks $($ObjectRepo.Name) Section: $($_.Exception.Message)" } @@ -56,7 +56,7 @@ function Get-AbrVbrObjectRepository { $inObj = [ordered] @{ 'Name' = $ObjectRepo.Name 'Type' = $ObjectRepo.Type - 'Use Gateway Server' = ConvertTo-TextYN $ObjectRepo.UseGatewayServer + 'Use Gateway Server' = $ObjectRepo.UseGatewayServer 'Gateway Server' = Switch ($ObjectRepo.GatewayServer.Name) { "" { "--"; break } $Null { "--"; break } @@ -64,7 +64,7 @@ function Get-AbrVbrObjectRepository { } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Preferred Networks $($ObjectRepo.Name) Section: $($_.Exception.Message)" } @@ -106,14 +106,14 @@ function Get-AbrVbrObjectRepository { 'Type' = ($ObjectRepo).Type 'Amazon S3 Folder' = ($ObjectRepo).AmazonS3Folder 'Immutability Period' = $ObjectRepo.ImmutabilityPeriod - 'Immutability Enabled' = ConvertTo-TextYN $ObjectRepo.BackupImmutabilityEnabled - 'Size Limit Enabled' = ConvertTo-TextYN ($ObjectRepo).SizeLimitEnabled + 'Immutability Enabled' = $ObjectRepo.BackupImmutabilityEnabled + 'Size Limit Enabled' = ($ObjectRepo).SizeLimitEnabled 'Size Limit' = ($ObjectRepo).SizeLimit } if ($Null -ne ($ObjectRepo).UseGatewayServer) { - $inObj.add('Use Gateway Server', (ConvertTo-TextYN $ObjectRepo.UseGatewayServer)) + $inObj.add('Use Gateway Server', ($ObjectRepo.UseGatewayServer)) $inObj.add('Gateway Server', $ObjectRepo.GatewayServer.Name) } if ($Null -ne $ObjectRepo.ConnectionType) { @@ -124,8 +124,8 @@ function Get-AbrVbrObjectRepository { } if (($ObjectRepo).Type -eq 'AmazonS3') { $inObj.remove('Service Point') - $inObj.add('Use IA Storage Class', (ConvertTo-TextYN ($ObjectRepo).EnableIAStorageClass)) - $inObj.add('Use OZ IA Storage Class', (ConvertTo-TextYN ($ObjectRepo).EnableOZIAStorageClass)) + $inObj.add('Use IA Storage Class', (($ObjectRepo).EnableIAStorageClass)) + $inObj.add('Use OZ IA Storage Class', (($ObjectRepo).EnableOZIAStorageClass)) } elseif (($ObjectRepo).Type -eq 'AzureBlob') { $inObj.remove('Service Point') $inObj.remove('Amazon S3 Folder') @@ -133,7 +133,7 @@ function Get-AbrVbrObjectRepository { $inObj.add('Azure Blob Name', ($ObjectRepo.AzureBlobFolder).Name) $inObj.add('Azure Blob Container', ($ObjectRepo.AzureBlobFolder).Container) } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.BR) { $OutObj | Where-Object { $_.'Immutability Enabled' -eq 'No' } | Set-Style -Style Warning -Property 'Immutability Enabled' @@ -188,12 +188,12 @@ function Get-AbrVbrObjectRepository { $Null { "Auto Selected"; break } default { $ObjectRepoArchive.GatewayServer.Name.split(".")[0] } } - 'Gateway Server Enabled' = ConvertTo-TextYN $ObjectRepoArchive.UseGatewayServer - 'Immutability Enabled' = ConvertTo-TextYN $ObjectRepoArchive.BackupImmutabilityEnabled + 'Gateway Server Enabled' = $ObjectRepoArchive.UseGatewayServer + 'Immutability Enabled' = $ObjectRepoArchive.BackupImmutabilityEnabled 'Archive Type' = $ObjectRepoArchive.ArchiveType } if ($ObjectRepoArchive.ArchiveType -eq 'AmazonS3Glacier') { - $inObj.add('Deep Archive', (ConvertTo-TextYN $ObjectRepoArchive.UseDeepArchive)) + $inObj.add('Deep Archive', ($ObjectRepoArchive.UseDeepArchive)) $inObj.add('Proxy Instance Type', $ObjectRepoArchive.AmazonProxySpec.InstanceType) $inObj.add('Proxy Instance vCPU', $ObjectRepoArchive.AmazonProxySpec.InstanceType.vCPUs) $inObj.add('Proxy Instance Memory', ([Math]::Round($ObjectRepoArchive.AmazonProxySpec.InstanceType.Memory * 1MB / 1GB))) @@ -214,7 +214,7 @@ function Get-AbrVbrObjectRepository { $inObj.add('Proxy VM Max Disks', $ObjectRepoArchive.AzureProxySpec.VMSize.MaxDisks) $inObj.add('Proxy VM Location', $ObjectRepoArchive.AzureProxySpec.VMSize.Location) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.BR) { $OutObj | Where-Object { $_.'Immutability Enabled' -eq 'No' } | Set-Style -Style Warning -Property 'Immutability Enabled' diff --git a/Src/Private/Get-AbrVbrPhysicalInfrastructure.ps1 b/Src/Private/Get-AbrVbrPhysicalInfrastructure.ps1 index 68e5406..e818db9 100644 --- a/Src/Private/Get-AbrVbrPhysicalInfrastructure.ps1 +++ b/Src/Private/Get-AbrVbrPhysicalInfrastructure.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrPhysicalInfrastructure { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.5 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -41,10 +41,10 @@ function Get-AbrVbrPhysicalInfrastructure { 'Type' = $InventObj.Type 'Container' = $InventObj.Container 'Schedule' = $InventObj.ScheduleOptions - 'Enabled' = ConvertTo-TextYN $InventObj.Enabled + 'Enabled' = $InventObj.Enabled } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Protection Groups Summary $($InventObj.Name) Section: $($_.Exception.Message)" } @@ -76,18 +76,18 @@ function Get-AbrVbrPhysicalInfrastructure { $inObj = [ordered] @{ 'Domain' = ($InventObj).Container.Domain 'Backup Objects' = $InventObj.Container.Entity | ForEach-Object { "Name: $(($_).Name)`r`nType: $(($_).Type)`r`nDistinguished Name: $(($_).DistinguishedName)`r`n" } - 'Exclude VM' = ConvertTo-TextYN ($InventObj).Container.ExcludeVMs - 'Exclude Computers' = ConvertTo-TextYN ($InventObj).Container.ExcludeComputers - 'Exclude Offline Computers' = ConvertTo-TextYN ($InventObj).Container.ExcludeOfflineComputers + 'Exclude VM' = ($InventObj).Container.ExcludeVMs + 'Exclude Computers' = ($InventObj).Container.ExcludeComputers + 'Exclude Offline Computers' = ($InventObj).Container.ExcludeOfflineComputers 'Excluded Entity' = ($InventObj).Container.ExcludedEntity -join ", " 'Master Credentials' = ($InventObj).Container.MasterCredentials - 'Deployment Options' = "Install Agent: $(ConvertTo-TextYN $InventObj.DeploymentOptions.InstallAgent)`r`nUpgrade Automatically: $(ConvertTo-TextYN $InventObj.DeploymentOptions.UpgradeAutomatically)`r`nInstall Driver: $(ConvertTo-TextYN $InventObj.DeploymentOptions.InstallDriver)`r`nReboot If Required: $(ConvertTo-TextYN $InventObj.DeploymentOptions.RebootIfRequired)" + 'Deployment Options' = "Install Agent: $($InventObj.DeploymentOptions.InstallAgent)`r`nUpgrade Automatically: $($InventObj.DeploymentOptions.UpgradeAutomatically)`r`nInstall Driver: $($InventObj.DeploymentOptions.InstallDriver)`r`nReboot If Required: $($InventObj.DeploymentOptions.RebootIfRequired)" } if (($InventObj.NotificationOptions.EnableAdditionalNotification) -like 'True') { - $inObj.add('Notification Options', ("Send Time: $($InventObj.NotificationOptions.SendTime)`r`nAdditional Address: [$($InventObj.NotificationOptions.AdditionalAddress)]`r`nUse Notification Options: $(ConvertTo-TextYN $InventObj.NotificationOptions.UseNotificationOptions)`r`nSubject: $($InventObj.NotificationOptions.NotificationSubject)")) + $inObj.add('Notification Options', ("Send Time: $($InventObj.NotificationOptions.SendTime)`r`nAdditional Address: [$($InventObj.NotificationOptions.AdditionalAddress)]`r`nUse Notification Options: $($InventObj.NotificationOptions.UseNotificationOptions)`r`nSubject: $($InventObj.NotificationOptions.NotificationSubject)")) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Protection Group Configuration - $($InventObj.Name)" @@ -108,13 +108,13 @@ function Get-AbrVbrPhysicalInfrastructure { Section -Style NOTOCHeading6 -ExcludeFromTOC "$($InventObj.Name)" { Write-PScriboMessage "Discovered $($InventObj.Name) Protection Group Setting." $inObj = [ordered] @{ - 'Deployment Options' = "Install Agent: $(ConvertTo-TextYN $InventObj.DeploymentOptions.InstallAgent)`r`nUpgrade Automatically: $(ConvertTo-TextYN $InventObj.DeploymentOptions.UpgradeAutomatically)`r`nInstall Driver: $(ConvertTo-TextYN $InventObj.DeploymentOptions.InstallDriver)`r`nReboot If Required: $(ConvertTo-TextYN $InventObj.DeploymentOptions.RebootIfRequired)" + 'Deployment Options' = "Install Agent: $($InventObj.DeploymentOptions.InstallAgent)`r`nUpgrade Automatically: $($InventObj.DeploymentOptions.UpgradeAutomatically)`r`nInstall Driver: $($InventObj.DeploymentOptions.InstallDriver)`r`nReboot If Required: $($InventObj.DeploymentOptions.RebootIfRequired)" } if (($InventObj.NotificationOptions.EnableAdditionalNotification) -like 'True') { - $inObj.add('Notification Options', ("Send Time: $($InventObj.NotificationOptions.SendTime)`r`nAdditional Address: [$($InventObj.NotificationOptions.AdditionalAddress)]`r`nUse Notification Options: $(ConvertTo-TextYN $InventObj.NotificationOptions.UseNotificationOptions)`r`nSubject: $($InventObj.NotificationOptions.NotificationSubject)")) + $inObj.add('Notification Options', ("Send Time: $($InventObj.NotificationOptions.SendTime)`r`nAdditional Address: [$($InventObj.NotificationOptions.AdditionalAddress)]`r`nUse Notification Options: $($InventObj.NotificationOptions.UseNotificationOptions)`r`nSubject: $($InventObj.NotificationOptions.NotificationSubject)")) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Protection Group Configuration - $($InventObj.Name)" diff --git a/Src/Private/Get-AbrVbrReplFailoverPlan.ps1 b/Src/Private/Get-AbrVbrReplFailoverPlan.ps1 index 8aa4866..12107bf 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.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -35,14 +35,14 @@ function Get-AbrVbrReplFailoverPlan { $inObj = [ordered] @{ 'Platform' = $FailOverPlan.Platform 'Status' = $FailOverPlan.Status - 'Pre Failover Script Enabled' = ConvertTo-TextYN $FailOverPlan.PreFailoverScriptEnabled - 'Pre Failover Command' = ConvertTo-EmptyToFiller $FailOverPlan.PrefailoverCommand - 'Post Failover Script Enabled' = ConvertTo-TextYN $FailOverPlan.PostFailoverScriptEnabled - 'Post Failover Command' = ConvertTo-EmptyToFiller $FailOverPlan.PostfailoverCommand + 'Pre Failover Script Enabled' = $FailOverPlan.PreFailoverScriptEnabled + 'Pre Failover Command' = $FailOverPlan.PrefailoverCommand + 'Post Failover Script Enabled' = $FailOverPlan.PostFailoverScriptEnabled + 'Post Failover Command' = $FailOverPlan.PostfailoverCommand 'VM Count' = $FailOverPlan.VmCount 'Description' = $FailOverPlan.Description } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Replication.Status) { $OutObj | Where-Object { $_.'Status' -ne 'Ready' } | Set-Style -Style Warning -Property 'Status' @@ -98,7 +98,7 @@ function Get-AbrVbrReplFailoverPlan { 'Boot Order' = $FailOverPlansVM.BootOrder 'Boot Delay' = $FailOverPlansVM.BootDelay } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Virtual Machines $($VMInfo.Name) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrReplInfraSummary.ps1 b/Src/Private/Get-AbrVbrReplInfraSummary.ps1 index b587a1f..95627bf 100644 --- a/Src/Private/Get-AbrVbrReplInfraSummary.ps1 +++ b/Src/Private/Get-AbrVbrReplInfraSummary.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrReplInfraSummary { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.6 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -33,7 +33,7 @@ function Get-AbrVbrReplInfraSummary { 'Replicas' = $Replicas.Count 'Failover Plans' = $FailOverPlans.Count } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Replication Inventory - $VeeamBackupServer" diff --git a/Src/Private/Get-AbrVbrReplReplica.ps1 b/Src/Private/Get-AbrVbrReplReplica.ps1 index 307ec6d..af91f4e 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.7 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -40,7 +40,7 @@ function Get-AbrVbrReplReplica { 'Type' = $Replica.TypeToString 'State' = $VM.State } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } } @@ -80,7 +80,7 @@ function Get-AbrVbrReplReplica { 'Creation Time' = $Replica.CreationTime } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Replication.Replica) { $OutObj | Where-Object { $_.'State' -ne 'Ready' } | Set-Style -Style Warning -Property 'State' diff --git a/Src/Private/Get-AbrVbrRepljob.ps1 b/Src/Private/Get-AbrVbrRepljob.ps1 index a761f4d..dd99683 100644 --- a/Src/Private/Get-AbrVbrRepljob.ps1 +++ b/Src/Private/Get-AbrVbrRepljob.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrRepljob { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -43,11 +43,11 @@ function Get-AbrVbrRepljob { } 'Latest Result' = $Bkjob.info.LatestStatus 'Last Run' = Switch ($Bkjob.FindLastSession().EndTimeUTC) { - $null {'Never'} - default {$Bkjob.FindLastSession().EndTimeUTC} + $null { 'Never' } + default { $Bkjob.FindLastSession().EndTimeUTC } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Replication Jobs $($Bkjob.Name) Section: $($_.Exception.Message)" } diff --git a/Src/Private/Get-AbrVbrRepljobHyperV.ps1 b/Src/Private/Get-AbrVbrRepljobHyperV.ps1 index f52a7b4..e650058 100644 --- a/Src/Private/Get-AbrVbrRepljobHyperV.ps1 +++ b/Src/Private/Get-AbrVbrRepljobHyperV.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrRepljobHyperV { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -40,7 +40,7 @@ function Get-AbrVbrRepljobHyperV { 'Creation Time' = $VMcount.CreationTime 'VM Count' = try { (Get-VBRReplica | Where-Object { $_.JobName -eq $VMcount.Name }).VMcount } catch { Out-Null } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Hyper-V Replication Jobs Configuration Table: $($_.Exception.Message)" } @@ -75,10 +75,10 @@ function Get-AbrVbrRepljobHyperV { 'Total Backup Size' = ConvertTo-FileSizeString -Size $CommonInfo.IncludedSize 'Target Address' = $CommonInfo.TargetDir 'Target File' = $CommonInfo.TargetFile - 'Description' = ConvertTo-EmptyToFiller $CommonInfo.CommonInfo.Description + 'Description' = $CommonInfo.CommonInfo.Description 'Modified By' = $CommonInfo.CommonInfo.ModifiedBy.FullName } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Hyper-V Replication Jobs Common Information Table: $($_.Exception.Message)" } @@ -114,7 +114,7 @@ function Get-AbrVbrRepljobHyperV { 'Path' = $Destination.TargetFolder } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Hyper-V Replication Jobs $($HostorCluster) Destination Table: $($_.Exception.Message)" } @@ -144,7 +144,7 @@ function Get-AbrVbrRepljobHyperV { 'Source Network' = $NetMapping.SourceNetwork.NetworkName 'Target Network' = $NetMapping.TargetNetwork.NetworkName } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Hyper-V Replication Jobs $($Bkjob.Name) Network Table: $($_.Exception.Message)" } @@ -180,7 +180,7 @@ function Get-AbrVbrRepljobHyperV { 'Target Default Gateway' = $ReIpRule.Target.DefaultGateway 'Target DNS Addresses' = $ReIpRule.Target.DNSAddresses } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Hyper-V Replication Jobs $($Bkjob.Name) Re-IP Rules Table: $($_.Exception.Message)" } @@ -215,7 +215,7 @@ function Get-AbrVbrRepljobHyperV { 'Target Default Gateway' = $ReIpRule.Target.DefaultGateway 'Target DNS Addresses' = $ReIpRule.Target.DNSAddresses } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "Hyper-V Replication Jobs $($Bkjob.Name) Re-IP Rules Table: $($_.Exception.Message)" } @@ -249,7 +249,7 @@ function Get-AbrVbrRepljobHyperV { 'Location' = $OBJ.Location 'Disk Filter Mode' = $OBJ.DiskFilterInfo.Mode } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) } $TableParams = @{ @@ -286,7 +286,7 @@ function Get-AbrVbrRepljobHyperV { 'Replica Name Suffix' = $Bkjob.Options.HvReplicaTargetOptions.ReplicaNameSuffix $RetainString = $Retains } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "$Storage Options - $($Bkjob.Name)" @@ -303,17 +303,17 @@ function Get-AbrVbrRepljobHyperV { try { Write-PScriboMessage "Discovered $($Bkjob.Name) maintenance options." $inObj = [ordered] @{ - 'Storage-Level Corruption Guard (SLCG)' = ConvertTo-TextYN $Bkjob.Options.GenerationPolicy.EnableRechek + 'Storage-Level Corruption Guard (SLCG)' = $Bkjob.Options.GenerationPolicy.EnableRechek 'SLCG Schedule Type' = $Bkjob.Options.GenerationPolicy.RecheckScheduleKind 'SLCG Schedule Day' = $Bkjob.Options.GenerationPolicy.RecheckDays 'SLCG Backup Monthly Schedule' = "Day Of Week: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayOfWeek)`r`nDay Number In Month: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayNumberInMonth)`r`nDay of Month: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayOfMonth)`r`nMonths: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.Months)" - 'Defragment and Compact Full Backup (DCFB)' = ConvertTo-TextYN $Bkjob.Options.GenerationPolicy.EnableCompactFull + 'Defragment and Compact Full Backup (DCFB)' = $Bkjob.Options.GenerationPolicy.EnableCompactFull 'DCFB Schedule Type' = $Bkjob.Options.GenerationPolicy.CompactFullBackupScheduleKind 'DCFB Schedule Day' = $Bkjob.Options.GenerationPolicy.CompactFullBackupDays 'DCFB Backup Monthly Schedule' = "Day Of Week: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.DayOfWeek)`r`nDay Number In Month: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.DayNumberInMonth)`r`nDay of Month: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.DayOfMonth)`r`nMonths: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.Months)" 'Remove deleted item data after' = $Bkjob.Options.BackupStorageOptions.RetainDays } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Storage-Level Corruption Guard (SLCG)' -eq "No" } | Set-Style -Style Warning -Property 'Storage-Level Corruption Guard (SLCG)' @@ -350,9 +350,9 @@ function Get-AbrVbrRepljobHyperV { try { Write-PScriboMessage "Discovered $($Bkjob.Name) traffic options." $inObj = [ordered] @{ - 'Inline Data Deduplication' = ConvertTo-TextYN $Bkjob.Options.BackupStorageOptions.EnableDeduplication - 'Exclude Swap Files Block' = ConvertTo-TextYN $Bkjob.HvSourceOptions.ExcludeSwapFile - 'Exclude Deleted Files Block' = ConvertTo-TextYN $Bkjob.HvSourceOptions.DirtyBlocksNullingEnabled + 'Inline Data Deduplication' = $Bkjob.Options.BackupStorageOptions.EnableDeduplication + 'Exclude Swap Files Block' = $Bkjob.HvSourceOptions.ExcludeSwapFile + 'Exclude Deleted Files Block' = $Bkjob.HvSourceOptions.DirtyBlocksNullingEnabled 'Compression Level' = Switch ($Bkjob.Options.BackupStorageOptions.CompressionLevel) { 0 { 'NONE' } -1 { 'AUTO' } @@ -368,13 +368,13 @@ function Get-AbrVbrRepljobHyperV { 'KbBlockSize4096' { 'Local target (large blocks)' } default { $Bkjob.Options.BackupStorageOptions.StgBlockSize } } - 'Enabled Backup File Encryption' = ConvertTo-TextYN $Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled + 'Enabled Backup File Encryption' = $Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled 'Encryption Key' = Switch ($Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled) { $false { 'None' } default { (Get-VBREncryptionKey | Where-Object { $_.id -eq $Bkjob.Info.PwdKeyId }).Description } } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Enabled Backup File Encryption' -eq 'No' } | Set-Style -Style Warning -Property 'Enabled Backup File Encryption' @@ -413,21 +413,21 @@ function Get-AbrVbrRepljobHyperV { try { Write-PScriboMessage "Discovered $($Bkjob.Name) notification options." $inObj = [ordered] @{ - 'Send Snmp Notification' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.SnmpNotification - 'Send Email Notification' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.SendEmailNotification2AdditionalAddresses + 'Send Snmp Notification' = $Bkjob.Options.NotificationOptions.SnmpNotification + 'Send Email Notification' = $Bkjob.Options.NotificationOptions.SendEmailNotification2AdditionalAddresses 'Email Notification Additional Addresses' = $Bkjob.Options.NotificationOptions.EmailNotificationAdditionalAddresses 'Email Notify Time' = $Bkjob.Options.NotificationOptions.EmailNotifyTime.ToShortTimeString() - 'Use Custom Email Notification Options' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.UseCustomEmailNotificationOptions + 'Use Custom Email Notification Options' = $Bkjob.Options.NotificationOptions.UseCustomEmailNotificationOptions 'Use Custom Notification Setting' = $Bkjob.Options.NotificationOptions.EmailNotificationSubject - 'Notify On Success' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnSuccess - 'Notify On Warning' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnWarning - 'Notify On Error' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnError - 'Suppress Notification until Last Retry' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnLastRetryOnly - 'Set Results To Vm Notes' = ConvertTo-TextYN $Bkjob.Options.HvSourceOptions.SetResultsToVmNotes + 'Notify On Success' = $Bkjob.Options.NotificationOptions.EmailNotifyOnSuccess + 'Notify On Warning' = $Bkjob.Options.NotificationOptions.EmailNotifyOnWarning + 'Notify On Error' = $Bkjob.Options.NotificationOptions.EmailNotifyOnError + 'Suppress Notification until Last Retry' = $Bkjob.Options.NotificationOptions.EmailNotifyOnLastRetryOnly + 'Set Results To Vm Notes' = $Bkjob.Options.HvSourceOptions.SetResultsToVmNotes 'VM Attribute Note Value' = $Bkjob.Options.HvSourceOptions.VmAttributeName - 'Append to Existing Attribute' = ConvertTo-TextYN $Bkjob.Options.HvSourceOptions.VmNotesAppend + 'Append to Existing Attribute' = $Bkjob.Options.HvSourceOptions.VmNotesAppend } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Notification) - $($Bkjob.Name)" @@ -449,12 +449,12 @@ function Get-AbrVbrRepljobHyperV { try { Write-PScriboMessage "Discovered $($Bkjob.Name) Hyper-V options." $inObj = [ordered] @{ - 'Enable Hyper-V Guest Quiescence' = ConvertTo-TextYN $Bkjob.Options.HvSourceOptions.EnableHvQuiescence - 'Crash Consistent Backup' = ConvertTo-TextYN $Bkjob.Options.HvSourceOptions.CanDoCrashConsistent - 'Use Change Block Tracking' = ConvertTo-TextYN $Bkjob.Options.HvSourceOptions.UseChangeTracking - 'Volume Snapshot' = ConvertTo-TextYN $Bkjob.Options.HvSourceOptions.GroupSnapshotProcessing + 'Enable Hyper-V Guest Quiescence' = $Bkjob.Options.HvSourceOptions.EnableHvQuiescence + 'Crash Consistent Backup' = $Bkjob.Options.HvSourceOptions.CanDoCrashConsistent + 'Use Change Block Tracking' = $Bkjob.Options.HvSourceOptions.UseChangeTracking + 'Volume Snapshot' = $Bkjob.Options.HvSourceOptions.GroupSnapshotProcessing } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Hyper-V) - $($Bkjob.Name)" @@ -476,13 +476,13 @@ function Get-AbrVbrRepljobHyperV { try { Write-PScriboMessage "Discovered $($Bkjob.Name) Integration options." $inObj = [ordered] @{ - 'Enable Backup from Storage Snapshots' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.UseSanSnapshots - 'Limit processed VM count per Storage Snapshot' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.MultipleStorageSnapshotEnabled + 'Enable Backup from Storage Snapshots' = $Bkjob.Options.SanIntegrationOptions.UseSanSnapshots + 'Limit processed VM count per Storage Snapshot' = $Bkjob.Options.SanIntegrationOptions.MultipleStorageSnapshotEnabled 'VM count per Storage Snapshot' = $Bkjob.Options.SanIntegrationOptions.MultipleStorageSnapshotVmsCount - 'Failover to Standard Backup' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.FailoverFromSan - 'Failover to Primary Storage Snapshot' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.Failover2StorageSnapshotBackup + 'Failover to Standard Backup' = $Bkjob.Options.SanIntegrationOptions.FailoverFromSan + 'Failover to Primary Storage Snapshot' = $Bkjob.Options.SanIntegrationOptions.Failover2StorageSnapshotBackup } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Integration) - $($Bkjob.Name)" @@ -511,15 +511,15 @@ function Get-AbrVbrRepljobHyperV { } Write-PScriboMessage "Discovered $($Bkjob.Name) script options." $inObj = [ordered] @{ - 'Run the Following Script Before' = ConvertTo-TextYN $Bkjob.Options.JobScriptCommand.PreScriptEnabled + 'Run the Following Script Before' = $Bkjob.Options.JobScriptCommand.PreScriptEnabled 'Run Script Before the Job' = $Bkjob.Options.JobScriptCommand.PreScriptCommandLine - 'Run the Following Script After' = ConvertTo-TextYN $Bkjob.Options.JobScriptCommand.PostScriptEnabled + 'Run the Following Script After' = $Bkjob.Options.JobScriptCommand.PostScriptEnabled 'Run Script After the Job' = $Bkjob.Options.JobScriptCommand.PostScriptCommandLine 'Run Script Frequency' = $Bkjob.Options.JobScriptCommand.Periodicity $FrequencyText = $FrequencyValue } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Script) - $($Bkjob.Name)" @@ -541,12 +541,12 @@ function Get-AbrVbrRepljobHyperV { try { Write-PScriboMessage "Discovered $($Bkjob.Name) rpo monitor options." $inObj = [ordered] @{ - 'RPO Monitor Enabled' = ConvertTo-TextYN $Bkjob.Options.RpoOptions.Enabled + 'RPO Monitor Enabled' = $Bkjob.Options.RpoOptions.Enabled 'If Backup is not Copied Within' = "$($Bkjob.Options.RpoOptions.Value) $($Bkjob.Options.RpoOptions.TimeUnit)" - 'Log Backup RPO Monitor Enabled' = ConvertTo-TextYN $Bkjob.Options.RpoOptions.LogBackupRpoEnabled + 'Log Backup RPO Monitor Enabled' = $Bkjob.Options.RpoOptions.LogBackupRpoEnabled 'If Log Backup is not Copied Within' = "$($Bkjob.Options.RpoOptions.LogBackupRpoValue) $($Bkjob.Options.RpoOptions.LogBackupRpoTimeUnit)" } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (RPO Monitor) - $($Bkjob.Name)" @@ -581,7 +581,7 @@ function Get-AbrVbrRepljobHyperV { { $_ -gt 1 } { "Automatic" } default { $Bkjob.GetTargetProxies().Name } } - 'Use Wan accelerator' = ConvertTo-TextYN $Bkjob.IsWanAcceleratorEnabled() + 'Use Wan accelerator' = $Bkjob.IsWanAcceleratorEnabled() } if ($Bkjob.IsWanAcceleratorEnabled()) { try { @@ -597,7 +597,7 @@ function Get-AbrVbrRepljobHyperV { $inObj.add('Source Wan accelerator', $SourceWanAccelerator) $inObj.add('Target Wan accelerator', $TargetWanAccelerator) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Data Transfer - $($Bkjob.Name)" @@ -622,10 +622,10 @@ function Get-AbrVbrRepljobHyperV { } else { $SeedRepo = 'Disabled' } $inObj = [ordered] @{ 'Seed from Backup Repository' = $SeedRepo - 'Map Replica to Existing VM' = ConvertTo-TextYN $Bkjob.Options.HvReplicaTargetOptions.UseVmMapping + 'Map Replica to Existing VM' = $Bkjob.Options.HvReplicaTargetOptions.UseVmMapping } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Seeding - $($Bkjob.Name)" @@ -650,10 +650,10 @@ function Get-AbrVbrRepljobHyperV { Write-PScriboMessage "Discovered $($Bkjob.Name) guest processing." $inObj = [ordered] @{ 'Name' = $VSSObj.Name - 'Enabled' = ConvertTo-TextYN $VSSObj.VssOptions.Enabled + 'Enabled' = $VSSObj.VssOptions.Enabled 'Resource Type' = ($Bkjob.GetHvOijs() | Where-Object { $_.Name -eq $VSSObj.Name -and ($_.Type -eq "Include" -or $_.Type -eq "VssChild") }).Object.Type - 'Ignore Errors' = ConvertTo-TextYN $VSSObj.VssOptions.IgnoreErrors - 'Guest Proxy Auto Detect' = ConvertTo-TextYN $VSSObj.VssOptions.GuestProxyAutoDetect + 'Ignore Errors' = $VSSObj.VssOptions.IgnoreErrors + 'Guest Proxy Auto Detect' = $VSSObj.VssOptions.GuestProxyAutoDetect 'Default Credential' = Switch ((Get-VBRCredentials | Where-Object { $_.Id -eq $Bkjob.VssOptions.WinCredsId.Guid }).count) { 0 { 'None' } Default { Get-VBRCredentials | Where-Object { $_.Id -eq $Bkjob.VssOptions.WinCredsId.Guid } } @@ -662,12 +662,12 @@ function Get-AbrVbrRepljobHyperV { '00000000-0000-0000-0000-000000000000' { 'Default Credential' } default { Get-VBRCredentials | Where-Object { $_.Id -eq $VSSObj.VssOptions.WinCredsId.Guid } } } - 'Application Processing' = ConvertTo-TextYN $VSSObj.VssOptions.VssSnapshotOptions.ApplicationProcessingEnabled + 'Application Processing' = $VSSObj.VssOptions.VssSnapshotOptions.ApplicationProcessingEnabled 'Transaction Logs' = Switch ($VSSObj.VssOptions.VssSnapshotOptions.IsCopyOnly) { 'False' { 'Process Transaction Logs' } 'True' { 'Perform Copy Only' } } - 'Use Persistent Guest Agent' = ConvertTo-TextYN $VSSObj.VssOptions.VssSnapshotOptions.UsePersistentGuestAgent + 'Use Persistent Guest Agent' = $VSSObj.VssOptions.VssSnapshotOptions.UsePersistentGuestAgent } if ($InfoLevel.Jobs.Replication -ge 2) { if (!$VSSObj.VssOptions.VssSnapshotOptions.IsCopyOnly) { @@ -708,7 +708,7 @@ function Get-AbrVbrRepljobHyperV { $inObj.add('Oracle Retain Log Backups', $($RetainLogBackups)) } if ($VSSObj.VssOptions.GuestFSExcludeOptions.FileExcludeEnabled) { - $inObj.add('File Exclusions', (ConvertTo-TextYN $VSSObj.VssOptions.GuestFSExcludeOptions.FileExcludeEnabled)) + $inObj.add('File Exclusions', ($VSSObj.VssOptions.GuestFSExcludeOptions.FileExcludeEnabled)) if ($VSSObj.VssOptions.GuestFSExcludeOptions.BackupScope -eq 'ExcludeSpecifiedFolders') { $inObj.add('Exclude the following file and folders', ($VSSObj.VssOptions.GuestFSExcludeOptions.ExcludeList -join ',')) } elseif ($VSSObj.VssOptions.GuestFSExcludeOptions.BackupScope -eq 'IncludeSpecifiedFolders') { @@ -721,7 +721,7 @@ function Get-AbrVbrRepljobHyperV { 'IgnoreErrors' { 'Ignore script execution failures' } 'Disabled' { 'Disable script execution' } } - $inObj.add('Scripts', (ConvertTo-TextYN $VSSObj.VssOptions.GuestScriptsOptions.IsAtLeastOneScriptSet)) + $inObj.add('Scripts', ($VSSObj.VssOptions.GuestScriptsOptions.IsAtLeastOneScriptSet)) $inObj.add('Scripts Mode', ($ScriptingMode)) if ($VSSObj.VssOptions.GuestScriptsOptions.WinScriptFiles.IsAtLeastOneScriptSet) { $inObj.add('Windows Pre-freeze script', ($VSSObj.VssOptions.GuestScriptsOptions.WinScriptFiles.PreScriptFilePath)) @@ -733,7 +733,7 @@ function Get-AbrVbrRepljobHyperV { } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Guest Processing Options - $($VSSObj.Name)" @@ -771,13 +771,13 @@ function Get-AbrVbrRepljobHyperV { $inObj = [ordered] @{ 'Retry Failed item' = $Bkjob.ScheduleOptions.RetryTimes 'Wait before each retry' = "$($Bkjob.ScheduleOptions.RetryTimeout)/min" - 'Backup Window' = ConvertTo-TextYN $Bkjob.ScheduleOptions.OptionsBackupWindow.IsEnabled + 'Backup Window' = $Bkjob.ScheduleOptions.OptionsBackupWindow.IsEnabled 'Shedule type' = $ScheduleType 'Shedule Options' = $Schedule 'Start Time' = $Bkjob.ScheduleOptions.OptionsDaily.TimeLocal.ToShorttimeString() 'Latest Run' = $Bkjob.LatestRunLocal } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Schedule Options - $($Bkjob.Name)" diff --git a/Src/Private/Get-AbrVbrRepljobVMware.ps1 b/Src/Private/Get-AbrVbrRepljobVMware.ps1 index 96e058e..117e829 100644 --- a/Src/Private/Get-AbrVbrRepljobVMware.ps1 +++ b/Src/Private/Get-AbrVbrRepljobVMware.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrRepljobVMware { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -38,9 +38,9 @@ function Get-AbrVbrRepljobVMware { $inObj = [ordered] @{ 'Name' = $VMcount.Name 'Creation Time' = $VMcount.Info.CreationTimeUtc.ToLongDateString() - 'VM Count' = try {((Get-VBRReplica | Where-Object { $_.JobName -eq $VMcount.Name }).VMcount | Measure-Object -Sum).Count} catch {Out-Null} + 'VM Count' = try { ((Get-VBRReplica | Where-Object { $_.JobName -eq $VMcount.Name }).VMcount | Measure-Object -Sum).Count } catch { Out-Null } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "VMware Replication Summary $($VMcount.Name) Table: $($_.Exception.Message)" } @@ -75,10 +75,10 @@ function Get-AbrVbrRepljobVMware { 'Total Backup Size' = ConvertTo-FileSizeString -Size $CommonInfo.IncludedSize 'Target Address' = $CommonInfo.TargetDir 'Target File' = $CommonInfo.TargetFile - 'Description' = ConvertTo-EmptyToFiller $CommonInfo.CommonInfo.Description + 'Description' = $CommonInfo.CommonInfo.Description 'Modified By' = $CommonInfo.CommonInfo.ModifiedBy.FullName } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "VMware Replication Jobs Common Information $($Bkjob.Name) Table: $($_.Exception.Message)" } @@ -115,7 +115,7 @@ function Get-AbrVbrRepljobVMware { 'VM Folder' = $Destination.ReplicaTargetVmFolderName 'Datastore' = $Destination.DatastoreName } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "VMware Replication Jobs $($Bkjob.Name) Destination Table: $($_.Exception.Message)" } @@ -145,7 +145,7 @@ function Get-AbrVbrRepljobVMware { 'Source Network' = $NetMapping.SourceNetwork 'Target Network' = $NetMapping.TargetNetwork } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "VMware Replication Jobs $($Bkjob.Name) Network Table: $($_.Exception.Message)" } @@ -181,7 +181,7 @@ function Get-AbrVbrRepljobVMware { 'Target Default Gateway' = $ReIpRule.Target.DefaultGateway 'Target DNS Addresses' = $ReIpRule.Target.DNSAddresses } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "VMware Replication Jobs $($Bkjob.Name) Re-IP Rules Table: $($_.Exception.Message)" } @@ -216,7 +216,7 @@ function Get-AbrVbrRepljobVMware { 'Target Default Gateway' = $ReIpRule.Target.DefaultGateway 'Target DNS Addresses' = $ReIpRule.Target.DNSAddresses } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning "VMware Replication Jobs $($Bkjob.Name) Re-IP Rules Table: $($_.Exception.Message)" } @@ -250,7 +250,7 @@ function Get-AbrVbrRepljobVMware { 'Approx Size' = $OBJ.ApproxSizeString 'Disk Filter Mode' = $OBJ.DiskFilterInfo.Mode } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) } $TableParams = @{ @@ -287,7 +287,7 @@ function Get-AbrVbrRepljobVMware { 'Replica Name Suffix' = $Bkjob.Options.ViReplicaTargetOptions.ReplicaNameSuffix $RetainString = $Retains } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "$Storage Options - $($Bkjob.Name)" @@ -304,18 +304,18 @@ function Get-AbrVbrRepljobVMware { try { Write-PScriboMessage "Discovered $($Bkjob.Name) maintenance options." $inObj = [ordered] @{ - 'Storage-Level Corruption Guard (SLCG)' = ConvertTo-TextYN $Bkjob.Options.GenerationPolicy.EnableRechek + 'Storage-Level Corruption Guard (SLCG)' = $Bkjob.Options.GenerationPolicy.EnableRechek 'SLCG Schedule Type' = $Bkjob.Options.GenerationPolicy.RecheckScheduleKind 'SLCG Schedule Day' = $Bkjob.Options.GenerationPolicy.RecheckDays 'SLCG Backup Monthly Schedule' = "Day Of Week: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayOfWeek)`r`nDay Number In Month: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayNumberInMonth)`r`nDay of Month: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayOfMonth)`r`nMonths: $($Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.Months)" - 'Defragment and Compact Full Backup (DCFB)' = ConvertTo-TextYN $Bkjob.Options.GenerationPolicy.EnableCompactFull + 'Defragment and Compact Full Backup (DCFB)' = $Bkjob.Options.GenerationPolicy.EnableCompactFull 'DCFB Schedule Type' = $Bkjob.Options.GenerationPolicy.CompactFullBackupScheduleKind 'DCFB Schedule Day' = $Bkjob.Options.GenerationPolicy.CompactFullBackupDays 'DCFB Backup Monthly Schedule' = "Day Of Week: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.DayOfWeek)`r`nDay Number In Month: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.DayNumberInMonth)`r`nDay of Month: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.DayOfMonth)`r`nMonths: $($Bkjob.Options.GenerationPolicy.CompactFullBackupMonthlyScheduleOptions.Months)" 'Remove deleted item data after' = $Bkjob.Options.BackupStorageOptions.RetainDays } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Storage-Level Corruption Guard (SLCG)' -eq "No" } | Set-Style -Style Warning -Property 'Storage-Level Corruption Guard (SLCG)' @@ -354,9 +354,9 @@ function Get-AbrVbrRepljobVMware { try { Write-PScriboMessage "Discovered $($Bkjob.Name) traffic options." $inObj = [ordered] @{ - 'Inline Data Deduplication' = ConvertTo-TextYN $Bkjob.Options.BackupStorageOptions.EnableDeduplication - 'Exclude Swap Files Block' = ConvertTo-TextYN $Bkjob.ViSourceOptions.ExcludeSwapFile - 'Exclude Deleted Files Block' = ConvertTo-TextYN $Bkjob.ViSourceOptions.DirtyBlocksNullingEnabled + 'Inline Data Deduplication' = $Bkjob.Options.BackupStorageOptions.EnableDeduplication + 'Exclude Swap Files Block' = $Bkjob.ViSourceOptions.ExcludeSwapFile + 'Exclude Deleted Files Block' = $Bkjob.ViSourceOptions.DirtyBlocksNullingEnabled 'Compression Level' = Switch ($Bkjob.Options.BackupStorageOptions.CompressionLevel) { 0 { 'NONE' } -1 { 'AUTO' } @@ -372,13 +372,13 @@ function Get-AbrVbrRepljobVMware { 'KbBlockSize4096' { 'Local target (large blocks)' } default { $Bkjob.Options.BackupStorageOptions.StgBlockSize } } - 'Enabled Backup File Encryption' = ConvertTo-TextYN $Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled + 'Enabled Backup File Encryption' = $Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled 'Encryption Key' = Switch ($Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled) { $false { 'None' } default { (Get-VBREncryptionKey | Where-Object { $_.id -eq $Bkjob.Info.PwdKeyId }).Description } } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Jobs.BestPractice) { $OutObj | Where-Object { $_.'Enabled Backup File Encryption' -eq 'No' } | Set-Style -Style Warning -Property 'Enabled Backup File Encryption' @@ -417,21 +417,21 @@ function Get-AbrVbrRepljobVMware { try { Write-PScriboMessage "Discovered $($Bkjob.Name) notification options." $inObj = [ordered] @{ - 'Send Snmp Notification' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.SnmpNotification - 'Send Email Notification' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.SendEmailNotification2AdditionalAddresses + 'Send Snmp Notification' = $Bkjob.Options.NotificationOptions.SnmpNotification + 'Send Email Notification' = $Bkjob.Options.NotificationOptions.SendEmailNotification2AdditionalAddresses 'Email Notification Additional Addresses' = $Bkjob.Options.NotificationOptions.EmailNotificationAdditionalAddresses 'Email Notify Time' = $Bkjob.Options.NotificationOptions.EmailNotifyTime.ToShortTimeString() - 'Use Custom Email Notification Options' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.UseCustomEmailNotificationOptions + 'Use Custom Email Notification Options' = $Bkjob.Options.NotificationOptions.UseCustomEmailNotificationOptions 'Use Custom Notification Setting' = $Bkjob.Options.NotificationOptions.EmailNotificationSubject - 'Notify On Success' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnSuccess - 'Notify On Warning' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnWarning - 'Notify On Error' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnError - 'Suppress Notification until Last Retry' = ConvertTo-TextYN $Bkjob.Options.NotificationOptions.EmailNotifyOnLastRetryOnly - 'Set Results To Vm Notes' = ConvertTo-TextYN $Bkjob.Options.ViSourceOptions.SetResultsToVmNotes + 'Notify On Success' = $Bkjob.Options.NotificationOptions.EmailNotifyOnSuccess + 'Notify On Warning' = $Bkjob.Options.NotificationOptions.EmailNotifyOnWarning + 'Notify On Error' = $Bkjob.Options.NotificationOptions.EmailNotifyOnError + 'Suppress Notification until Last Retry' = $Bkjob.Options.NotificationOptions.EmailNotifyOnLastRetryOnly + 'Set Results To Vm Notes' = $Bkjob.Options.ViSourceOptions.SetResultsToVmNotes 'VM Attribute Note Value' = $Bkjob.Options.ViSourceOptions.VmAttributeName - 'Append to Existing Attribute' = ConvertTo-TextYN $Bkjob.Options.ViSourceOptions.VmNotesAppend + 'Append to Existing Attribute' = $Bkjob.Options.ViSourceOptions.VmNotesAppend } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Notification) - $($Bkjob.Name)" @@ -453,12 +453,12 @@ function Get-AbrVbrRepljobVMware { try { Write-PScriboMessage "Discovered $($Bkjob.Name) vSphere options." $inObj = [ordered] @{ - 'Enable VMware Tools Quiescence' = ConvertTo-TextYN $Bkjob.Options.ViSourceOptions.VMToolsQuiesce - 'Use Change Block Tracking' = ConvertTo-TextYN $Bkjob.Options.ViSourceOptions.UseChangeTracking - 'Enable CBT for all protected VMs' = ConvertTo-TextYN $Bkjob.Options.ViSourceOptions.EnableChangeTracking - 'Reset CBT On each Active Full Backup' = ConvertTo-TextYN $Bkjob.Options.ViSourceOptions.ResetChangeTrackingOnActiveFull + 'Enable VMware Tools Quiescence' = $Bkjob.Options.ViSourceOptions.VMToolsQuiesce + 'Use Change Block Tracking' = $Bkjob.Options.ViSourceOptions.UseChangeTracking + 'Enable CBT for all protected VMs' = $Bkjob.Options.ViSourceOptions.EnableChangeTracking + 'Reset CBT On each Active Full Backup' = $Bkjob.Options.ViSourceOptions.ResetChangeTrackingOnActiveFull } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (vSphere) - $($Bkjob.Name)" @@ -480,13 +480,13 @@ function Get-AbrVbrRepljobVMware { try { Write-PScriboMessage "Discovered $($Bkjob.Name) Integration options." $inObj = [ordered] @{ - 'Enable Backup from Storage Snapshots' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.UseSanSnapshots - 'Limit processed VM count per Storage Snapshot' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.MultipleStorageSnapshotEnabled + 'Enable Backup from Storage Snapshots' = $Bkjob.Options.SanIntegrationOptions.UseSanSnapshots + 'Limit processed VM count per Storage Snapshot' = $Bkjob.Options.SanIntegrationOptions.MultipleStorageSnapshotEnabled 'VM count per Storage Snapshot' = $Bkjob.Options.SanIntegrationOptions.MultipleStorageSnapshotVmsCount - 'Failover to Standard Backup' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.FailoverFromSan - 'Failover to Primary Storage Snapshot' = ConvertTo-TextYN $Bkjob.Options.SanIntegrationOptions.Failover2StorageSnapshotBackup + 'Failover to Standard Backup' = $Bkjob.Options.SanIntegrationOptions.FailoverFromSan + 'Failover to Primary Storage Snapshot' = $Bkjob.Options.SanIntegrationOptions.Failover2StorageSnapshotBackup } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Integration) - $($Bkjob.Name)" @@ -515,15 +515,15 @@ function Get-AbrVbrRepljobVMware { } Write-PScriboMessage "Discovered $($Bkjob.Name) script options." $inObj = [ordered] @{ - 'Run the Following Script Before' = ConvertTo-TextYN $Bkjob.Options.JobScriptCommand.PreScriptEnabled + 'Run the Following Script Before' = $Bkjob.Options.JobScriptCommand.PreScriptEnabled 'Run Script Before the Job' = $Bkjob.Options.JobScriptCommand.PreScriptCommandLine - 'Run the Following Script After' = ConvertTo-TextYN $Bkjob.Options.JobScriptCommand.PostScriptEnabled + 'Run the Following Script After' = $Bkjob.Options.JobScriptCommand.PostScriptEnabled 'Run Script After the Job' = $Bkjob.Options.JobScriptCommand.PostScriptCommandLine 'Run Script Frequency' = $Bkjob.Options.JobScriptCommand.Periodicity $FrequencyText = $FrequencyValue } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (Script) - $($Bkjob.Name)" @@ -545,12 +545,12 @@ function Get-AbrVbrRepljobVMware { try { Write-PScriboMessage "Discovered $($Bkjob.Name) rpo monitor options." $inObj = [ordered] @{ - 'RPO Monitor Enabled' = ConvertTo-TextYN $Bkjob.Options.RpoOptions.Enabled + 'RPO Monitor Enabled' = $Bkjob.Options.RpoOptions.Enabled 'If Backup is not Copied Within' = "$($Bkjob.Options.RpoOptions.Value) $($Bkjob.Options.RpoOptions.TimeUnit)" - 'Log Backup RPO Monitor Enabled' = ConvertTo-TextYN $Bkjob.Options.RpoOptions.LogBackupRpoEnabled + 'Log Backup RPO Monitor Enabled' = $Bkjob.Options.RpoOptions.LogBackupRpoEnabled 'If Log Backup is not Copied Within' = "$($Bkjob.Options.RpoOptions.LogBackupRpoValue) $($Bkjob.Options.RpoOptions.LogBackupRpoTimeUnit)" } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Advanced Settings (RPO Monitor) - $($Bkjob.Name)" @@ -585,7 +585,7 @@ function Get-AbrVbrRepljobVMware { { $_ -gt 1 } { "Automatic" } default { $Bkjob.GetTargetProxies().Name } } - 'Use Wan accelerator' = ConvertTo-TextYN $Bkjob.IsWanAcceleratorEnabled() + 'Use Wan accelerator' = $Bkjob.IsWanAcceleratorEnabled() } if ($Bkjob.IsWanAcceleratorEnabled()) { @@ -603,7 +603,7 @@ function Get-AbrVbrRepljobVMware { $inObj.add('Target Wan accelerator', $TargetWanAccelerator) } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Data Transfer - $($Bkjob.Name)" @@ -628,10 +628,10 @@ function Get-AbrVbrRepljobVMware { } else { $SeedRepo = 'Disabled' } $inObj = [ordered] @{ 'Seed from Backup Repository' = $SeedRepo - 'Map Replica to Existing VM' = ConvertTo-TextYN $Bkjob.Options.ViReplicaTargetOptions.UseVmMapping + 'Map Replica to Existing VM' = $Bkjob.Options.ViReplicaTargetOptions.UseVmMapping } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Seeding - $($Bkjob.Name)" @@ -656,10 +656,10 @@ function Get-AbrVbrRepljobVMware { Write-PScriboMessage "Discovered $($Bkjob.Name) guest processing." $inObj = [ordered] @{ 'Name' = $VSSObj.Name - 'Enabled' = ConvertTo-TextYN $VSSObj.VssOptions.Enabled + 'Enabled' = $VSSObj.VssOptions.Enabled 'Resource Type' = ($Bkjob.GetViOijs() | Where-Object { $_.Name -eq $VSSObj.Name -and ($_.Type -eq "Include" -or $_.Type -eq "VssChild") }).TypeDisplayName - 'Ignore Errors' = ConvertTo-TextYN $VSSObj.VssOptions.IgnoreErrors - 'Guest Proxy Auto Detect' = ConvertTo-TextYN $VSSObj.VssOptions.GuestProxyAutoDetect + 'Ignore Errors' = $VSSObj.VssOptions.IgnoreErrors + 'Guest Proxy Auto Detect' = $VSSObj.VssOptions.GuestProxyAutoDetect 'Default Credential' = Switch ((Get-VBRCredentials | Where-Object { $_.Id -eq $Bkjob.VssOptions.WinCredsId.Guid }).count) { 0 { 'None' } Default { Get-VBRCredentials | Where-Object { $_.Id -eq $Bkjob.VssOptions.WinCredsId.Guid } } @@ -668,12 +668,12 @@ function Get-AbrVbrRepljobVMware { '00000000-0000-0000-0000-000000000000' { 'Default Credential' } default { Get-VBRCredentials | Where-Object { $_.Id -eq $VSSObj.VssOptions.WinCredsId.Guid } } } - 'Application Processing' = ConvertTo-TextYN $VSSObj.VssOptions.VssSnapshotOptions.ApplicationProcessingEnabled + 'Application Processing' = $VSSObj.VssOptions.VssSnapshotOptions.ApplicationProcessingEnabled 'Transaction Logs' = Switch ($VSSObj.VssOptions.VssSnapshotOptions.IsCopyOnly) { 'False' { 'Process Transaction Logs' } 'True' { 'Perform Copy Only' } } - 'Use Persistent Guest Agent' = ConvertTo-TextYN $VSSObj.VssOptions.VssSnapshotOptions.UsePersistentGuestAgent + 'Use Persistent Guest Agent' = $VSSObj.VssOptions.VssSnapshotOptions.UsePersistentGuestAgent } if ($InfoLevel.Jobs.Replication -ge 2) { if (!$VSSObj.VssOptions.VssSnapshotOptions.IsCopyOnly) { @@ -714,7 +714,7 @@ function Get-AbrVbrRepljobVMware { $inObj.add('Oracle Retain Log Backups', $($RetainLogBackups)) } if ($VSSObj.VssOptions.GuestFSExcludeOptions.FileExcludeEnabled) { - $inObj.add('File Exclusions', (ConvertTo-TextYN $VSSObj.VssOptions.GuestFSExcludeOptions.FileExcludeEnabled)) + $inObj.add('File Exclusions', ($VSSObj.VssOptions.GuestFSExcludeOptions.FileExcludeEnabled)) if ($VSSObj.VssOptions.GuestFSExcludeOptions.BackupScope -eq 'ExcludeSpecifiedFolders') { $inObj.add('Exclude the following file and folders', ($VSSObj.VssOptions.GuestFSExcludeOptions.ExcludeList -join ',')) } elseif ($VSSObj.VssOptions.GuestFSExcludeOptions.BackupScope -eq 'IncludeSpecifiedFolders') { @@ -727,7 +727,7 @@ function Get-AbrVbrRepljobVMware { 'IgnoreErrors' { 'Ignore script execution failures' } 'Disabled' { 'Disable script execution' } } - $inObj.add('Scripts', (ConvertTo-TextYN $VSSObj.VssOptions.GuestScriptsOptions.IsAtLeastOneScriptSet)) + $inObj.add('Scripts', ($VSSObj.VssOptions.GuestScriptsOptions.IsAtLeastOneScriptSet)) $inObj.add('Scripts Mode', ($ScriptingMode)) if ($VSSObj.VssOptions.GuestScriptsOptions.WinScriptFiles.IsAtLeastOneScriptSet) { $inObj.add('Windows Pre-freeze script', ($VSSObj.VssOptions.GuestScriptsOptions.WinScriptFiles.PreScriptFilePath)) @@ -739,7 +739,7 @@ function Get-AbrVbrRepljobVMware { } } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Guest Processing Options - $($VSSObj.Name)" @@ -777,13 +777,13 @@ function Get-AbrVbrRepljobVMware { $inObj = [ordered] @{ 'Retry Failed item' = $Bkjob.ScheduleOptions.RetryTimes 'Wait before each retry' = "$($Bkjob.ScheduleOptions.RetryTimeout)/min" - 'Backup Window' = ConvertTo-TextYN $Bkjob.ScheduleOptions.OptionsBackupWindow.IsEnabled + 'Backup Window' = $Bkjob.ScheduleOptions.OptionsBackupWindow.IsEnabled 'Shedule type' = $ScheduleType 'Shedule Options' = $Schedule 'Start Time' = $Bkjob.ScheduleOptions.OptionsDaily.TimeLocal.ToShorttimeString() 'Latest Run' = $Bkjob.LatestRunLocal } - $OutObj = [pscustomobject]$inobj + $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ Name = "Schedule Options - $($Bkjob.Name)" diff --git a/Src/Private/Get-AbrVbrScaleOutRepository.ps1 b/Src/Private/Get-AbrVbrScaleOutRepository.ps1 index 8b590db..debcfe9 100644 --- a/Src/Private/Get-AbrVbrScaleOutRepository.ps1 +++ b/Src/Private/Get-AbrVbrScaleOutRepository.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrScaleOutRepository { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.11 + Version: 0.8.12 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -46,7 +46,7 @@ function Get-AbrVbrScaleOutRepository { default { $BackupRepo.ArchiveExtent.Repository.Name } } } - $OutObj += [pscustomobject]$inobj + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } } catch { Write-PScriboMessage -IsWarning "ScaleOut Backup Repository Table: $($_.Exception.Message)" @@ -83,25 +83,25 @@ function Get-AbrVbrScaleOutRepository { Write-PScriboMessage "Discovered $($BackupRepo.Name) General Settings." $inObj = [ordered] @{ 'Placement Policy' = ($BackupRepo.PolicyType -creplace '([A-Z\W_]|\d+)(? [CmdletBinding()] [OutputType([String])] - Param - ( + Param ( [Parameter ( Position = 0, Mandatory)] [AllowEmptyString()] - [string] - $TEXT + [string] $TEXT ) switch ($TEXT) { - "" { "--" } - $Null { "--" } + "" { "--"; break } + " " { "--"; break } + $Null { "--"; break } "True" { "Yes"; break } "False" { "No"; break } default { $TEXT } @@ -987,7 +990,7 @@ function ConvertTo-HashToYN { try { $result.add($i.Key, (ConvertTo-TextYN $i.Value)) } catch { - Write-PScriboMessage -IsWarning "Unable to process $($i.key) values" + $result.add($i.Key, ($i.Value)) } } if ($result) { diff --git a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 index 4f23cad..c399050 100644 --- a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 @@ -107,7 +107,9 @@ function Invoke-AsBuiltReport.Veeam.VBR { BlankLine if ($InfoLevel.Infrastructure.BackupServer -ge 1) { Get-AbrVbrInfrastructureSummary - Get-AbrVbrSecurityCompliance + if ($VbrVersion -ge 12) { + Get-AbrVbrSecurityCompliance + } Get-AbrVbrBackupServerInfo Get-AbrVbrEnterpriseManagerInfo } @@ -129,7 +131,9 @@ function Invoke-AsBuiltReport.Veeam.VBR { Get-AbrVbrHistorySetting Get-AbrVbrIOControlSetting Get-AbrVbrBackupServerCertificate - Get-AbrVbrNetworkTrafficRule + if ($VbrVersion -ge 12) { + Get-AbrVbrNetworkTrafficRule + } if ($VbrVersion -ge 12.1) { Get-AbrVbrMalwareDetectionOption Get-AbrVbrGlobalExclusion