[PowerShell] Get All Backup Repositories Advanced

  • 22 October 2020
  • 0 comments
  • 114 views

Userlevel 2
Badge
[Array]$RepoList = Get-VBRBackupRepository | Where-Object {$_.Type -ne "SanSnapshotOnly"} 
[Array]$ScaleOuts = Get-VBRBackupRepository -ScaleOut
if ($ScaleOuts) {
foreach ($ScaleOut in $ScaleOuts) {
$Extents = Get-VBRRepositoryExtent -Repository $ScaleOut
foreach ($Extent in $Extents) {
$RepoList = $RepoList + $Extent.repository
}
}
}
$RepoList | Select-Object Name, Path, `
@{Name="CachedTotalSpaceGB"; Expression= {[Math]::Round([Decimal]$_.info.CachedTotalSpace/1GB,2)}}, `
@{Name="CachedFreeSpaceGB"; Expression= {[Math]::Round([Decimal]$_.info.CachedFreeSpace/1GB,2)}} | Format-Table -AutoSize

 


0 comments

Be the first to comment!

Comment