--- title: "Add-VBORepository" description: "This cmdlet adds the following types of backup repositories to the Veeam Backup for Microsoft 365 infrastructure: a JET-based backup repository or an object storage repository." canonical: "https://helpcenter.veeam.com/docs/vbo365/powershell/add-vborepository.html" breadcrumb: "PowerShell Reference > Veeam Backup for Microsoft 365 PowerShell Reference > Backup Infrastructure > JET-based Backup Repositories and Object Storage Repositories > Add-VBORepository" dateModified: "2026-08-21" --- # Add-VBORepository ## Short Description Adds a JET-based backup repository or an object storage repository to the Veeam Backup for Microsoft 365 infrastructure. ## Syntax This cmdlet provides the following parameter sets: ## Detailed Description This cmdlet adds the following types of backup repositories to the Veeam Backup for Microsoft 365 infrastructure: a JET-based backup repository or an object storage repository. Veeam Backup for Microsoft 365 uses backup repositories as storage systems for backups and backup copies created for Microsoft 365 and on-premises Microsoft organizations. Every backup repository has the retention policy that defines how long you want to keep backups on a backup repository. You can specify the following retention policy settings: - Retention period to specify how long you want to keep data on a backup repository. You can set the period to years, months or days. - Retention policy schedule to specify the day and time when Veeam Backup for Microsoft 365 must check the backup repository and remove the outdated backups. You can set the schedule to daily or monthly. - Retention policy type to set it to Item-level or to snapshot-based types. For more information on retention policy, see the [Retention Policy](https://helpcenter.veeam.com/docs/vbo365/guide/retention_policy.html?ver=8) section of the Veeam Backup for Microsoft 365 User Guide. ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

CustomRetentionPeriod

For the CustomRetentionPeriodType option.

Specifies the retention period to keep data on a backup repository. The retention period is defined according to the CustomRetentionPeriod settings:

  • Sets the retention period to the number of months if the CustomRetentionPeriodType parameter is set to Months.
  • Sets the retention period to the number of days if the CustomRetentionPeriodType parameter is set to Days.

Veeam Backup for Microsoft 365 will remove items from a backup repository once this period is passed.

Int32

True

Named

False

CustomRetentionPeriodType

Specifies a type of custom retention period. Veeam Backup for Microsoft 365 will remove items from a backup repository once this period is passed. You can set the custom retention period to either of the following types:

  • Months
  • Days

Set the CustomRetentionPeriod parameter to specify the number of days or the number of months.

VBORetentionPeriodType

True

Named

False

DailyTime

For daily retention policy schedule.

Specifies the time of the day when Veeam Backup for Microsoft 365 must apply the retention policy.

Default: 00:00:00

TimeSpan

True

Named

False

DailyType

For daily retention policy schedule.

Specifies the days when Veeam Backup for Microsoft 365 must apply the retention policy:

  • Sunday
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Everyday
  • Workdays
  • Weekends

Default: Everyday

VBODailyType

True

Named

False

Description

Specifies a description of the backup repository. The default description contains information on the user who added the backup repository, date and time when the backup repository was added.

String

False

Named

False

Force

Defines that the cmdlet will add a backup repository to the Veeam Backup for Microsoft 365 infrastructure without notifying the user.

Default: False

SwitchParameter

False

Named

False

IgnoreProxyPoolApplianceAccessValidation

Defines that the cmdlet will ignore check whether backup proxy servers that belong to the specified backup proxy pool can access the archiver appliance.

Default: False

SwitchParameter

False

Named

False

MonthlyDayNumber

For monthly retention policy schedule.

Specifies the order number for the day of the week when Veeam Backup for Microsoft 365 must apply the retention policy.

  • First
  • Second
  • Third
  • Fourth
  • Last

Default: First

VBOMonthlyDayNumber

True

Named

False

MonthlyDayOfWeek

For monthly retention policy schedule.

Specifies the day of the week when Veeam Backup for Microsoft 365 must apply the retention policy.

  • Sunday
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday

Default: Monday

DayOfWeek

True

Named

False

MonthlyTime

For monthly retention policy schedule.

Specifies the time of the day when Veeam Backup for Microsoft 365 must apply the retention policy.

Default: 18:00:00

TimeSpan

True

Named

False

Name

Specifies a name of the backup repository. The cmdlet will create a backup repository with this name.

String

True

Named

False

ObjectStorageEncryptionKey

Specifies object storage encryption key. Veeam Backup for Microsoft 365 will encrypt data that is saved to this object storage repository.

Accepts the VBOEncryptionKey object.

