In powershell, I have script that check size of the backup on the cloud repository and reports it back.
In some cases there are differences between what the server says and what is actually on the cloud.
In the GUI if I go to "backup infrastructure/backup repositories" and do a rescan, the "used space" get updated with the new value. (on screen)
if I run the equivalent powershell command "Rescan-VBREntity -AllCloudProviders" on screen the GUI will also get updated. with the proper space.
however, in both cases when I check in powershell the data, its is not updated. (using the commands bellow)
The only way I can get Powershell to give me the updated information is Throught the GUI by doing a rescan under "backup infrastructure/service providers" ??
How do we do a rescan the service provides in Powershell?
Code: Select all
Rescan-VBREntity -AllCloudProviders
$cloudReps=Get-VBRBackupRepository | where {$_.cloudprovider}
Foreach($target in $cloudreps)
{
$RemoteusedGb = [Math]::Round([Decimal]([Veeam.Backup.Core.CBackupRepository]::GetRepositoryBackupsSize($target.Id.Guid))/1GB,2)
}