PowerShell script exchange
Post Reply
kironjoel
Lurker
Posts: 2
Liked: 1 time
Joined: Sep 26, 2023 6:46 am
Full Name: Kiron DLima
Contact:

Monitoring of space utilization of a hardended repo

Post by kironjoel »

Hi Community,

Is there any way we can monitor the space utilization of hardened repos using powershell cmdlets? Although I see the space utilization in B&R server under Backup Repositories, I would like to be able to query the usage somehow via scripts. Is there a powershell cmdlets I can use?

Regards,
Kiron
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Monitoring of space utilization of a hardended repo

Post by oleg.feoktistov »

Hi Kiron,

Here is the example of utilization report script for a hardened repo (involves unsupported methods):

Code: Select all

$hardened = Get-VBRBackupRepository -Name 'linux.hardened'
$container = $hardened.GetContainer()
$usedSpace = [Math]::Round([Veeam.Backup.Core.CBackupRepository]::GetRepositoryBackupsSize($hardened.Id)/1GB, 1)
$hardened | select Id, Name, @{n='TotalSpace';e={$container.CachedTotalSpace.ToString()}}, `
@{n='FreeSpace';e={$container.CachedFreeSpace.ToString()}}, @{n='UsedSpace';e={"$usedSpace GB"}}
Best regards,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests