diff --git a/Veeam/PRTG-VeeamBRStats-v3.ps1 b/Veeam/PRTG-VeeamBRStats-v3.ps1 index ddc1abc..4491a52 100644 --- a/Veeam/PRTG-VeeamBRStats-v3.ps1 +++ b/Veeam/PRTG-VeeamBRStats-v3.ps1 @@ -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