PowerShell script exchange
Post Reply
StevenMeier
Enthusiast
Posts: 92
Liked: 32 times
Joined: Apr 22, 2016 1:06 am
Full Name: Steven Meier
Contact:

Powershell for SOBR's

Post by StevenMeier »

In Version 13 of B&R and the new Powershell updates.
I cannot find a way to grab via powershell the usage of Disk Space in Performance and capacity and Archive Tiers of the SOBR. (capacity and Archive Tiers are at AWS)

I just want to be able to grab the details. Thats it.

Any Help or re direct to a post or someone that has done that would be great
david.domask
Product Manager
Posts: 3737
Liked: 909 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Powershell for SOBR's

Post by david.domask »

Hi StevenMaier,

Unfortunately we need to use unsupported methods for this; the following works on v13, but unsupported methods change between releases, so if you're on earlier version, review this topic, I believe these still work (I don't have a v12 server with SOBR handy to test on at the moment)

Please note that unsupported methods are just that, unsupported, and these may break from release to release; ask on the forums if it stops working, but ultimately be prepared that these methods do not receive official support and may not work in future versions. (It's noted on the need for accurate reporting in PowerShell for this)

Code: Select all

$sobr = Get-VBRBackupRepository -Scaleout -Name "Name of your Scale-out Backup Repository"
$arcExt = $sobr.ArchiveExtent
$capExt = $sobt.CapacityExtent
$perfExt = $sobr.Extent #Will most likely be an array as usually there are multiple performance tier extents
[Veeam.Backup.Core.CArchiveRepository]::GetTotalUsedSize($arcExt.id) #Get used space on Archive Extent
[Veeam.Backup.Core.CArchiveRepository]::GetTotalUsedSize($capExt.id) #Get used space on Capacity Extent, same class CArchiveRepository works for both capacity / archive extents
[Veeam.Backup.Core.CBackupRepository]::Find($perfExt.id).GetContainer().Info #Get space info on Performance tier extents
Keep in mind that Performance and Capacity Tier may be composed of multiple extents, so you'll get an array as a result, and the .NET Reflection expects a single UUID entry, so if you have multiple extents on these tiers, iterate over $capExt and $perfExt and write logic to get what you want from each.

Edit: Minor clarification for performance tier, you actually don't need to use the unsupported method there; the Extent property of the $sobr object will have the full repository object, so you can also just do $sobr.extent.GetContainer().Info to access the same information.
David Domask | Product Management: Principal Analyst
StevenMeier
Enthusiast
Posts: 92
Liked: 32 times
Joined: Apr 22, 2016 1:06 am
Full Name: Steven Meier
Contact:

Re: Powershell for SOBR's

Post by StevenMeier »

Thanks for the reply I will give that a try when I get a chance and get back to the post
Post Reply

Who is online

Users browsing this forum: No registered users and 38 guests