From d5381cf7a76effd817a84490c7b01894d044e3f1 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Thu, 30 Jan 2025 00:55:37 -0400 Subject: [PATCH 1/2] Bump version to 0.8.14 and update CHANGELOG with new features and fixes --- AsBuiltReport.Veeam.VBR.psd1 | 2 +- AsBuiltreport.Veeam.VBR.json | 3 +- CHANGELOG.md | 16 ++++++++ README.md | 31 +++++++------- Src/Private/Get-AbrVbrBackupCopyjobConf.ps1 | 8 ++-- Src/Private/Get-AbrVbrBackupJobsRP.ps1 | 4 +- Src/Private/Get-AbrVbrBackupProxy.ps1 | 22 +++++----- Src/Private/Get-AbrVbrBackupRepository.ps1 | 6 +-- Src/Private/Get-AbrVbrBackupServerInfo.ps1 | 12 +++--- Src/Private/Get-AbrVbrBackupToTape.ps1 | 12 +++--- Src/Private/Get-AbrVbrBackupjobHyperV.ps1 | 6 +-- Src/Private/Get-AbrVbrBackupjobVMware.ps1 | 38 +++++++++++------ Src/Private/Get-AbrVbrCloudConnectBS.ps1 | 14 +++---- Src/Private/Get-AbrVbrCloudConnectRR.ps1 | 12 +++--- Src/Private/Get-AbrVbrCloudConnectTenant.ps1 | 9 ++-- .../Get-AbrVbrEntraIDBackupjobConf.ps1 | 6 +-- .../Get-AbrVbrFileShareBackupjobConf.ps1 | 4 +- Src/Private/Get-AbrVbrFileToTape.ps1 | 10 ++--- Src/Private/Get-AbrVbrRepljobHyperV.ps1 | 4 +- Src/Private/Get-AbrVbrRepljobVMware.ps1 | 4 +- Src/Private/Get-AbrVbrScaleOutRepository.ps1 | 6 +-- Src/Private/Get-AbrVbrServiceProvider.ps1 | 12 +++--- Src/Private/Get-AbrVbrStorageIsilon.ps1 | 6 +-- Src/Private/Get-AbrVbrStorageOntap.ps1 | 6 +-- Src/Private/Get-AbrVbrTapeBackupJobsRP.ps1 | 4 +- Src/Private/Get-AbrVbrTapeLibrary.ps1 | 6 +-- Src/Private/Get-AbrVbrTapeMediaPool.ps1 | 14 +++---- Src/Private/SharedUtilsFunctions.ps1 | 41 +++++++++++++++---- 28 files changed, 186 insertions(+), 132 deletions(-) diff --git a/AsBuiltReport.Veeam.VBR.psd1 b/AsBuiltReport.Veeam.VBR.psd1 index 0d9b457..87af705 100644 --- a/AsBuiltReport.Veeam.VBR.psd1 +++ b/AsBuiltReport.Veeam.VBR.psd1 @@ -12,7 +12,7 @@ RootModule = 'AsBuiltReport.Veeam.VBR.psm1' # Version number of this module. - ModuleVersion = '0.8.13' + ModuleVersion = '0.8.14' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/AsBuiltreport.Veeam.VBR.json b/AsBuiltreport.Veeam.VBR.json index ced2013..3efb010 100644 --- a/AsBuiltreport.Veeam.VBR.json +++ b/AsBuiltreport.Veeam.VBR.json @@ -21,7 +21,8 @@ "EnableDiagramSignature": false, "SignatureAuthorName": "", "SignatureCompanyName": "", - "PSDefaultAuthentication": "Default" + "PSDefaultAuthentication": "Default", + "RoundUnits": 1 }, "InfoLevel": { "_comment_": "Please refer to the AsBuiltReport project contributing guide for information about how to define InfoLevels.", diff --git a/CHANGELOG.md b/CHANGELOG.md index 24d597a..d523a8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ##### This project is community maintained and has no sponsorship from Veeam, its employees or any of its affiliates. +## [0.8.14] - Unreleased + +### Added + +- Add support for vMWare Cloud Director backup jobs +- Add option to set the RoundUnits of the storage usages + +### Changed + +- Storage units in the report are set to 1 round by default + +### Fixed + +- Fix [#197](https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR/issues/197) +- Fix [#198](https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR/issues/198) + ## [0.8.13] - 2024-12-11 ### Added diff --git a/README.md b/README.md index 5279c65..1f4245f 100644 --- a/README.md +++ b/README.md @@ -155,21 +155,22 @@ The **Report** schema provides configuration of the Veeam VBR report information The **Options** schema allows certain options within the report to be toggled on or off. -| Sub-Schema | Setting | Default | Description | -| ----------------------- | ------------------- | ------- | ------------------------------------------------------------------------------ | -| BackupServerPort | TCP Port | 9392 | Set the backup server service's custom port. | -| PSDefaultAuthentication | Negotiate/Kerberos | Default | Set the PSRemoting authentication method | -| EnableHardwareInventory | true / false | false | Toggle to enable/disable of Hardware information | -| ReportStyle | Veeam/AsBuiltReport | Veeam | Allow to set report style template. | -| EnableDiagrams | true / false | false | Toggle to enable/disable of Infrastructure Diagrams | -| EnableDiagramsDebug | true/false | false | Toggle to enable/disable diagram debug option. | -| DiagramTheme | string | White | Used to set the diagram theme. (Black/White/Neon) | -| DiagramWaterMark | string | empty | Used to set the diagram waterMark. | -| ExportDiagrams | true/false | true | Toggle to enable/disable diagram export option. | -| ExportDiagramsFormat | string array | png | Set the format used to export the infrastructure diagram. (dot, png, pdf, svg) | -| EnableDiagramSignature | true/false | false | Toggle to enable/disable diagram signature (button right corner) | -| SignatureAuthorName | string | empty | Toggle to set signature author name. | -| SignatureCompanyName | string | empty | Toggle to set signature company name. | +| Sub-Schema | Setting | Default | Description | +| ----------------------- | -------------------------- | ------- | ------------------------------------------------------------------------------ | +| BackupServerPort | TCP Port | 9392 | Set the backup server service's custom port. | +| PSDefaultAuthentication | Default/Kerberos/Negotiate | Default | Set the PSRemoting authentication method | +| EnableHardwareInventory | true / false | false | Toggle to enable/disable of Hardware information | +| ReportStyle | Veeam/AsBuiltReport | Veeam | Allow to set report style template. | +| EnableDiagrams | true / false | false | Toggle to enable/disable of Infrastructure Diagrams | +| EnableDiagramsDebug | true/false | false | Toggle to enable/disable diagram debug option. | +| DiagramTheme | string | White | Used to set the diagram theme. (Black/White/Neon) | +| DiagramWaterMark | string | empty | Used to set the diagram waterMark. | +| ExportDiagrams | true/false | true | Toggle to enable/disable diagram export option. | +| ExportDiagramsFormat | string array | png | Set the format used to export the infrastructure diagram. (dot, png, pdf, svg) | +| EnableDiagramSignature | true/false | false | Toggle to enable/disable diagram signature (button right corner) | +| SignatureAuthorName | string | empty | Toggle to set signature author name. | +| SignatureCompanyName | string | empty | Toggle to set signature company name. | +| RoundUnits | int | 1 | Set value to round the storage unit. | ### InfoLevel diff --git a/Src/Private/Get-AbrVbrBackupCopyjobConf.ps1 b/Src/Private/Get-AbrVbrBackupCopyjobConf.ps1 index e5d1e2c..6eaae0f 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.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -98,7 +98,7 @@ function Get-AbrVbrBackupCopyjobConf { $inObj = [ordered] @{ 'Name' = $LinkedBkJob.Name 'Type' = $LinkedBkJob.TypeToString - 'Size' = ConvertTo-FileSizeString -Size $LinkedBkJob.Info.IncludedSize + 'Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $LinkedBkJob.Info.IncludedSize 'Repository' = $LinkedBkJob.GetTargetRepository().Name } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) @@ -132,13 +132,13 @@ function Get-AbrVbrBackupCopyjobConf { $inObj = [ordered] @{ 'Name' = $LinkedRepository.Name 'Type' = "ScaleOut" - 'Size' = ConvertTo-FileSizeString -Size $LinkedRepository.GetContainer().CachedTotalSpace.InBytesAsUInt64 + 'Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $LinkedRepository.GetContainer().CachedTotalSpace.InBytesAsUInt64 } } else { $inObj = [ordered] @{ 'Name' = $LinkedRepository.Name 'Type' = "Standard" - 'Size' = ConvertTo-FileSizeString -Size $LinkedRepository.GetContainer().CachedTotalSpace.InBytesAsUInt64 + 'Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $LinkedRepository.GetContainer().CachedTotalSpace.InBytesAsUInt64 } } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) diff --git a/Src/Private/Get-AbrVbrBackupJobsRP.ps1 b/Src/Private/Get-AbrVbrBackupJobsRP.ps1 index 3063503..3d9d932 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.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -43,7 +43,7 @@ function Get-AbrVbrBackupJobsRP { $inObj = [ordered] @{ 'VM Name' = $RestorePoint.VMName 'Backup Type' = $RestorePoint.Algorithm - 'Backup Size' = (ConvertTo-FileSizeString -Size $RestorePoint.GetStorage().stats.BackupSize) + 'Backup Size' = (ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $RestorePoint.GetStorage().stats.BackupSize) 'Dedub Ratio' = [Math]::Round($DedupRatio, 2) 'Compress Ratio' = [Math]::Round($CompressRatio, 2) 'Reduction' = [Math]::Round(($DedupRatio * $CompressRatio), 2) diff --git a/Src/Private/Get-AbrVbrBackupProxy.ps1 b/Src/Private/Get-AbrVbrBackupProxy.ps1 index 0631eae..7216320 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.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -159,7 +159,7 @@ function Get-AbrVbrBackupProxy { 'Processor Model' = $HWCPU[0].Name 'Number of CPU Cores' = $HWCPU[0].NumberOfCores 'Number of Logical Cores' = $HWCPU[0].NumberOfLogicalProcessors - 'Physical Memory (GB)' = ConvertTo-FileSizeString -Size $HW.CsTotalPhysicalMemory + 'Physical Memory (GB)' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $HW.CsTotalPhysicalMemory } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) @@ -193,7 +193,7 @@ function Get-AbrVbrBackupProxy { 'Model' = $Disk.Model 'Serial Number' = $Disk.SerialNumber 'Partition Style' = $Disk.PartitionStyle - 'Disk Size' = ConvertTo-FileSizeString -Size $Disk.Size + 'Disk Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $Disk.Size } $LocalDiskReport += $TempLocalDiskReport } catch { @@ -229,7 +229,7 @@ function Get-AbrVbrBackupProxy { 'Model' = $Disk.Model 'Serial Number' = $Disk.SerialNumber 'Partition Style' = $Disk.PartitionStyle - 'Disk Size' = ConvertTo-FileSizeString -Size $Disk.Size + 'Disk Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $Disk.Size } $SanDiskReport += $TempSanDiskReport } catch { @@ -262,8 +262,8 @@ function Get-AbrVbrBackupProxy { 'Drive Letter' = $HostVolume.DriveLetter 'File System Label' = $HostVolume.FileSystemLabel 'File System' = $HostVolume.FileSystem - 'Size' = ConvertTo-FileSizeString -Size $HostVolume.Size - 'Free Space' = ConvertTo-FileSizeString -Size $HostVolume.SizeRemaining + 'Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $HostVolume.Size + 'Free Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $HostVolume.SizeRemaining 'Health Status' = $HostVolume.HealthStatus } $HostVolumeReport += $TempHostVolumeReport @@ -611,7 +611,7 @@ function Get-AbrVbrBackupProxy { 'Processor Model' = $HWCPU[0].Name 'Number of CPU Cores' = $HWCPU[0].NumberOfCores 'Number of Logical Cores' = $HWCPU[0].NumberOfLogicalProcessors - 'Physical Memory (GB)' = ConvertTo-FileSizeString -Size $HW.CsTotalPhysicalMemory + 'Physical Memory (GB)' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $HW.CsTotalPhysicalMemory } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) @@ -645,7 +645,7 @@ function Get-AbrVbrBackupProxy { 'Model' = $Disk.Model 'Serial Number' = $Disk.SerialNumber 'Partition Style' = $Disk.PartitionStyle - 'Disk Size' = ConvertTo-FileSizeString -Size $Disk.Size + 'Disk Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $Disk.Size } $LocalDiskReport += $TempLocalDiskReport } catch { @@ -681,7 +681,7 @@ function Get-AbrVbrBackupProxy { 'Model' = $Disk.Model 'Serial Number' = $Disk.SerialNumber 'Partition Style' = $Disk.PartitionStyle - 'Disk Size' = ConvertTo-FileSizeString -Size $Disk.Size + 'Disk Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $Disk.Size } $SanDiskReport += $TempSanDiskReport } catch { @@ -717,8 +717,8 @@ function Get-AbrVbrBackupProxy { 'Drive Letter' = $HostVolume.DriveLetter 'File System Label' = $HostVolume.FileSystemLabel 'File System' = $HostVolume.FileSystem - 'Size' = ConvertTo-FileSizeString -Size $HostVolume.Size - 'Free Space' = ConvertTo-FileSizeString -Size $HostVolume.SizeRemaining + 'Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $HostVolume.Size + 'Free Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $HostVolume.SizeRemaining 'Health Status' = $HostVolume.HealthStatus } $HostVolumeReport += $TempHostVolumeReport diff --git a/Src/Private/Get-AbrVbrBackupRepository.ps1 b/Src/Private/Get-AbrVbrBackupRepository.ps1 index d27d478..0ef544f 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.13 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -46,8 +46,8 @@ function Get-AbrVbrBackupRepository { } $inObj = [ordered] @{ 'Name' = $BackupRepo.Name - 'Total Space' = ConvertTo-FileSizeString -Size $BackupRepo.GetContainer().CachedTotalSpace.InBytesAsUInt64 - 'Free Space' = ConvertTo-FileSizeString -Size $BackupRepo.GetContainer().CachedFreeSpace.InBytesAsUInt64 + 'Total Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $BackupRepo.GetContainer().CachedTotalSpace.InBytesAsUInt64 + 'Free Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $BackupRepo.GetContainer().CachedFreeSpace.InBytesAsUInt64 'Used Space %' = $PercentFree 'Free Space %' = 100 - $PercentFree 'Status' = Switch ($BackupRepo.IsUnavailable) { diff --git a/Src/Private/Get-AbrVbrBackupServerInfo.ps1 b/Src/Private/Get-AbrVbrBackupServerInfo.ps1 index b5f785b..459a481 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.13 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -175,7 +175,7 @@ function Get-AbrVbrBackupServerInfo { 'Processor Model' = $HWCPU[0].Name 'Number of CPU Cores' = ($HWCPU.NumberOfCores | Measure-Object -Sum).Sum 'Number of Logical Cores' = ($HWCPU.NumberOfLogicalProcessors | Measure-Object -Sum).Sum - 'Physical Memory (GB)' = ConvertTo-FileSizeString -Size $HW.CsTotalPhysicalMemory + 'Physical Memory (GB)' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $HW.CsTotalPhysicalMemory } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) @@ -220,7 +220,7 @@ function Get-AbrVbrBackupServerInfo { 'Model' = $Disk.Model 'Serial Number' = $Disk.SerialNumber 'Partition Style' = $Disk.PartitionStyle - 'Disk Size' = ConvertTo-FileSizeString -Size $Disk.Size + 'Disk Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $Disk.Size } $LocalDiskReport += $TempLocalDiskReport } catch { @@ -256,7 +256,7 @@ function Get-AbrVbrBackupServerInfo { 'Model' = $Disk.Model 'Serial Number' = $Disk.SerialNumber 'Partition Style' = $Disk.PartitionStyle - 'Disk Size' = ConvertTo-FileSizeString -Size $Disk.Size + 'Disk Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $Disk.Size } $SanDiskReport += $TempSanDiskReport } catch { @@ -292,8 +292,8 @@ function Get-AbrVbrBackupServerInfo { 'Drive Letter' = $HostVolume.DriveLetter 'File System Label' = $HostVolume.FileSystemLabel 'File System' = $HostVolume.FileSystem - 'Size' = ConvertTo-FileSizeString -Size $HostVolume.Size - 'Free Space' = ConvertTo-FileSizeString -Size $HostVolume.SizeRemaining + 'Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $HostVolume.Size + 'Free Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $HostVolume.SizeRemaining 'Health Status' = $HostVolume.HealthStatus } $HostVolumeReport += $TempHostVolumeReport diff --git a/Src/Private/Get-AbrVbrBackupToTape.ps1 b/Src/Private/Get-AbrVbrBackupToTape.ps1 index 5fe7bd0..eae239b 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.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -46,7 +46,7 @@ function Get-AbrVbrBackupToTape { $inObj = [ordered] @{ 'Name' = $TBkjob.Name 'Type' = $TBkjob.Type - 'Total Backup Size' = ConvertTo-FileSizeString -Size $TotalBackupSize + 'Total Backup Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $TotalBackupSize 'Next Run' = Switch ($TBkjob.Enabled) { 'False' { 'Disabled' } default { $TBkjob.NextRun } @@ -99,8 +99,8 @@ function Get-AbrVbrBackupToTape { $Type = 'Backup Job' } if ($LinkedBkJob.Group -eq 'BackupRepository') { - $TotalBackupSize = ConvertTo-FileSizeString -Size ($LinkedBkJob.GetContainer().CachedTotalSpace.InBytes - $LinkedBkJob.GetContainer().CachedFreeSpace.InBytes) - } else { $TotalBackupSize = ConvertTo-FileSizeString -Size $LinkedBkJob.Info.IncludedSize } + $TotalBackupSize = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size ($LinkedBkJob.GetContainer().CachedTotalSpace.InBytes - $LinkedBkJob.GetContainer().CachedFreeSpace.InBytes) + } else { $TotalBackupSize = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $LinkedBkJob.Info.IncludedSize } $inObj = [ordered] @{ 'Name' = $LinkedBkJob.Name @@ -192,7 +192,7 @@ function Get-AbrVbrBackupToTape { 'Name' = $BackupMediaPool.Name '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 + 'Free Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size ((Get-VBRTapeMedium -MediaPool $BackupMediaPool.Name).Free | Measure-Object -Sum).Sum 'Encryption Enabled' = $BackupMediaPool.EncryptionOptions.Enabled 'Encryption Key' = Switch ($BackupMediaPool.EncryptionOptions.Enabled) { 'True' { (Get-VBREncryptionKey | Where-Object { $_.Id -eq $BackupMediaPool.EncryptionOptions.Key.Id }).Description } @@ -332,7 +332,7 @@ function Get-AbrVbrBackupToTape { 'Media Pool' = $BackupMediaPool.Name '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 + 'Free Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size ((Get-VBRTapeMedium -MediaPool $BackupMediaPool.Name).Free | Measure-Object -Sum).Sum 'Encryption Enabled' = $BackupMediaPool.EncryptionOptions.Enabled 'Encryption Key' = Switch ($BackupMediaPool.EncryptionOptions.Enabled) { 'True' { (Get-VBREncryptionKey | Where-Object { $_.Id -eq $BackupMediaPool.EncryptionOptions.Key.Id }).Description } diff --git a/Src/Private/Get-AbrVbrBackupjobHyperV.ps1 b/Src/Private/Get-AbrVbrBackupjobHyperV.ps1 index 6c0ed40..bb9408d 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.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -74,7 +74,7 @@ function Get-AbrVbrBackupjobHyperV { $inObj = [ordered] @{ 'Name' = $Bkjob.Name 'Type' = $Bkjob.TypeToString - 'Total Backup Size' = ConvertTo-FileSizeString -Size $CommonInfo.IncludedSize + 'Total Backup Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $CommonInfo.IncludedSize 'Target Address' = $CommonInfo.TargetDir 'Target File' = $CommonInfo.TargetFile 'Description' = $CommonInfo.CommonInfo.Description @@ -126,7 +126,7 @@ function Get-AbrVbrBackupjobHyperV { $inObj = [ordered] @{ 'Name' = $Job.Name 'Type' = $Job.TypeToString - 'Size' = ConvertTo-FileSizeString -Size $Job.Info.IncludedSize + 'Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $Job.Info.IncludedSize 'Repository' = $Job.GetTargetRepository().Name } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) diff --git a/Src/Private/Get-AbrVbrBackupjobVMware.ps1 b/Src/Private/Get-AbrVbrBackupjobVMware.ps1 index c41e023..b9cf578 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.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -26,13 +26,13 @@ function Get-AbrVbrBackupjobVMware { process { try { - if ($Bkjobs = Get-VBRJob -WarningAction SilentlyContinue | Where-Object { $_.TypeToString -eq "VMware Backup" -or $_.TypeToString -eq "VMware Backup Copy" -or $_.TypeToString -eq "VM Copy" } | Sort-Object -Property Name) { + if ($Bkjobs = Get-VBRJob -WarningAction SilentlyContinue | Where-Object { $_.TypeToString -eq "VMware Backup" -or $_.TypeToString -eq "VMware Backup Copy" -or $_.TypeToString -eq "VM Copy" -or $_.TypeToString -eq "Cloud Director Backup"} | Sort-Object -Property Name) { Section -Style Heading3 'VMware Backup Jobs Configuration' { Paragraph "The following section details the configuration of VMware type backup jobs." BlankLine $OutObj = @() try { - if ($VMcounts = Get-VBRBackup | Where-Object { $_.TypeToString -eq "VMware Backup" -or $_.TypeToString -eq "VMware Backup Copy" -or $_.TypeToString -eq "VM Copy" }) { + if ($VMcounts = Get-VBRBackup | Where-Object { $_.TypeToString -eq "VMware Backup" -or $_.TypeToString -eq "VMware Backup Copy" -or $_.TypeToString -eq "VM Copy" -or $_.TypeToString -eq "Cloud Director Backup"}) { foreach ($VMcount in $VMcounts) { try { Write-PScriboMessage "Discovered $($VMcount.Name) ." @@ -74,7 +74,7 @@ function Get-AbrVbrBackupjobVMware { $inObj = [ordered] @{ 'Name' = $Bkjob.Name 'Type' = $Bkjob.TypeToString - 'Total Backup Size' = ConvertTo-FileSizeString -Size $CommonInfo.IncludedSize + 'Total Backup Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $CommonInfo.IncludedSize 'Target Address' = $CommonInfo.TargetDir 'Target File' = $CommonInfo.TargetFile 'Description' = $CommonInfo.CommonInfo.Description @@ -126,7 +126,7 @@ function Get-AbrVbrBackupjobVMware { $inObj = [ordered] @{ 'Name' = $Job.Name 'Type' = $Job.TypeToString - 'Size' = ConvertTo-FileSizeString -Size $Job.Info.IncludedSize + 'Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $Job.Info.IncludedSize 'Repository' = $Job.GetTargetRepository().Name } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) @@ -160,14 +160,14 @@ function Get-AbrVbrBackupjobVMware { $inObj = [ordered] @{ 'Name' = $Repo.Name 'Type' = "Standard" - 'Size' = ConvertTo-FileSizeString -Size $Repo.GetContainer().CachedTotalSpace.InBytesAsUInt64 + 'Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $Repo.GetContainer().CachedTotalSpace.InBytesAsUInt64 } } if ($ScaleRepo = Get-VBRBackupRepository -ScaleOut | Where-Object { $_.Id -eq $LinkedRepository }) { $inObj = [ordered] @{ 'Name' = $ScaleRepo.Name 'Type' = "ScaleOut" - 'Size' = ConvertTo-FileSizeString -Size (($ScaleRepo.Extent).Repository).GetContainer().CachedTotalSpace.InBytesAsUInt64 + 'Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size (($ScaleRepo.Extent).Repository).GetContainer().CachedTotalSpace.InBytesAsUInt64 } } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) @@ -248,7 +248,13 @@ function Get-AbrVbrBackupjobVMware { Write-PScriboMessage "Discovered $($OBJ.Name) object to backup." $inObj = [ordered] @{ 'Name' = $OBJ.Name - 'Resource Type' = $OBJ.TypeDisplayName + 'Resource Type' = & { + if ($OBJ.TypeDisplayName) { + $OBJ.TypeDisplayName + } elseif ($OBJ.Object) { + $OBJ.Object.Type + } + } 'Role' = $OBJ.Type 'Approx Size' = $OBJ.ApproxSizeString 'Disk Filter Mode' = $OBJ.DiskFilterInfo.Mode @@ -407,10 +413,10 @@ function Get-AbrVbrBackupjobVMware { 9 { 'EXTREME' } } 'Storage optimization' = Switch ($Bkjob.Options.BackupStorageOptions.StgBlockSize) { - 'KbBlockSize1024' { 'Local target' } - 'KbBlockSize512' { 'LAN target' } - 'KbBlockSize256' { 'WAN target' } - 'KbBlockSize4096' { 'Local target (large blocks)' } + 'KbBlockSize1024' { 'Local target (1MB)' } + 'KbBlockSize512' { 'LAN target (512KB)' } + 'KbBlockSize256' { 'WAN target (256KB)' } + 'KbBlockSize4096' { 'Local target (4MB large blocks)' } default { $Bkjob.Options.BackupStorageOptions.StgBlockSize } } 'Enabled Backup File Encryption' = $Bkjob.Options.BackupStorageOptions.StorageEncryptionEnabled @@ -654,7 +660,13 @@ function Get-AbrVbrBackupjobVMware { $inObj = [ordered] @{ 'Name' = $VSSObj.Name 'Enabled' = $VSSObj.VssOptions.Enabled - 'Resource Type' = ($Bkjob.GetViOijs() | Where-Object { $_.Name -eq $VSSObj.Name -and ($_.Type -eq "Include" -or $_.Type -eq "VssChild") }).TypeDisplayName + 'Resource Type' = &{ + if (($Bkjob.GetViOijs() | Where-Object { $_.Name -eq $VSSObj.Name -and ($_.Type -eq "Include" -or $_.Type -eq "VssChild") }).TypeDisplayName) { + ($Bkjob.GetViOijs() | Where-Object { $_.Name -eq $VSSObj.Name -and ($_.Type -eq "Include" -or $_.Type -eq "VssChild") }).TypeDisplayName + } elseif (($Bkjob.GetViOijs() | Where-Object { $_.Name -eq $VSSObj.Name -and ($_.Type -eq "Include" -or $_.Type -eq "VssChild") }).Object) { + ($Bkjob.GetViOijs() | Where-Object { $_.Name -eq $VSSObj.Name -and ($_.Type -eq "Include" -or $_.Type -eq "VssChild") }).Object.Type + } + } '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) { diff --git a/Src/Private/Get-AbrVbrCloudConnectBS.ps1 b/Src/Private/Get-AbrVbrCloudConnectBS.ps1 index cff8aaa..f12770f 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.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -52,8 +52,8 @@ function Get-AbrVbrCloudConnectBS { $false { $CloudObject.FriendlyPath } default { 'Unknown' } } - 'Total Space' = ConvertTo-FileSizeString -Size $CloudObject.GetContainer().CachedTotalSpace.InBytesAsUInt64 - 'Free Space' = ConvertTo-FileSizeString -Size $CloudObject.GetContainer().CachedFreeSpace.InBytesAsUInt64 + 'Total Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $CloudObject.GetContainer().CachedTotalSpace.InBytesAsUInt64 + 'Free Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $CloudObject.GetContainer().CachedFreeSpace.InBytesAsUInt64 'Used Space %' = $PercentFree 'Status' = Switch ($CloudObject.IsUnavailable) { 'False' { 'Available' } @@ -76,19 +76,19 @@ function Get-AbrVbrCloudConnectBS { } $OutObj | Table @TableParams try { - $CloutTenant = Get-VBRCloudTenant | Sort-Object -Property Name + $CloudTenant = Get-VBRCloudTenant | Sort-Object -Property Name Section -ExcludeFromTOC -Style NOTOCHeading5 'Tenant Utilization' { $OutObj = @() try { - foreach ($Tenant in ($CloutTenant | Where-Object { $_.Resources.Repository.Name -eq $CloudObject.Name })) { + foreach ($Tenant in ($CloudTenant | Where-Object { $_.Resources.Repository.Name -eq $CloudObject.Name })) { Write-PScriboMessage "Discovered $($CloudObject.Name) Cloud Tenant utilization." foreach ($Storage in ($Tenant.Resources | Where-Object { $_.Repository.Name -eq $CloudObject.Name })) { $inObj = [ordered] @{ 'Name' = $Tenant.Name - 'Quota' = ConvertTo-FileSizeString -Size $Storage.RepositoryQuota + 'Quota' = ConvertTo-FileSizeString -Size $Storage.RepositoryQuota -RoundUnits $Options.RoundUnits 'Used Space' = Switch ([string]::IsNullOrEmpty($Storage.UsedSpace)) { $true { '--' } - $false { ConvertTo-FileSizeString -Size $Storage.UsedSpace } + $false { ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $Storage.UsedSpace } default { 'Unknown' } } 'Used Space %' = $Storage.UsedSpacePercentage diff --git a/Src/Private/Get-AbrVbrCloudConnectRR.ps1 b/Src/Private/Get-AbrVbrCloudConnectRR.ps1 index 58059aa..147868c 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.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -45,10 +45,10 @@ function Get-AbrVbrCloudConnectRR { } 'Memory' = Switch ([string]::IsNullOrEmpty($CloudObject.Memory)) { $true { 'Unlimited' } - $false { ConvertTo-FileSizeString -Size $CloudObject.Memory } + $false { ConvertTo-FileSizeString -Size $CloudObject.Memory -RoundUnits $Options.RoundUnits } default { '--' } } - 'Storage Quota' = ConvertTo-FileSizeString -Size ($CloudObject.Datastore.Quota | Measure-Object -Sum).Sum + 'Storage Quota' = ConvertTo-FileSizeString -Size ($CloudObject.Datastore.Quota | Measure-Object -Sum).Sum -RoundUnits $Options.RoundUnits 'Network Count' = $CloudObject.NumberOfNetWithInternet + $CloudObject.NumberOfNetWithoutInternet 'Subscribers Count' = ($CloudObject.SubscribedTenantId).count } @@ -96,7 +96,7 @@ function Get-AbrVbrCloudConnectRR { } 'Memory' = Switch ([string]::IsNullOrEmpty($CloudObject.Memory)) { $true { 'Unlimited' } - $false { ConvertTo-FileSizeString -Size $CloudObject.Memory } + $false { ConvertTo-FileSizeString -Size $CloudObject.Memory -RoundUnits $Options.RoundUnits } default { '--' } } 'Network Count' = $CloudObject.NumberOfNetWithInternet + $CloudObject.NumberOfNetWithoutInternet @@ -137,7 +137,7 @@ function Get-AbrVbrCloudConnectRR { 'Datastore Name' = $Storage.Datastore 'Friendly Name' = $Storage.FriendlyName 'Platform' = $Storage.Platform - 'Storage Quota' = ConvertTo-FileSizeString -Size $Storage.Quota + 'Storage Quota' = ConvertTo-FileSizeString -Size $Storage.Quota -RoundUnits $Options.RoundUnits 'Storage Policy' = Switch ([string]::IsNullOrEmpty($Storage.StoragePolicy.Name)) { $true { '--' } $false { $Storage.StoragePolicy.Name } @@ -211,7 +211,7 @@ function Get-AbrVbrCloudConnectRR { 'Name' = $TenantUtil.Name 'CPU Usage' = $TenantUtil.CPUUsage 'Memory Usage' = $TenantUtil.MemoryUsage - 'Storage Usage' = $TenantUtil.StorageUsage | ForEach-Object { "$(ConvertTo-FileSizeString -Size $_.UsedSpace) ($($_.FriendlyName))" } + 'Storage Usage' = $TenantUtil.StorageUsage | ForEach-Object { "$(ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $_.UsedSpace) ($($_.FriendlyName))" } } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) diff --git a/Src/Private/Get-AbrVbrCloudConnectTenant.ps1 b/Src/Private/Get-AbrVbrCloudConnectTenant.ps1 index c5b0cbc..20c9d48 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.13 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -150,7 +150,8 @@ function Get-AbrVbrCloudConnectTenant { } $OutObj | Sort-Object -Property 'Name' | Table @TableParams if ($HealthCheck.Jobs.BestPractice) { - if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '--' }) { Paragraph "Health Check:" -Bold -Underline + if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '--' }) { + Paragraph "Health Check:" -Bold -Underline BlankLine Paragraph { Text "Best Practice:" -Bold @@ -220,7 +221,7 @@ function Get-AbrVbrCloudConnectTenant { $inObj = [ordered] @{ 'Repository' = $CloudBackupRepo.Repository.Name 'Friendly Name' = $CloudBackupRepo.RepositoryFriendlyName - 'Quota' = ConvertTo-FileSizeString -Size $CloudBackupRepo.RepositoryQuota + 'Quota' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $CloudBackupRepo.RepositoryQuota -SourceSpaceUnit MB -TargetSpaceUnit GB 'Quota Path' = $CloudBackupRepo.RepositoryQuotaPath 'Use Wan Acceleration' = $CloudBackupRepo.WanAccelerationEnabled } @@ -384,7 +385,7 @@ function Get-AbrVbrCloudConnectTenant { 'Type' = $CloudSubTenant.Type 'Mode' = $CloudSubTenant.Mode 'Repository Name' = $CloudSubTenant.Resources.RepositoryFriendlyName - 'Quota' = ConvertTo-FileSizeString -Size $CloudSubTenant.Resources.RepositoryQuota + 'Quota' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $CloudSubTenant.Resources.RepositoryQuota 'Quota Path' = $CloudSubTenant.Resources.RepositoryQuotaPath 'Used Space %' = $CloudSubTenant.Resources.UsedSpacePercentage 'Status' = Switch ($CloudSubTenant.Enabled) { diff --git a/Src/Private/Get-AbrVbrEntraIDBackupjobConf.ps1 b/Src/Private/Get-AbrVbrEntraIDBackupjobConf.ps1 index e4ae6a1..be99b17 100644 --- a/Src/Private/Get-AbrVbrEntraIDBackupjobConf.ps1 +++ b/Src/Private/Get-AbrVbrEntraIDBackupjobConf.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrEntraIDBackupjobConf { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.13 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -27,8 +27,8 @@ function Get-AbrVbrEntraIDBackupjobConf { process { try { if ($Bkjobs = Get-VBREntraIDTenantBackupJob | Sort-Object -Property 'Name') { - Section -Style Heading3 'EntraID Tenant Backup Jobs Configuration' { - Paragraph "The following section details the configuration of backup copy jobs." + Section -Style Heading3 'Entra ID Tenant Backup Jobs Configuration' { + Paragraph "The following section details the configuration of entra id backup jobs." BlankLine $OutObj = @() foreach ($Bkjob in $Bkjobs) { diff --git a/Src/Private/Get-AbrVbrFileShareBackupjobConf.ps1 b/Src/Private/Get-AbrVbrFileShareBackupjobConf.ps1 index 0b4ac73..691a067 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.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -47,7 +47,7 @@ function Get-AbrVbrFileShareBackupjobConf { $inObj = [ordered] @{ 'Name' = $Bkjob.Name 'Type' = $Bkjob.TypeToString - 'Total Backup Size' = ConvertTo-FileSizeString -Size $CommonInfo.IncludedSize + 'Total Backup Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $CommonInfo.IncludedSize 'Target Address' = $CommonInfo.TargetDir 'Target File' = $CommonInfo.TargetFile 'Description' = $CommonInfo.CommonInfo.Description diff --git a/Src/Private/Get-AbrVbrFileToTape.ps1 b/Src/Private/Get-AbrVbrFileToTape.ps1 index 611d11f..e3fec7f 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.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -145,8 +145,8 @@ function Get-AbrVbrFileToTape { 'Name' = $BackupMediaPool.Name 'Pool Type' = $BackupMediaPool.Type 'Tape Count' = (Get-VBRTapeMedium -MediaPool $BackupMediaPool.Name).count - 'Capacity' = ConvertTo-FileSizeString -Size $BackupMediaPool.Capacity - 'Remaining' = ConvertTo-FileSizeString -Size $BackupMediaPool.FreeSpace + 'Capacity' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $BackupMediaPool.Capacity + 'Remaining' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $BackupMediaPool.FreeSpace 'Is WORM' = $BackupMediaPool.Worm 'Schedule Enabled' = $TBkjob.FullBackupPolicy.Enabled } @@ -196,8 +196,8 @@ function Get-AbrVbrFileToTape { 'Name' = $BackupMediaPool.Name 'Pool Type' = $BackupMediaPool.Type 'Tape Count' = (Get-VBRTapeMedium -MediaPool $BackupMediaPool.Name).count - 'Capacity' = ConvertTo-FileSizeString -Size $BackupMediaPool.Capacity - 'Remaining' = ConvertTo-FileSizeString -Size $BackupMediaPool.FreeSpace + 'Capacity' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $BackupMediaPool.Capacity + 'Remaining' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $BackupMediaPool.FreeSpace 'Is WORM' = $BackupMediaPool.Worm 'Schedule Enabled' = $TBkjob.IncrementalBackupPolicy.Enabled } diff --git a/Src/Private/Get-AbrVbrRepljobHyperV.ps1 b/Src/Private/Get-AbrVbrRepljobHyperV.ps1 index e650058..f58d1c2 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.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -72,7 +72,7 @@ function Get-AbrVbrRepljobHyperV { $inObj = [ordered] @{ 'Name' = $Bkjob.Name 'Type' = $Bkjob.TypeToString - 'Total Backup Size' = ConvertTo-FileSizeString -Size $CommonInfo.IncludedSize + 'Total Backup Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $CommonInfo.IncludedSize 'Target Address' = $CommonInfo.TargetDir 'Target File' = $CommonInfo.TargetFile 'Description' = $CommonInfo.CommonInfo.Description diff --git a/Src/Private/Get-AbrVbrRepljobVMware.ps1 b/Src/Private/Get-AbrVbrRepljobVMware.ps1 index 117e829..c2817ee 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.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -72,7 +72,7 @@ function Get-AbrVbrRepljobVMware { $inObj = [ordered] @{ 'Name' = $Bkjob.Name 'Type' = $Bkjob.TypeToString - 'Total Backup Size' = ConvertTo-FileSizeString -Size $CommonInfo.IncludedSize + 'Total Backup Size' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $CommonInfo.IncludedSize 'Target Address' = $CommonInfo.TargetDir 'Target File' = $CommonInfo.TargetFile 'Description' = $CommonInfo.CommonInfo.Description diff --git a/Src/Private/Get-AbrVbrScaleOutRepository.ps1 b/Src/Private/Get-AbrVbrScaleOutRepository.ps1 index debcfe9..2ab59f9 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.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -143,8 +143,8 @@ function Get-AbrVbrScaleOutRepository { 'Name' = $Extent.Name 'Repository' = $Extent.Repository.Name 'Path' = $Extent.Repository.FriendlyPath - 'Total Space' = ConvertTo-FileSizeString -Size (($Extent).Repository).GetContainer().CachedTotalSpace.InBytesAsUInt64 - 'Used Space' = ConvertTo-FileSizeString -Size (($Extent).Repository).GetContainer().CachedFreeSpace.InBytesAsUInt64 + 'Total Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size (($Extent).Repository).GetContainer().CachedTotalSpace.InBytesAsUInt64 + 'Used Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size (($Extent).Repository).GetContainer().CachedFreeSpace.InBytesAsUInt64 'Status' = $Extent.Status } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) diff --git a/Src/Private/Get-AbrVbrServiceProvider.ps1 b/Src/Private/Get-AbrVbrServiceProvider.ps1 index 23b389f..f51587b 100644 --- a/Src/Private/Get-AbrVbrServiceProvider.ps1 +++ b/Src/Private/Get-AbrVbrServiceProvider.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrServiceProvider { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -111,8 +111,8 @@ function Get-AbrVbrServiceProvider { 'Resources Enabled' = $CloudProvider.ResourcesEnabled 'Repository Name' = $CloudProvider.Resources.RepositoryName 'Wan Acceleration?' = $CloudProvider.Resources | ForEach-Object { "$($_.RepositoryName): $($_.WanAccelerationEnabled)" } - 'Per Datastore Allocated Space' = $CloudProvider.Resources | ForEach-Object { "$($_.RepositoryName): $(ConvertTo-FileSizeString -Size $_.RepositoryAllocatedSpace)" } - 'Total Datastore Allocated Space' = ConvertTo-FileSizeString -Size $CloudProvider.Resources.RepositoryAllocatedSpace + 'Per Datastore Allocated Space' = $CloudProvider.Resources | ForEach-Object { "$($_.RepositoryName): $(ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $_.RepositoryAllocatedSpace)" } + 'Total Datastore Allocated Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $CloudProvider.Resources.RepositoryAllocatedSpace } $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) @@ -143,7 +143,7 @@ function Get-AbrVbrServiceProvider { } $Memory = Switch ([string]::IsNullOrEmpty($CloudProvider.ReplicationResources.Memory)) { $true { 'Unlimited' } - $false { ConvertTo-FileSizeString -Size $CloudProvider.ReplicationResources.Memory } + $false { ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $CloudProvider.ReplicationResources.Memory } default { '--' } } Write-PScriboMessage "Discovered $($CloudProvider.DNSName) Service Provider DRaaS Resources information." @@ -153,8 +153,8 @@ function Get-AbrVbrServiceProvider { 'Allocated CPU Resources' = $CPU 'Allocated Memory Resources' = $Memory 'Repository Name' = $CloudProvider.ReplicationResources.Datastore.Name - 'Per Datastore Allocated Space' = $CloudProvider.ReplicationResources.Datastore | ForEach-Object { "$($_.Name): $(ConvertTo-FileSizeString -Size $_.DatastoreAllocatedSpace)" } - 'Total Datastore Allocated Space' = ConvertTo-FileSizeString -Size ($CloudProvider.ReplicationResources.Datastore.DatastoreAllocatedSpace | Measure-Object -Sum).Sum + 'Per Datastore Allocated Space' = $CloudProvider.ReplicationResources.Datastore | ForEach-Object { "$($_.Name): $(ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $_.DatastoreAllocatedSpace)" } + 'Total Datastore Allocated Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size ($CloudProvider.ReplicationResources.Datastore.DatastoreAllocatedSpace | Measure-Object -Sum).Sum 'Network Count' = $CloudProvider.ReplicationResources.NetworkCount 'Public IP Enabled' = $CloudProvider.ReplicationResources.PublicIpEnabled } diff --git a/Src/Private/Get-AbrVbrStorageIsilon.ps1 b/Src/Private/Get-AbrVbrStorageIsilon.ps1 index 81ec7e8..1448ebc 100644 --- a/Src/Private/Get-AbrVbrStorageIsilon.ps1 +++ b/Src/Private/Get-AbrVbrStorageIsilon.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrStorageIsilon { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -72,8 +72,8 @@ function Get-AbrVbrStorageIsilon { Write-PScriboMessage "Discovered $($IsilonVol.Name) NetApp Volume." $inObj = [ordered] @{ 'Name' = $IsilonVol.Name - 'Total Space' = ConvertTo-FileSizeString -Size $IsilonVol.Size - 'Used Space' = ConvertTo-FileSizeString -Size $IsilonVol.ConsumedSpace + 'Total Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $IsilonVol.Size + 'Used Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $IsilonVol.ConsumedSpace 'Thin Provision' = $IsilonVol.IsThinProvision } diff --git a/Src/Private/Get-AbrVbrStorageOntap.ps1 b/Src/Private/Get-AbrVbrStorageOntap.ps1 index 2720247..c643453 100644 --- a/Src/Private/Get-AbrVbrStorageOntap.ps1 +++ b/Src/Private/Get-AbrVbrStorageOntap.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrStorageOntap { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -76,8 +76,8 @@ function Get-AbrVbrStorageOntap { Write-PScriboMessage "Discovered $($OntapVol.Name) NetApp Volume." $inObj = [ordered] @{ 'Name' = $OntapVol.Name - 'Total Space' = ConvertTo-FileSizeString -Size $OntapVol.Size - 'Used Space' = ConvertTo-FileSizeString -Size $OntapVol.ConsumedSpace + 'Total Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $OntapVol.Size + 'Used Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $OntapVol.ConsumedSpace 'Thin Provision' = $OntapVol.IsThinProvision } diff --git a/Src/Private/Get-AbrVbrTapeBackupJobsRP.ps1 b/Src/Private/Get-AbrVbrTapeBackupJobsRP.ps1 index a455597..4010401 100644 --- a/Src/Private/Get-AbrVbrTapeBackupJobsRP.ps1 +++ b/Src/Private/Get-AbrVbrTapeBackupJobsRP.ps1 @@ -5,7 +5,7 @@ function Get-AbrVbrTapeBackupJobsRP { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -39,7 +39,7 @@ function Get-AbrVbrTapeBackupJobsRP { $inObj = [ordered] @{ 'VM Name' = $RestorePoint.VMName 'Backup Type' = $RestorePoint.Algorithm - 'Backup Size' = (ConvertTo-FileSizeString -Size $RestorePoint.GetStorage().stats.BackupSize) + 'Backup Size' = (ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $RestorePoint.GetStorage().stats.BackupSize) 'Dedub Ratio' = [Math]::Round($DedupRatio, 2) 'Compress Ratio' = [Math]::Round($CompressRatio, 2) 'Reduction' = [Math]::Round(($DedupRatio * $CompressRatio), 2) diff --git a/Src/Private/Get-AbrVbrTapeLibrary.ps1 b/Src/Private/Get-AbrVbrTapeLibrary.ps1 index 74ad0e9..4481bc3 100644 --- a/Src/Private/Get-AbrVbrTapeLibrary.ps1 +++ b/Src/Private/Get-AbrVbrTapeLibrary.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrTapeLibrary { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.12 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -135,8 +135,8 @@ function Get-AbrVbrTapeLibrary { 0 { "--" } default { $MediumObj.ExpirationDate.ToShortDateString() } } - 'Total Space' = ConvertTo-FileSizeString -Size $MediumObj.Capacity - 'Free Space' = ConvertTo-FileSizeString -Size $MediumObj.Free + 'Total Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $MediumObj.Capacity + 'Free Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $MediumObj.Free 'Locked' = $MediumObj.IsLocked 'Retired' = $MediumObj.IsRetired 'Worm' = $MediumObj.IsWorm diff --git a/Src/Private/Get-AbrVbrTapeMediaPool.ps1 b/Src/Private/Get-AbrVbrTapeMediaPool.ps1 index 8983658..2f898db 100644 --- a/Src/Private/Get-AbrVbrTapeMediaPool.ps1 +++ b/Src/Private/Get-AbrVbrTapeMediaPool.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrTapeMediaPool { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.13 + Version: 0.8.14 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -47,8 +47,8 @@ function Get-AbrVbrTapeMediaPool { 'Name' = $PoolObj.Name 'Type' = $PoolObj.Type 'Tape Count' = ((Get-VBRTapeMediaPool -Id $PoolObj.Id).Medium).count - 'Total Space' = ConvertTo-FileSizeString -Size $Capacity - 'Free Space' = ConvertTo-FileSizeString -Size $FreeSpace + 'Total Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $Capacity + 'Free Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $FreeSpace 'Tape Library' = ($PoolObj.GlobalOptions.LibraryId | ForEach-Object { Get-VBRTapeLibrary -Id $_ }).Name } @@ -114,8 +114,8 @@ function Get-AbrVbrTapeMediaPool { 'Drives' = $TapeDrives -join ', ' 'Slots' = $TapeLibraryObj.Slots 'Tape Count' = ((Get-VBRTapeMediaPool -Id $PoolObj.Id).Medium).count - 'Total Space' = ConvertTo-FileSizeString -Size $Capacity - 'Free Space' = ConvertTo-FileSizeString -Size $FreeSpace + 'Total Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $Capacity + 'Free Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $FreeSpace 'Add Tape from Free Media Pool Automatically when more Tape are Required' = $PoolObj.MoveFromFreePool 'Description' = Switch ([string]::IsNullOrEmpty($TapeLibraryObj.Description)) { $true { "--" } @@ -181,8 +181,8 @@ function Get-AbrVbrTapeMediaPool { $inObj = [ordered] @{ 'Name' = $TapeMedium.Name 'Is Worm?' = $TapeMedium.IsWorm - 'Total Space' = ConvertTo-FileSizeString -Size $TapeMedium.Capacity - 'Free Space' = ConvertTo-FileSizeString -Size $TapeMedium.Free + 'Total Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $TapeMedium.Capacity + 'Free Space' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $TapeMedium.Free 'Tape Library' = Switch ($TapeMedium.LibraryId) { $Null { '--' } '00000000-0000-0000-0000-000000000000' { 'Unknown' } diff --git a/Src/Private/SharedUtilsFunctions.ps1 b/Src/Private/SharedUtilsFunctions.ps1 index d92f09e..c27fe0d 100644 --- a/Src/Private/SharedUtilsFunctions.ps1 +++ b/Src/Private/SharedUtilsFunctions.ps1 @@ -120,18 +120,41 @@ function ConvertTo-FileSizeString { [Parameter ( Position = 0, Mandatory)] - [int64] - $Size + [int64] $Size, + [Parameter( + Position = 1, + Mandatory = $false, + HelpMessage = 'Please provide the source space unit' + )] + [ValidateSet('MB', 'GB', 'TB', 'PB')] + [string] $SourceSpaceUnit, + [Parameter( + Position = 2, + Mandatory = $false, + HelpMessage = 'Please provide the space unit to output' + )] + [ValidateSet('MB', 'GB', 'TB', 'PB')] + [string] $TargetSpaceUnit, + [Parameter( + Position = 3, + Mandatory = $false, + HelpMessage = 'Please provide the value to round the storage unit' + )] + [int] $RoundUnits = 0 ) - $Unit = Switch ($Size) { - { $Size -gt 1PB } { 'PB' ; Break } - { $Size -gt 1TB } { 'TB' ; Break } - { $Size -gt 1GB } { 'GB' ; Break } - { $Size -gt 1Mb } { 'MB' ; Break } - Default { 'KB' } + if ($SourceSpaceUnit) { + return "$([math]::Round(($Size * $("1" + $SourceSpaceUnit) / $("1" + $TargetSpaceUnit)), $RoundUnits)) $TargetSpaceUnit" + } else { + $Unit = Switch ($Size) { + { $Size -gt 1PB } { 'PB' ; Break } + { $Size -gt 1TB } { 'TB' ; Break } + { $Size -gt 1GB } { 'GB' ; Break } + { $Size -gt 1Mb } { 'MB' ; Break } + Default { 'KB' } + } + return "$([math]::Round(($Size / $("1" + $Unit)), $RoundUnits)) $Unit" } - return "$([math]::Round(($Size / $("1" + $Unit)), 0)) $Unit" } # end function Get-VeeamNetStat { <# From 9f23a1b334feed40ac78e3d6fd58f7bdbfd30f00 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Thu, 30 Jan 2025 23:50:07 -0400 Subject: [PATCH 2/2] Update AsBuiltReport.Core to v1.4.2 and adjust storage size conversions in reports. Fix [Bug]: VBR report - convertion MB GB TB is wrong #197 --- AsBuiltReport.Veeam.VBR.psd1 | 2 +- CHANGELOG.md | 3 ++- Src/Private/Get-AbrVbrCloudConnectBS.ps1 | 4 ++-- Src/Private/Get-AbrVbrCloudConnectRR.ps1 | 8 ++++---- Src/Private/Get-AbrVbrCloudConnectTenant.ps1 | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/AsBuiltReport.Veeam.VBR.psd1 b/AsBuiltReport.Veeam.VBR.psd1 index 87af705..1f22a57 100644 --- a/AsBuiltReport.Veeam.VBR.psd1 +++ b/AsBuiltReport.Veeam.VBR.psd1 @@ -55,7 +55,7 @@ RequiredModules = @( @{ ModuleName = 'AsBuiltReport.Core'; - ModuleVersion = '1.4.1' + ModuleVersion = '1.4.2' } @{ ModuleName = 'PScriboCharts'; diff --git a/CHANGELOG.md b/CHANGELOG.md index d523a8e..7fca340 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ##### This project is community maintained and has no sponsorship from Veeam, its employees or any of its affiliates. -## [0.8.14] - Unreleased +## [0.8.14] - 2025-01-30 ### Added @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Storage units in the report are set to 1 round by default +- Increase AsBuiltReport.Core to v1.4.2 ### Fixed diff --git a/Src/Private/Get-AbrVbrCloudConnectBS.ps1 b/Src/Private/Get-AbrVbrCloudConnectBS.ps1 index f12770f..ac29498 100644 --- a/Src/Private/Get-AbrVbrCloudConnectBS.ps1 +++ b/Src/Private/Get-AbrVbrCloudConnectBS.ps1 @@ -85,10 +85,10 @@ function Get-AbrVbrCloudConnectBS { foreach ($Storage in ($Tenant.Resources | Where-Object { $_.Repository.Name -eq $CloudObject.Name })) { $inObj = [ordered] @{ 'Name' = $Tenant.Name - 'Quota' = ConvertTo-FileSizeString -Size $Storage.RepositoryQuota -RoundUnits $Options.RoundUnits + 'Quota' = ConvertTo-FileSizeString -Size (Convert-Size -From MB -To Bytes -Value $Storage.RepositoryQuota) -RoundUnits $Options.RoundUnits 'Used Space' = Switch ([string]::IsNullOrEmpty($Storage.UsedSpace)) { $true { '--' } - $false { ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $Storage.UsedSpace } + $false { ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size (Convert-Size -From MB -To Bytes -Value $Storage.UsedSpace) } default { 'Unknown' } } 'Used Space %' = $Storage.UsedSpacePercentage diff --git a/Src/Private/Get-AbrVbrCloudConnectRR.ps1 b/Src/Private/Get-AbrVbrCloudConnectRR.ps1 index 147868c..50431f7 100644 --- a/Src/Private/Get-AbrVbrCloudConnectRR.ps1 +++ b/Src/Private/Get-AbrVbrCloudConnectRR.ps1 @@ -45,10 +45,10 @@ function Get-AbrVbrCloudConnectRR { } 'Memory' = Switch ([string]::IsNullOrEmpty($CloudObject.Memory)) { $true { 'Unlimited' } - $false { ConvertTo-FileSizeString -Size $CloudObject.Memory -RoundUnits $Options.RoundUnits } + $false { ConvertTo-FileSizeString -Size (Convert-Size -From MB -To Bytes -Value $CloudObject.Memory) -RoundUnits $Options.RoundUnits } default { '--' } } - 'Storage Quota' = ConvertTo-FileSizeString -Size ($CloudObject.Datastore.Quota | Measure-Object -Sum).Sum -RoundUnits $Options.RoundUnits + 'Storage Quota' = ConvertTo-FileSizeString -Size (Convert-Size -From GB -To Bytes -Value ($CloudObject.Datastore.Quota | Measure-Object -Sum).Sum) -RoundUnits $Options.RoundUnits 'Network Count' = $CloudObject.NumberOfNetWithInternet + $CloudObject.NumberOfNetWithoutInternet 'Subscribers Count' = ($CloudObject.SubscribedTenantId).count } @@ -96,7 +96,7 @@ function Get-AbrVbrCloudConnectRR { } 'Memory' = Switch ([string]::IsNullOrEmpty($CloudObject.Memory)) { $true { 'Unlimited' } - $false { ConvertTo-FileSizeString -Size $CloudObject.Memory -RoundUnits $Options.RoundUnits } + $false { ConvertTo-FileSizeString -Size (Convert-Size -From MB -To Bytes -Value $CloudObject.Memory) -RoundUnits $Options.RoundUnits} default { '--' } } 'Network Count' = $CloudObject.NumberOfNetWithInternet + $CloudObject.NumberOfNetWithoutInternet @@ -137,7 +137,7 @@ function Get-AbrVbrCloudConnectRR { 'Datastore Name' = $Storage.Datastore 'Friendly Name' = $Storage.FriendlyName 'Platform' = $Storage.Platform - 'Storage Quota' = ConvertTo-FileSizeString -Size $Storage.Quota -RoundUnits $Options.RoundUnits + 'Storage Quota' = ConvertTo-FileSizeString -Size (Convert-Size -From GB -To Bytes -Value $Storage.Quota) -RoundUnits $Options.RoundUnits 'Storage Policy' = Switch ([string]::IsNullOrEmpty($Storage.StoragePolicy.Name)) { $true { '--' } $false { $Storage.StoragePolicy.Name } diff --git a/Src/Private/Get-AbrVbrCloudConnectTenant.ps1 b/Src/Private/Get-AbrVbrCloudConnectTenant.ps1 index 20c9d48..9bcea2a 100644 --- a/Src/Private/Get-AbrVbrCloudConnectTenant.ps1 +++ b/Src/Private/Get-AbrVbrCloudConnectTenant.ps1 @@ -221,7 +221,7 @@ function Get-AbrVbrCloudConnectTenant { $inObj = [ordered] @{ 'Repository' = $CloudBackupRepo.Repository.Name 'Friendly Name' = $CloudBackupRepo.RepositoryFriendlyName - 'Quota' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size $CloudBackupRepo.RepositoryQuota -SourceSpaceUnit MB -TargetSpaceUnit GB + 'Quota' = ConvertTo-FileSizeString -RoundUnits $Options.RoundUnits -Size (Convert-Size -From MB -To Bytes -Value $CloudBackupRepo.RepositoryQuota) 'Quota Path' = $CloudBackupRepo.RepositoryQuotaPath 'Use Wan Acceleration' = $CloudBackupRepo.WanAccelerationEnabled }