Hello,
How is it possible with this cmdlet to get the schedule value ?
This one : Secondary copy settings : Data can be copied to this repository Any time / During the following time periods only
Thanks
-
- Veeam Legend
- Posts: 820
- Liked: 128 times
- Joined: May 11, 2018 8:42 am
- Contact:
-
- Veeam Software
- Posts: 2010
- Liked: 669 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Get-VBRUnstructuredBackupCopyJob Schedule
You can determine it by the following property:
Best regards,
Oleg
Code: Select all
(Get-VBRUnstructuredBackupJob).SecondaryTarget.BackupWindowEnabled
Oleg
-
- Veeam Legend
- Posts: 820
- Liked: 128 times
- Joined: May 11, 2018 8:42 am
- Contact:
Re: Get-VBRUnstructuredBackupCopyJob Schedule
Thanks,
It works perfectly.
I use it with this :
It works perfectly.
I use it with this :
Code: Select all
function Get-VeeamBackupCopyNAS
{
Write-host "$(Get-Date -Format HH:mm:ss) - NAS backup copy jobs"
$NASBackupCopyJobsReq = Get-VBRUnstructuredBackupCopyJob
foreach ($element in $NASBackupCopyJobsReq)
{
$Source = Get-VBRUnstructuredBackupJob -Id $element.LinkedJobIds.Guid
$Retention = if ($element.Options.NasBackupRetentionPolicy.UseSpecificRetentionPolicy)
{
$element.Options.NasBackupRetentionPolicy.ShortTermRetention + " " + $element.Options.NasBackupRetentionPolicy.ShortTermRetentionUnit
}
else
{
$Source.ShortTermRetentionPeriod + " " + $source.ShortTermRetentionType
}
[pscustomobject]@{
Name = $element.Name
Source = $Source.name
Target = (Get-VBRBackupRepository | Where-Object {$_.Id -eq $element.TargetRepositoryId.Guid}).Name
Retention = $Retention
Encryption = $element.BackupStorageOptions.UseSpecificStorageEncryption
Schedule = if ($Source.SecondaryTarget.BackupWindowEnabled) {"Continuously"} else {"A renseigner manuellement"}
}
Write-Host "$(Get-Date -Format HH:mm:ss) --------------------"
}
}
Who is online
Users browsing this forum: No registered users and 11 guests