To get this object, run the Get-VBOEncryptionKey cmdlet.

IVBOCredentialKey

False

Named

False

ObjectStorageRepository

Specifies an object storage repository. The cmdlet will add this object storage repository.

Accepts the VBOObjectStorageRepository object.

To get this object, run the Get-VBOObjectStorageRepository cmdlet.

VBOObjectStorageRepository

True

Named

False

Path

Specifies the full path to a directory on the backup proxy server where you want to store your backups.

String

True

Named

False

Proxy

Specifies a backup proxy server. The cmdlet will map a new JET-based backup repository or object storage repository to this backup proxy server.

Accepts the VBOProxy object.

To get this object, run the Get-VBOProxy cmdlet.

VBOProxy

False

Named

False

ProxyPool

Specifies a backup proxy pool. The cmdlet will map a new object storage repository to this backup proxy pool.

Accepts the VBOProxyPool object.

To get this object, run the Get-VBOProxyPool cmdlet.

VBOProxyPool

False

Named

False

RetentionFrequencyType

Specifies retention policy schedule. Veeam Backup for Microsoft 365 will check a backup repository and will remove the outdated backups according to this schedule. You can set either of the following types of schedule:

  • Daily: to check and remove the outdated backups once a day.

    Set the DailyTime and DailyType parameters to specify the daily retention policy schedule.

  • Monthly: to check and remove the outdated backups once a month.

    Set the MonthlyTime, MonthlyDayNumber and MonthlyDayOfWeek parameters to specify the monthly retention policy schedule.

Default: Daily

VBORetentionFrequencyType

True

Named

False

RetentionPeriod

Specifies the retention period in years. Veeam Backup for Microsoft 365 will remove items from a backup repository once this period is passed. You can set either of the following periods:

  • Year1
  • Years2
  • Years3
  • Years5
  • Years7
  • Years10
  • Years25
  • KeepForever

Default: Years3

Note: Apply the CustomRetentionPeriodType parameter to set the retention period in months or days.

VBORetentionPeriod

True

Named

False

RetentionType

Specifies a type of retention policy. You can set either of the following types:

  • ItemLevel
  • SnapshotBased

Default: SnapshotBased

VBORetentionType

False

Named

False

SyncNow

Defines that the cmdlet will start to synchronize cache between the object storage repository and the PersistentCache database on the PostgreSQL instance.

Default: False

SwitchParameter

False

Named

False

