Help Center
Choose product document...
Veeam Backup & Replication 9.5 Update 4
PowerShell Reference

New-VBRScriptProcessingOptions

Short Description

Creates pre-freeze and post-thaw scripts settings for Veeam Agent backup jobs.

Applies to

Product Edition: Community, Standard, Enterprise, Enterprise Plus

Syntax

New-VBRScriptProcessingOptions -ProcessingAction <VBRGeneralProcessingAction> {DisableCompletely | IgnoreFailures | RequireSuccess} [-Credentials <CCredentials>]
[-ScriptPrefreezeCommand <string>] [-ScriptPostthawCommand<string>] [<CommonParameters>]

Detailed Description

This cmdlet creates the VBRScriptProcessingOptions object that contains pre-freeze and post-thaw scripts settings for the protected computer OS quiescence. You can use these scripts to create consistent backups of the protected computers that do not support Microsoft VSS.

For more information about custom scripts, see the Pre-Freeze and Post-Thaw Scripts section of the Veeam Agent Management Guide.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

ProcessingAction

Specifies script processing settings:

  • IgnoreFailures: use this option if you want to continue the backup process even if script errors occur.
  • RequireSuccess: use this option if you want Veeam Backup & Replication to stop the backup process if the scripts fail.
  • DisableCompletely: use this option if you do not want to run scripts.

NOTE: The IgnoreFailures option does not work for Veeam Agent jobs that back up Linux computers. Use the RequireSuccess option to enable script execution for these types of jobs.

True

Named

False

 

Credentials

Specifies the user account credentials with local administrator privileges on the VM guest OS. Veeam Backup & Replication will use these credentials to run pre-freeze and post-thaw scripts.

By default, Veeam Agent for Microsoft Windows will use the credentials that you specified for the protection group.

NOTE: this option works for Veeam Agent jobs that back up Windows computers only.

False

Named

False

 

ScriptPrefreezeCommand

Specifies the path on your backup server to a local folder with the pre-freeze script.

False

Named

False

 

ScriptPostthawCommand

Specifies the path on your backup server to a local folder with the post-thaw script.

False

Named

False

 

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Return Type

Example 1

This command creates script processing settings for a Veeam Agent job that backs up Linux computers. The job will run with the following options:

  • Veeam Backup & Replication will run the pre-freeze script before the job starts to quiesce the protected computer OS.
  • Veeam Backup & Replication will run the post-thaw script after the snapshot is created to bring the protected computer back to the initial state.

New-VBRScriptProcessingOptions -ProcessingAction RequireSuccess -ScriptPrefreezeCommand "C:\scripts\pre-script.bat" -ScriptPostthawCommand
"C:\scripts\post-script.bat"

Example 2

This example shows how to create script processing settings for a Veeam Agent job that backs up Windows computers. The job will run with the following options:

  • Veeam Backup & Replication will use the user account credentials to run pre-freeze and post-thaw scripts.
  • Veeam Backup & Replication will continue to run the job even if scripts fail.

To create the script processing settings, perform the following steps:

  1. Run Get-VBRCredentials to specify the user credentials. Save the result to the $creds variable.
  2. Run New-VBRScriptProcessingOptions with the $creds variable. Use the ProcessingAction parameter with the IgnoreFailures value to proceed with the job in case the script fails.

$creds = Get-VBRCredentials

New-VBRScriptProcessingOptions -ProcessingAction IgnoreFailures -ScriptPrefreezeCommand "C:\script\pre-script.bat" -ScriptPostthawCommand "C:\script\post-script.bat" -Credentials $creds

Related Commands

Get-VBRCredentials

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management Guide

Veeam Explorers User Guide

Backup and Restore of SQL Server Databases

Veeam Plug-ins for Enterprise Applications

PowerShell Reference

Veeam Explorers PowerShell Reference

RESTful API Reference

Required Permissions Reference

Veeam Availability for Nutanix AHV

Veeam Backup for Microsoft Office 365 Documentation

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation

Quick Start Guide for VMware vSphere

Quick Start Guide for Microsoft Hyper-V