Skip to content

Commit

Permalink
Modified empty content character
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelinux committed Dec 27, 2023
1 parent 969f30b commit 95448cc
Show file tree
Hide file tree
Showing 23 changed files with 67 additions and 63 deletions.
4 changes: 2 additions & 2 deletions Src/Private/Get-AbrVbrBackupCopyjobConf.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function Get-AbrVbrBackupCopyjobConf {
}

if ($HealthCheck.Jobs.BestPractice) {
$OutObj | Where-Object { $Null -like $_.'Description' -or $_.'Description' -eq "-" } | Set-Style -Style Warning -Property 'Description'
$OutObj | Where-Object { $Null -like $_.'Description' -or $_.'Description' -eq "--" } | Set-Style -Style Warning -Property 'Description'
$OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description'
$OutObj | Where-Object { $_.'Latest Result' -eq 'Failed' } | Set-Style -Style Critical -Property 'Latest Result'
$OutObj | Where-Object { $_.'Latest Result' -eq 'Warning' } | Set-Style -Style Warning -Property 'Latest Result'
Expand All @@ -76,7 +76,7 @@ function Get-AbrVbrBackupCopyjobConf {
}
$OutObj | Table @TableParams
if ($HealthCheck.Jobs.BestPractice) {
if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '-'}) {
if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $_.'Description' -eq '--'}) {
Paragraph "Health Check:" -Bold -Underline
BlankLine
Paragraph {
Expand Down
14 changes: 7 additions & 7 deletions Src/Private/Get-AbrVbrBackupServerInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,30 @@ function Get-AbrVbrBackupServerInfo {
'Server Name' = $BackupServer.Name
'Is Domain Joined?' = ConvertTo-TextYN $DomainJoined.PartOfDomain
'Version' = Switch (($VeeamVersion).count) {
0 {"-"}
0 {"--"}
default {$VeeamVersion.DisplayVersion}
}
'Database Server' = Switch ([string]::IsNullOrEmpty($VeeamDBInfo.SqlServerName)) {
$true {"-"}
$true {"--"}
$false {$VeeamDBInfo.SqlServerName}
default {'Unknown'}
}
'Database Instance' = Switch ([string]::IsNullOrEmpty($VeeamDBInfo.SqlInstanceName)) {
$true {"-"}
$true {"--"}
$false {$VeeamDBInfo.SqlInstanceName}
default {'Unknown'}
}
'Database Name' = Switch ([string]::IsNullOrEmpty($VeeamDBInfo.SqlDatabaseName)) {
$true {"-"}
$true {"--"}
$false {$VeeamDBInfo.SqlDatabaseName}
default {'Unknown'}
}
'Connection Ports' = Switch (($VeeamInfo.BackupServerPort).count) {
0 {"-"}
0 {"--"}
default {"Backup Server Port: $($VeeamInfo.BackupServerPort)`r`nSecure Connections Port: $($VeeamInfo.SecureConnectionsPort)`r`nCloud Server Port: $($VeeamInfo.CloudServerPort)`r`nCloud Service Port: $($VeeamInfo.CloudSvcPort)"}
}
'Install Path' = Switch (($VeeamInfo.CorePath).count) {
0 {"-"}
0 {"--"}
default {$VeeamInfo.CorePath}
}
'Audit Logs Path' = $SecurityOptions.AuditLogsPath
Expand Down Expand Up @@ -447,7 +447,7 @@ function Get-AbrVbrBackupServerInfo {
$inObj = [ordered] @{
'Registry Key' = $Registry.Key
'Registry Value' = Switch (($Registry.Value).count) {
0 {'-'}
0 {'--'}
1 {$Registry.Value}
default {$Registry.Value -Join ', '}

Expand Down
6 changes: 3 additions & 3 deletions Src/Private/Get-AbrVbrCloudConnectBS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function Get-AbrVbrCloudConnectBS {
$inObj = [ordered] @{
'Type' = $CloudObject.TypeDisplay
'Path' = Switch ([string]::IsNullOrEmpty($CloudObject.FriendlyPath)) {
$true {'-'}
$true {'--'}
$false {$CloudObject.FriendlyPath}
default {'Unknown'}
}
Expand Down Expand Up @@ -87,13 +87,13 @@ function Get-AbrVbrCloudConnectBS {
'Name' = $Tenant.Name
'Quota' = "$([math]::Round($Storage.RepositoryQuota / 1Kb, 2)) GB"
'Used Space' = Switch ([string]::IsNullOrEmpty($Storage.UsedSpace)) {
$true {'-'}
$true {'--'}
$false {"$(Convert-Size -From MB -To GB -Value $Storage.UsedSpace) GB"}
default {'Unknown'}
}
'Used Space %' = $Storage.UsedSpacePercentage
'Path' = Switch ([string]::IsNullOrEmpty($Storage.RepositoryQuotaPath)) {
$true {'-'}
$true {'--'}
$false {$Storage.RepositoryQuotaPath}
default {'Unknown'}
}
Expand Down
4 changes: 2 additions & 2 deletions Src/Private/Get-AbrVbrCloudConnectCG.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ function Get-AbrVbrCloudConnectCG {
if ($InfoLevel.CloudConnect.CloudGateway -ge 2) {
$CloudGPObjects = Get-VBRCloudGatewayPool
$CGPool = Switch ([string]::IsNullOrEmpty(($CloudGPObjects | where-Object {$CloudObject.Name -in $_.CloudGateways.Name}).Name)) {
$true {'-'}
$true {'--'}
$false {($CloudGPObjects | where-Object {$CloudObject.Name -in $_.CloudGateways.Name}).Name}
default {'-'}
default {'--'}
}
$inObj.add('Cloud Gateway Pool', $CGPool)
$inObj.add('Description', $CloudObject.Description)
Expand Down
2 changes: 1 addition & 1 deletion Src/Private/Get-AbrVbrCloudConnectPublicIP.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function Get-AbrVbrCloudConnectPublicIP {
$inObj = [ordered] @{
'IP Address' = $CloudObject.IpAddress
'Assigned Tenant' = Switch ([string]::IsNullOrEmpty($CloudObject.TenantId)) {
$true {'-'}
$true {'--'}
$false {(Get-VBRCloudTenant -Id $CloudObject.TenantId).Name}
default {'Unknown'}
}
Expand Down
10 changes: 5 additions & 5 deletions Src/Private/Get-AbrVbrCloudConnectRR.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ function Get-AbrVbrCloudConnectRR {
'CPU' = Switch ([string]::IsNullOrEmpty($CloudObject.CPU)) {
$true {'Unlimited'}
$false {"$([math]::Round($CloudObject.CPU / 1000, 1)) Ghz"}
default {'-'}
default {'--'}
}
'Memory' = Switch ([string]::IsNullOrEmpty($CloudObject.Memory)) {
$true {'Unlimited'}
$false {"$([math]::Round($CloudObject.Memory / 1Kb, 2)) GB"}
default {'-'}
default {'--'}
}
'Storage Quota' = "$(($CloudObject.Datastore.Quota | Measure-Object -Sum).Sum) GB"
'Network Count' = $CloudObject.NumberOfNetWithInternet + $CloudObject.NumberOfNetWithoutInternet
Expand Down Expand Up @@ -94,12 +94,12 @@ function Get-AbrVbrCloudConnectRR {
'CPU' = Switch ([string]::IsNullOrEmpty($CloudObject.CPU)) {
$true {'Unlimited'}
$false {"$([math]::Round($CloudObject.CPU / 1000, 1)) Ghz"}
default {'-'}
default {'--'}
}
'Memory' = Switch ([string]::IsNullOrEmpty($CloudObject.Memory)) {
$true {'Unlimited'}
$false {"$([math]::Round($CloudObject.Memory / 1Kb, 2)) GB"}
default {'-'}
default {'--'}
}
'Network Count' = $CloudObject.NumberOfNetWithInternet + $CloudObject.NumberOfNetWithoutInternet
'Subscribed Tenant' = Switch ([string]::IsNullOrEmpty($CloudObject.SubscribedTenantId)) {
Expand Down Expand Up @@ -142,7 +142,7 @@ function Get-AbrVbrCloudConnectRR {
'Platform' = $Storage.Platform
'Storage Quota' = "$($Storage.Quota) GB"
'Storage Policy' = Switch ([string]::IsNullOrEmpty($Storage.StoragePolicy.Name)) {
$true {'-'}
$true {'--'}
$false {$Storage.StoragePolicy.Name}
default {'Unknown'}
}
Expand Down
8 changes: 4 additions & 4 deletions Src/Private/Get-AbrVbrCloudConnectTenant.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ function Get-AbrVbrCloudConnectTenant {
'Expiration Date' = Switch ([string]::IsNullOrEmpty($CloudObject.LeaseExpirationDate)) {
$true {'Never'}
$false {$CloudObject.LeaseExpirationDate.ToLongDateString()}
default {'-'}
default {'--'}
}
'Backup Storage (Cloud Backup Repository)' = ConvertTo-TextYN $CloudObject.ResourcesEnabled
'Replication Resource (Cloud Host)' = Switch ($CloudObject.ReplicationResourcesEnabled -or $CloudObject.vCDReplicationResourcesEnabled) {
'True' {'Yes'}
'False' {'No'}
default {'-'}
default {'--'}
}
'Description' = $CloudObject.Description
}
Expand Down Expand Up @@ -176,7 +176,7 @@ function Get-AbrVbrCloudConnectTenant {
$inObj.add('Gateway Pool', 'Automatic')
} else {
$GatewayPool = Switch ([string]::IsNullOrEmpty($CloudObject.GatewayPool.Name)) {
$true {'-'}
$true {'--'}
$false {$CloudObject.GatewayPool.Name}
default {'Unknown'}
}
Expand Down Expand Up @@ -396,7 +396,7 @@ function Get-AbrVbrCloudConnectTenant {
'Status' = Switch ($CloudSubTenant.Enabled) {
'True' {'Enabled'}
'False' {'Disabled'}
default {'-'}
default {'--'}
}
}

Expand Down
8 changes: 4 additions & 4 deletions Src/Private/Get-AbrVbrConfigurationBackupSetting.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ function Get-AbrVbrConfigurationBackupSetting {
'Additional Address' = $BackupSettings.NotificationOptions.AdditionalAddress
'Email Subject' = $BackupSettings.NotificationOptions.NotificationSubject
'Notify On' = Switch ($BackupSettings.NotificationOptions.EnableAdditionalNotification) {
"" {"-"; break}
$Null {"-"; break}
"" {"--"; 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)"}
}
'NextRun' = $BackupSettings.NextRun
Expand Down Expand Up @@ -94,14 +94,14 @@ function Get-AbrVbrConfigurationBackupSetting {
if ($OutObj | Where-Object { $_.'Run Job Automatically' -like 'No'}) {
Paragraph {
Text "Best Practice:" - Bold
Text "It`s a recommended best practice to activate the 'Run job automatically' option of the Backup Configuration job."
Text "It's a recommended best practice to activate the 'Run job automatically' option of the Backup Configuration job."
}
BlankLine
}
if ($OutObj | Where-Object { $_.'Enabled' -like 'No'}) {
Paragraph {
Text "Best Practice:" -Bold
Text "It`s a recommended best practice to enable the Backup Configuration job"
Text "It's a recommended best practice to enable the Backup Configuration job"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Src/Private/Get-AbrVbrCredential.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ function Get-AbrVbrCredential {
$inObj = [ordered] @{
'Name' = $Credential.Name
'Change Time' = Switch ($Credential.ChangeTimeUtc) {
"" {"-"; break}
$Null {'-'; break}
"" {"--"; break}
$Null {'--'; break}
default {$Credential.ChangeTimeUtc.ToShortDateString()}
}
'Description' = $Credential.Description
Expand Down
4 changes: 2 additions & 2 deletions Src/Private/Get-AbrVbrEmailNotificationSetting.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ function Get-AbrVbrEmailNotificationSetting {
'Daily Reports Time' = $EmailSetting.DailyReportsTime.ToShortTimeString()
'Enabled' = ConvertTo-TextYN $EmailSetting.Enabled
'Notify On' = Switch ($EmailSetting.NotifyOnSuccess) {
"" {"-"; break}
$Null {"-"; break}
"" {"--"; 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)"}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Src/Private/Get-AbrVbrEventForwarding.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function Get-AbrVbrEventForwarding {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($HealthCheck.Infrastructure.BestPractice -and ($OutObj | Where-Object { $_.'Syslog Servers' -eq '--' })) {
if ($HealthCheck.Infrastructure.BestPractice -and ($OutObj | Where-Object { $_.'Syslog Servers' -eq '--'})) {
Paragraph "Health Check:" -Bold -Underline
BlankLine
Paragraph {
Expand Down
4 changes: 2 additions & 2 deletions Src/Private/Get-AbrVbrFileToTape.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ function Get-AbrVbrFileToTape {
'Type' = 'NDMP'
'Selection Type' = 'Directory'
'Path' = $NDMP.Name
'Include Filter' = '-'
'Exclude Filter' = '-'
'Include Filter' = '--'
'Exclude Filter' = '--'
}
$OutObj += [pscustomobject]$inobj2
}
Expand Down
Loading

0 comments on commit 95448cc

Please sign in to comment.