`` This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the [About Common Parameters](http://go.microsoft.com/fwlink/p/?LinkID=113216) section of Microsoft Learn. ## Output Object The cmdlet returns the [`VBORepository`](vborepository.md) object that contains settings of the Veeam Backup for Microsoft 365 repository. ## Examples ::: example ### Example 1: Adding Jet-Based Backup Repository with Default Retention Policy Period This example shows how to add the *External Data Storage* backup repository to the `support.north.local` backup proxy server. The retention type is set to snapshot-based. ``` $proxy = Get-VBOProxy -Hostname support.north.local Add-VBORepository -Proxy $proxy -Name "External Data Storage" -Path "C:\External Data Storage" -Description "North Backup Repository" -RetentionType SnapshotBased ``` Perform the following steps: 1. Run the [`Get-VBOProxy`](get-vboproxy.md) cmdlet. Specify the `Hostname` parameter value. Save the result to the `$proxy` variable. 2. Run the `Add-VBORepository` cmdlet. Specify the following settings: - Set the `$proxy` variable as the `Proxy` parameter value. - Specify the `Name` parameter value. - Specify the `Path` parameter value. - Specify the `Description` parameter value. - Set `SnapshotBased` as the `RetentionType` parameter value. ::: ::: example ### Example 2: Adding Jet-Based Backup Repository with Yearly Retention Period [Policy Applied Daily] This example shows how to add an *External Data Storage* backup repository to the `d96f55a4-d15d-410b-b0f0-d51d17ccdab6` backup proxy server. The retention settings for the backup repository will be the following: - The retention period is set to 1 year. - Veeam Backup for Microsoft 365 will check the backup repository and remove the outdated backups daily at 3:00 PM. - The retention type is item-level. ``` $proxy = Get-VBOProxy -Id d96f55a4-d15d-410b-b0f0-d51d17ccdab6 Add-VBORepository -Proxy $proxy -Name "External Data Storage" -Path "C:\External Data Storage" -RetentionPeriod Year1 -RetentionFrequencyType Daily -DailyTime 15:00:00 -DailyType Everyday -Description "Daily Backup Repository" -RetentionType ItemLevel ``` Perform the following steps: 1. Run the [`Get-VBOProxy`](get-vboproxy.md) cmdlet. Specify the `Id` parameter value. Save the result to the `$proxy` variable. 2. Run the `Add-VBORepository` cmdlet. Specify the following settings: - Set the `$proxy` variable as the `Proxy` parameter value. - Specify the `Name` parameter value. - Specify the `Path` parameter value. - Specify the `Description` parameter value. - Set `Year1` as the `RetentionPeriod` parameter value. - Set `Daily` as the `RetentionFrequencyType` parameter value. - Set `15:00:00` as the `DailyTime` parameter value. - Set `Everyday` as the `DailyType` parameter value. - Set `ItemLevel` as the `RetentionType` parameter value. ::: ::: example ### Example 3: Adding Jet-Based Backup Repository with Yearly Retention Period [Policy Applied Monthly] This example shows how to add the *External Data Storage* backup repository to the `support.south.local` backup proxy server. The retention settings for the backup repository will be the following: - The retention period is 2 years. - Veeam Backup for Microsoft 365 will check the backup repository and remove the outdated backups every last Sunday at 2:00 PM. - The retention type is snapshot-based. ``` $proxy = Get-VBOProxy -Hostname support.south.local Add-VBORepository -Proxy $proxy -Name "External Data Storage" -Path "C:\External Data Storage" -RetentionPeriod Years2 -RetentionFrequencyType Monthly -MonthlyTime 14:00:00 -MonthlyDayNumber Last -MonthlyDayOfWeek Sunday -Description "Monthly ABC" -RetentionType SnapshotBased ``` Perform the following steps: 1. Run the [`Get-VBOProxy`](get-vboproxy.md) cmdlet. Specify the `Hostname` parameter value. Save the result to the `$proxy` variable. 2. Run the `Add-VBORepository` cmdlet. Specify the following settings: - Specify the `Name` parameter value. - Specify the `Description` parameter value. - Specify the `Path` parameter value. - Set the `$proxy` variable as the `Proxy` parameter value. - Set `Years2` as the `RetentionPeriod` parameter value. - Set `Monthly` as the `RetentionFrequencyType` parameter value. - Set `14:00:00` as the `MonthlyTime` parameter value. - Set `Last` as the `MonthlyDayNumber` parameter value. - Set `Sunday` as the `MonthlyDayOfWeek` parameter value. - Set `SnapshotBased` as the `RetentionType` parameter value. ::: ::: example ### Example 4: Adding Jet-Based Backup Repository with Custom Retention period [Policy Applied Daily] This example shows how to add the *External Data Storage* backup repository to the `d96f55a4-d15d-410b-b0f0-d51d17ccdab6` backup proxy server. The retention settings for the backup repository will be the following: - The retention period is 3 months. - Veeam Backup for Microsoft 365 will check the backup repository and remove the outdated backups daily at 12:00 PM. - The retention type is snapshot-based. ``` $proxy = Get-VBOProxy -Id d96f55a4-d15d-410b-b0f0-d51d17ccdab6 Add-VBORepository -Proxy $proxy -Name "Daily Reports" -Path "C:\External Data Storage" -CustomRetentionPeriodType Months -CustomRetentionPeriod 3 -RetentionFrequencyType Daily -DailyTime 12:00:00 -DailyType Workdays -Description "Daily ABC" -RetentionType SnapshotBased ``` Perform the following steps: 1. Run the [`Get-VBOProxy`](get-vboproxy.md) cmdlet. Specify the `Id` parameter value. Save the result to the `$proxy` variable. 2. Run the `Add-VBORepository` cmdlet. Specify the following settings: - Set the `$proxy` variable as the `Proxy` parameter value. - Specify the `Name` parameter value. - Specify the `Path` parameter value. - Specify the `Description` parameter value. - Set `Months` as the `CustomRetentionPeriodType` parameter value. - Set `3` as the `CustomRetentionPeriod` parameter value. - Set `Daily` as the `RetentionFrequencyType` parameter value. - Set `12:00:00` as the `DailyTime` parameter value. - Set `Workdays` as the `DailyType` parameter value. - Set `SnapshotBased` as the `RetentionType` parameter value. ::: ::: example ### Example 5: Adding Jet-Based Backup Repository with Custom Retention period [Policy Applied Monthly] This example shows how to add the *External Data Storage* backup repository to the `support.west.local` backup proxy server. The retention settings for the backup repository will be the following: - The retention period is 7 days. - Veeam Backup for Microsoft 365 will check the backup repository and remove the outdated backups every first Monday at 8:00 AM. - The retention type is item-level. ``` $proxy = Get-VBOProxy -Hostname support.west.local Add-VBORepository -Proxy $proxy -Name "External Data Storage" -Path "C:\External Data Storage" -CustomRetentionPeriodType Days -CustomRetentionPeriod 7 -RetentionFrequencyType Monthly -MonthlyTime 08:00:00 -MonthlyDayNumber First -MonthlyDayOfWeek Monday -Description "Monthly ABC" -RetentionType ItemLevel ``` Perform the following steps: 1. Run the [`Get-VBOProxy`](get-vboproxy.md) cmdlet. Specify the `Hostname` parameter value. Save the result to the `$proxy` variable. 2. Run the `Add-VBORepository` cmdlet. Specify the following settings: - Set the `$proxy` variable as the `Proxy` parameter value. - Specify the `Name` parameter value. - Specify the `Path` parameter value. - Specify the `Description` parameter value. - Set `Days` as the `CustomRetentionPeriodType` parameter value. - Set `7` as the `CustomRetentionPeriod` parameter value. - Set `Monthly` as the `RetentionFrequencyType` parameter value. - Set `08:00:00` as the `MonthlyTime` parameter value. - Set `First` as the `MonthlyDayNumber` parameter value. - Set `Monday` as the `MonthlyDayOfWeek` parameter value. - Set `ItemLevel` as the `RetentionType` parameter value. ::: ::: example ### Example 6: Adding Object Storage Repository This example shows how to add Azure Blob Storage. ``` $account = Get-VBOAzureBlobAccount -Id 133dae61-cfce-4fe0-8f8d-cbe52bd5612a $connection = New-VBOAzureBlobConnectionSettings -Account $account -RegionType Global $container = Get-VBOAzureBlobContainer -ConnectionSettings $connection -Name "ContainerName" $folder = Get-VBOAzureBlobFolder -Container $container -Name "FolderName" $objectstorage = Add-VBOAzureBlobObjectStorageRepository -Folder $folder -Name "Music" $proxy = Get-VBOProxy -Hostname support.south.local Add-VBORepository -Proxy $proxy -Path "C:\AzureStorage" -Name "Azure Blob Storage" -ObjectStorageRepository $objectStorage ``` Perform the following steps: 1. Create an object storage repository: 1. Run the [`Get-VBOAzureBlobAccount`](get-vboazureblobaccount.md) cmdlet. Specify the `Id` parameter value. Save the result to the `$account` variable. 2. Run the [`New-VBOAzureBlobConnectionSettings`](new-vboazureblobconnectionsettings.md) cmdlet. Set the `$account` variable as the `Account` parameter value. Specify the `RegionType` parameter value. Save the result to the `$connection` variable. 3. Run the [`Get-VBOAzureBlobContainer`](get-vboazureblobcontainer.md) cmdlet. Set the `$connection` variable as the `ConnectionSettings` parameter value. Specify the `Name` parameter value. Save the result to the `$container` variable. 4. Run the [`Get-VBOAzureBlobFolder`](get-vboazureblobfolder.md) cmdlet. Set the `$container` variable as the `Container` parameter value. Specify the `Name` parameter value. Save the result to the `$folder` variable. 5. Run the [`Add-VBOAzureBlobObjectStorageRepository`](add-vboazureblobobjectstoragerepository.md) cmdlet. Set the `$folder` variable as the `Folder` parameter value. Specify the `Name` parameter value. Save the result to the `$objectStorage` variable. 2. Run the [`Get-VBOProxy`](get-vboproxy.md) cmdlet. Specify the `Hostname` parameter value. Save the result to the `$proxy` variable. 3. Run the `Add-VBORepository` cmdlet. Specify the following settings: - Set the `$proxy` variable as the `Proxy` parameter value. - Specify the `Path` parameter value. - Specify the `Name` parameter value. - Set the `$objectStorage` variable as the `ObjectStorageRepository` parameter value. ::: ## Related Commands - [`Get-VBOProxy`](get-vboproxy.md) - [`Get-VBOAzureBlobAccount`](get-vboazureblobaccount.md) - [`Get-VBOEncryptionKey`](get-vboencryptionkey.md) - [`New-VBOAzureBlobConnectionSettings`](new-vboazureblobconnectionsettings.md) - [`Get-VBOAzureBlobContainer`](get-vboazureblobcontainer.md) - [`Get-VBOAzureBlobFolder`](get-vboazureblobfolder.md) - [`Add-VBOAzureBlobObjectStorageRepository`](add-vboazureblobobjectstoragerepository.md)