Add-VBREntraIDLogsBackupJob

Short Description

Creates a Microsoft Entra ID log backup job.

Product Edition: Enterprise Plus, Veeam Universal License

Syntax

Add-VBREntraIDLogsBackupJob -Tenant <VBREntraIDTenant>

[-ShortTermRetentionType <VBREntraIdLogsBackupShortTermRetentionType>] [-ShortTermRetentionPeriod <Int32>]

[-Name <String>] [-Description <String>] -ShortTermBackupRepository <CBackupRepository>

[-SecondaryTarget <VBRUnstructuredBackupSecondaryTarget[]>] [-StorageOptions <VBRStorageOptions>]

[-HealthCheckOptions <VBRFullBackupOptions>] [-NotificationOptions <VBRNotificationOptions>]

[-ScriptOptions <VBRJobScriptOptions>] [-ScheduleOptions <VBRServerScheduleOptions>] [-Force] [-HighPriority] [<CommonParameters>]

Detailed Description

This cmdlet creates a backup job for Entra ID audit and sign-in logs.

Parameters

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Description

Specifies the description of the log backup job.

String

False

Named

False

Force

Defines that the cmdlet will create a log backup job without showing warnings or errors in the PowerShell console.

SwitchParameter

False

Named

False

HealthCheckOptions

Specifies the healthcheck schedule. The cmdlet will create the log backup job with this healthcheck schedule.

Accepts the VBRFullBackupOptions object. To create this object, run the New-VBRFullBackupOptionsCreates active full backup schedule settings for Veeam Agent backup jobs. cmdlet.

VBRFullBackupOptions

False

Named

False

HighPriority

Defines that Veeam Backup & Replication will prioritize this job higher than other similar jobs and will allocate resources to it in the first place.

SwitchParameter

False

Named

False

Name

Specifies the name of the log backup job.

String

False

Named

False

NotificationOptions

Specifies notification options. The cmdlet will create the log backup job with these notification options.

Accepts the VBRNotificationOptions object. To create this object, run the New-VBRNotificationOptionsCreates new job notification options. cmdlet.

VBRNotificationOptions

False

Named

False

ScheduleOptions

Specifies schedule options. The cmdlet will create the log backup job with these schedule options.

Accepts the VBRServerScheduleOptions object. To create this object, run the New-VBRServerScheduleOptionsCreates the schedule for jobs. cmdlet.

VBRServerScheduleOptions

False

Named

False

ScriptOptions

Specifies pre-job and post-job script options. The cmdlet will create the log backup job with these script options.

Accepts the VBRJobScriptOptions object. To create this object, run the New-VBRJobScriptOptionsCreates new job script options. cmdlet.

VBRJobScriptOptions

False

Named

False

SecondaryTarget

Specifies the secondary backup repository. The cmdlet will use this repository as the secondary repository for the log backup job.

Accepts the VBRUnstructuredBackupSecondaryTarget[] object. To create this object, run the New-VBRUnstructuredBackupSecondaryTargetCreates secondary backup repository for file backup jobs and object storage backup jobs. cmdlet.

VBRUnstructuredBackupSecondaryTarget[]

False

Named

False

ShortTermBackupRepository

Specifies the primary backup repository. The cmdlet will use this repository as a primary storage for storing log backups.

Accepts the CBackupRepository object. To get this object, run the Get-VBRBackupRepositoryReturns a list of backup repositories. cmdlet.

CBackupRepository

True

Named

False

ShortTermRetentionPeriod

For the ShortTermRetentionType option.

Specifies the period of time to keep data in the primary backup repository.

Int32

False

Named

False

ShortTermRetentionType

Specifies the type of the retention policy for the primary backup repository.

Use the ShortTermRetentionPeriod parameter to specify the number of days, months or years.

VBREntraIdLogsBackupShortTermRetentionType

False

Named

False

StorageOptions

Specifies storage optimization settings. The cmdlet will create the log backup job with these settings.

Accepts the VBRStorageOptions object. To create this object, run the New-VBRStorageOptionsDefines storage optimization settings for backup jobs. cmdlet.

VBRStorageOptions

False

Named

False

Tenant

Specifies the tenant whose logs you want to back up.

Accepts the VBREntraIDTenant object. To get this object, run the Get-VBREntraIDTenantReturns Microsoft Entra ID tenants added to the backup infrastructure. cmdlet.

VBREntraIDTenant

True

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.

Output Object

The cmdlet returns the VBREntraIdLogsBackupJob object that contains settings of the Entra ID log backup job.

Examples

Adding Entra ID Log Backup Job

This example shows how to add an Entra ID log backup job with the 14 day retention period. The backups will also be copied to a secondary repository. From the secondary repository, the backups will be deleted after 2 months.

$tenant = Get-VBREntraIdTenant -AzureTenantId "xxxx"

$shortRepo = Get-VBRBackupRepository -Name "Default Backup Repository"

$repository = Get-VBRBackupRepository -Name "Secondary Backup Repository"

$secondaryRepo = New-VBRUnstructuredBackupSecondaryTarget -BackupRepository $repository -CustomRetentionType Monthly -CustomRetentionPeriod 2

$logBackupJob = Add-VBREntraIDLogsBackupJob -Tenant $tenant -ShortTermRetentionType 0 -ShortTermRetentionPeriod 14 -Name "Log Backup" -ShortTermBackupRepository $shortRepo -SecondaryTarget $secondaryRepo

Perform the following steps:

  1. Run the Get-VBREntraIdTenantReturns Microsoft Entra ID tenants added to the backup infrastructure. cmdlet. Specify the AzureTenantId parameter value. Save the result to the $tenant variable.
  2. Run the Get-VBRBackupRepositoryReturns a list of backup repositories. cmdlet. Specify the Name parameter value. Save the result to the $shortRepo variable.
  3. Run the Get-VBRBackupRepositoryReturns a list of backup repositories. cmdlet. Specify the Name parameter value. Save the result to the $repository variable.
  4. Run the New-VBRUnstructuredBackupSecondaryTargetCreates secondary backup repository for file backup jobs and object storage backup jobs. cmdlet. Specify the following settings:
    • Set the $repository variable as the BackupRepository parameter value.
    • Specify the CustomRetentionType and CustomRetentionPeriod parameter values.
    • Save the result to the $secondaryRepo variable.
  5. Run the Add-VBREntraIDLogsBackupJob cmdlet. Specify the following settings:
    • Set the $tenant variable as the Tenant parameter value.
    • Specify the ShortTermRetentionType and ShortTermRetentionPeriod parameter values.
    • Specify the Name parameter value.
    • Set the $shortRepo variable as the ShortTermBackupRepository parameter value.
    • Set the $secondaryRepo variable as the SecondaryTarget parameter value.
    • Save the result to the $logBackupJob variable.

Page updated 2026-08-20

Page content applies to build 13.1.1.18