--- title: "Set-VBRHistoryOptions" description: "This cmdlet modifies job sessions history settings. To modify settings, specify new values for the necessary parameters. The cmdlet will overwrite the previous parameter values with new values. The parameters that you omit will remain unchanged." canonical: "https://helpcenter.veeam.com/docs/vbr/powershell/set-vbrhistoryoptions.html" breadcrumb: "Veeam PowerShell Reference > Veeam PowerShell Reference > Backup Infrastructure > Veeam Backup & Replication Settings > Specifying Session History Settings > Set-VBRHistoryOptions" dateModified: "2026-08-19" --- # Set-VBRHistoryOptions ## Short Description Modifies job sessions history settings. **Product Edition**: Standard, Enterprise, Enterprise Plus, Veeam Universal License ## Syntax This cmdlet provides the following parameter sets: ## Detailed Description This cmdlet modifies job sessions history settings. ::: note To modify settings, specify new values for the necessary parameters. The cmdlet will overwrite the previous parameter values with new values. The parameters that you omit will remain unchanged. ::: ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

KeepAllSessions

Defines that Veeam Backup & Replication will not delete the session information from the database.

Default: False.

SwitchParameter

False

Named

False

RetentionLimitWeeks

Specifies a period in weeks. Veeam Backup & Replication will keep the session information from the database for this period of time.

Default: 13.

Int32

False

Named

False

`` This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see [ Microsoft Docs](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_commonparameters?view=powershell-7). ## Output Object The cmdlet returns the `VBRHistoryOptions` object that contains job sessions history settings. ## Examples ::: example ### Example 1. Modifying Session History Settings to Keep all Sessions This command modifies history settings. According to these settings, Veeam Backup & Replication will keep all sessions information in the database. ``` Set-VBRHistoryOptions -KeepAllSessions KeepAllSessions RetentionLimitWeeks --------------- ------------------- True -1 ``` ::: ::: example ### Example 2. Modifying Session History Settings to Keep Sessions for Several Weeks This command modifies history settings. According to these settings, Veeam Backup & Replication will keep session information in the database for `7` weeks. ``` Set-VBRHistoryOptions -RetentionLimitWeeks 7 KeepAllSessions RetentionLimitWeeks -------------- ------------------- False 8 ``` :::