[PowerShell] Get All Backup Repositories Advanced

  • 22 October 2020
  • 8 comments
  • 357 views

Userlevel 3
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

 


8 comments

Userlevel 2

Hello, 

Update to V11

[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 @{n='Name';e={$_.Name}},@{n='Type';e={$_.type}},  @{n='Path';e={$_.path}}, @{n='Size';e={$_.GetContainer().CachedTotalSpace.InGigabytes}}, @{n='FreeSpace';e={$_.GetContainer().CachedFreeSpace.InGigabytes}}
 

 

Userlevel 7
Badge +5

Hello, 

Update to V11

[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 @{n='Name';e={$_.Name}},@{n='Type';e={$_.type}},  @{n='Path';e={$_.path}}, @{n='Size';e={$_.GetContainer().CachedTotalSpace.InGigabytes}}, @{n='FreeSpace';e={$_.GetContainer().CachedFreeSpace.InGigabytes}}
 

 

Nice work on the update.  Works very well and shows all repos in Veeam. :sunglasses:

Userlevel 7
Badge +2

Added new powershell part relating to the Repository info for the My veeam Report for version V11

I link the discussion on the forum

I link the discussion on the forum

My Veeam Report v9.5.1 - Page 4 - Veeam R&D Forums

Userlevel 2

Hello,

Great job Chris, you could implement new options that I have seen that do not work like the Agents, I am not quite good with Powershell, but I have taken some things that do not come out in the report.

 

Thanks

 

Userlevel 7
Badge +5

Added new powershell part relating to the Repository info for the My veeam Report for version V11

I link the discussion on the forum

I link the discussion on the forum

My Veeam Report v9.5.1 - Page 4 - Veeam R&D Forums

Looking forward to the changes that are be doing to update this entire reporting script to v11.  I  use the v10 all the time.

Userlevel 7
Badge +2

Added new powershell part relating to the Repository info for the My veeam Report for version V11

I link the discussion on the forum

My Veeam Report v9.5.1 - Page 4 - Veeam R&D Forums

Looking forward to the changes that are be doing to update this entire reporting script to v11.  I  use the v10 all the time.

who updates the whole script?

Userlevel 7
Badge +5

Added new powershell part relating to the Repository info for the My veeam Report for version V11

I link the discussion on the forum

My Veeam Report v9.5.1 - Page 4 - Veeam R&D Forums

Looking forward to the changes that are be doing to update this entire reporting script to v11.  I  use the v10 all the time.

who updates the whole script?

Chris Arceneux will be updating it as per page 5 of that forum post.

Userlevel 7
Badge +2

lol , missed to read chris's message :joy: thx

Comment