Skip to content

Commit

Permalink
remove some pre11 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
vMarkusK committed Mar 8, 2023
1 parent f113134 commit 8890345
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions Veeam/PRTG-VeeamBRStats-v3.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -267,55 +267,6 @@ Function Get-vPCRepoInfo {
$outputAry
}
}
# Get-vPCRepoInfoPre11 curently not in use (Multi Version support Pending)
Function Get-vPCRepoInfoPre11 {
[CmdletBinding()]
param (
[Parameter(Position=0, ValueFromPipeline=$true)]
[PSObject[]]$Repository
)
Begin {
$outputAry = @()
Function New-RepoObject {param($name, $repohost, $path, $free, $total)
$repoObj = New-Object -TypeName PSObject -Property @{
Target = $name
RepoHost = $repohost
Storepath = $path
StorageFree = [Math]::Round([Decimal]$free/1GB,2)
StorageTotal = [Math]::Round([Decimal]$total/1GB,2)
FreePercentage = [Math]::Round(($free/$total)*100)
}
Return $repoObj | Select-Object Target, RepoHost, Storepath, StorageFree, StorageTotal, FreePercentage
}
}
Process {
Foreach ($r in $Repository) {
# Refresh Repository Size Info
try {
[Veeam.Backup.Core.CBackupRepositoryEx]::SyncSpaceInfoToDb($r, $true)

}
catch {
Write-Debug "SyncSpaceInfoToDb Failed"
Write-Error $_.ToString()
Write-Error $_.ScriptStackTrace
}
If ($r.HostId -eq "00000000-0000-0000-0000-000000000000") {
$HostName = ""
}
Else {
$HostName = $(Get-VBRServer | Where-Object {$_.Id -eq $r.HostId}).Name.ToLower()
}

Write-Debug $r.Info
$outputObj = New-RepoObject $r.Name $Hostname $r.Path $r.info.CachedFreeSpace $r.Info.CachedTotalSpace
}
$outputAry += $outputObj
}
End {
$outputAry
}
}
#endregion

#region: Start BRHost Connection
Expand Down

0 comments on commit 8890345

Please sign in to comment.