Start-VBORepositoryMaintenanceSession

Short Description

Creates and starts a maintenance session to suspend operations on backup repositories.

Syntax

Start-VBORepositoryMaintenanceSession -Repository <VBORepository[]> [-WaitForSessionsTimeoutMinutes <Int32>]

[-ForceStopSessions] [-ForceStopSessionsTimeoutMinutes <Int32>] [<CommonParameters>]

Detailed Description

This cmdlet creates and starts a maintenance session for the specified backup repositories.

A maintenance session is a period of time during which Veeam Backup for Microsoft 365 suspends operations on backup repositories: it does not start new related sessions that use these repositories, does not remove backed-up data according to the retention policy and does not run background operations. You may need to start a maintenance session, for example, if you want to perform service operations on the storage where the backup repositories reside.

Note

A backup repository can be involved in one session at a time. If at least one of the specified backup repositories is already involved in a maintenance session, a change owner session or an organization transfer session, Veeam Backup for Microsoft 365 does not start the maintenance session for any of the specified backup repositories.

Parameters

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

ForceStopSessions

Defines action that Veeam Backup for Microsoft 365 will perform if the related sessions exceed the WaitForSessionsTimeoutMinutes value to finish. The following values are available:

  • true — the related sessions are stopped, the maintenance session is created and started.
  • false — the maintenance session is canceled.

Default: False

SwitchParameter

False

Named

False

ForceStopSessionsTimeoutMinutes

For the ForceStopSessions parameter set to true.

Specifies a timeout in minutes.

The cmdlet will use this timeout to wait for the related sessions to stop after Veeam Backup for Microsoft 365 forced them to stop.

Default: 10

Int32

False

Named

False

Repository

Specifies an array of backup repositories. The cmdlet will create and start a maintenance session for these backup repositories.

Accepts the VBORepository object.

To get this object, run the Get-VBORepositoryReturns backup repositories. cmdlet.

VBORepository[]

True

Named

True (ByValue)

WaitForSessionsTimeoutMinutes

Specifies a timeout in minutes.

The cmdlet will use this timeout to wait for the related sessions to finish before starting the current session. Related sessions are the sessions that Veeam Backup for Microsoft 365 creates to perform different activities, such as data backup and backup copy, data management, data restore and data retrieval.

Default: 60

Int32

False

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Learn.

Output Object

The cmdlet returns the VBORepositoryMaintenanceSession object that contains details on a maintenance session when Veeam Backup for Microsoft 365 suspends operations on a backup repository.

Examples

Starting Maintenance Session for Backup Repositories

This example shows how to start a maintenance session for the Repository 01 and Repository 09 backup repositories.

$repository1 = Get-VBORepository -Name "Repository 01"

$repository2 = Get-VBORepository -Name "Repository 09"

Start-VBORepositoryMaintenanceSession -Repository $repository1, $repository2

Perform the following steps:

  1. Run the Get-VBORepositoryReturns backup repositories. cmdlet. Specify the Name parameter value. Save the result to the $repository1 variable.
  2. Run the Get-VBORepositoryReturns backup repositories. cmdlet. Specify the Name parameter value. Save the result to the $repository2 variable.
  3. Run the Start-VBORepositoryMaintenanceSession cmdlet. Set the $repository1 and $repository2 variables as the Repository parameter value.

Get-VBORepositoryReturns backup repositories.

Page updated 2026-08-21

Page content applies to build 8.6.0.1102