362
Veeam Backup & Replication PowerShell Version 7.0 Reference August, 2013

Veeam Backup & Replication PowerShell - Optrics · The reference is intended for anyone who wants to use the PowerShell extension in Veeam Backup & Replication

Embed Size (px)

Citation preview

Veeam Backup & Replication PowerShell Version 7.0

Reference August, 2013

2 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

© 2013 Veeam Software.

All rights reserved. All trademarks are the property of their respective owners.

No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language in any form by any means, without written permission from Veeam Software Inc (Veeam). The information contained in this document represents the current view of Veeam on the issue discussed as of the date of publication and is subject to change without notice. Veeam shall not be liable for technical or editorial errors or omissions contained herein. Veeam makes no warranties, express or implied, in this document. Veeam may have patents, patent applications, trademark, copyright, or other intellectual property rights covering the subject matter of this document. All other trademarks mentioned herein are the property of their respective owners. Except as expressly provided in any written license agreement from Veeam, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

Important! Please read the End User Software License Agreement before using the accompanying software program(s). Using any part of the software indicates that you accept the terms of the End User Software License Agreement.

3 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

CONTENTS CONTENTS............................................................................................................................................ 3 CONTACTING VEEAM SOFTWARE....................................................................................................... 8 ABOUT THIS GUIDE.............................................................................................................................. 9 GETTING STARTED............................................................................................................................. 10

EXAMPLES OF USE ................................................................................................................................................................. 13 POWERSHELL REMOTING ...................................................................................................................................................... 18 INTERACTIVE POWERSHELL HELP ......................................................................................................................................... 19

VEEAM BACKUP & REPLICATION CMDLETS ..................................................................................... 21 ADD-HP3SNAPSHOT ............................................................................................................................................................ 21 ADD-HP3STORAGE .............................................................................................................................................................. 23 ADD-HP4SNAPSHOT ............................................................................................................................................................ 25 ADD-HP4STORAGE .............................................................................................................................................................. 27 ADD-VBRBACKUPJOB .......................................................................................................................................................... 29 ADD-VBRBACKUPREPOSITORY............................................................................................................................................ 31 ADD-VBRCOPYJOB .............................................................................................................................................................. 34 ADD-VBRCREDENTIALS ........................................................................................................................................................ 36 ADD-VBRESX ....................................................................................................................................................................... 38 ADD-VBRESXI ...................................................................................................................................................................... 41 ADD-VBRHVBACKUPCOPYJOB ........................................................................................................................................... 43 ADD-VBRHVBACKUPJOB ..................................................................................................................................................... 46 ADD-VBRHVCLUSTER .......................................................................................................................................................... 48 ADD-VBRHVHOST................................................................................................................................................................ 50 ADD-VBRHVJOBOBJECT ...................................................................................................................................................... 52 ADD-VBRHVPROXY.............................................................................................................................................................. 54 ADD-VBRHVREPLICAJOB ..................................................................................................................................................... 56 ADD-VBRHVSCVMM ............................................................................................................................................................ 58 ADD-VBRJOBOBJECT ........................................................................................................................................................... 60 ADD-VBRLINUX .................................................................................................................................................................... 62 ADD-VBRREPLICAJOB .......................................................................................................................................................... 63 ADD-VBRTAPEFILESJOB ...................................................................................................................................................... 65 ADD-VBRTAPEMEDIAPOOL ................................................................................................................................................ 67 ADD-VBRTAPEVMJOB......................................................................................................................................................... 69 ADD-VBRVCENTER ............................................................................................................................................................... 71 ADD-VBRVCLOUD ................................................................................................................................................................ 72 ADD-VBRVCLOUDBACKUPCOPYJOB.................................................................................................................................. 74 ADD-VBRVCLOUDJOB ......................................................................................................................................................... 77 ADD-VBRVCLOUDVC .......................................................................................................................................................... 79 ADD-VBRVIBACKUPCOPYJOB ............................................................................................................................................. 82 ADD-VBRVIBACKUPJOB ...................................................................................................................................................... 85 ADD-VBRVIJOBOBJECT ....................................................................................................................................................... 86 ADD-VBRVIPROXY ............................................................................................................................................................... 88 ADD-VBRVIREPLICAJOB ...................................................................................................................................................... 90 ADD-VBRWANACCELERATOR ............................................................................................................................................ 92

4 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

ADD-VBRWINSERVER .......................................................................................................................................................... 94 ADD-VSBAPPLICATIONGROUP............................................................................................................................................ 95 ADD-VSBHVAPPLICATIONGROUP ...................................................................................................................................... 97 ADD-VSBHVJOB ................................................................................................................................................................... 99 ADD-VSBHVVIRTUALLAB ................................................................................................................................................. 101 ADD-VSBJOB ..................................................................................................................................................................... 103 ADD-VSBVIAPPLICATIONGROUP ..................................................................................................................................... 105 ADD-VSBVIRTUALLAB ....................................................................................................................................................... 107 CONNECT-VSBHVVIRTUALLAB......................................................................................................................................... 109 CONNECT-VSBVIRTUALLAB .............................................................................................................................................. 111 COPY-VBRJOB.................................................................................................................................................................... 112 DISABLE-VBRHVPROXY .................................................................................................................................................... 114 DISABLE-VBRJOB ............................................................................................................................................................... 115 DISABLE-VBRJOBGUESTFSINDEXING .............................................................................................................................. 116 DISABLE-VBRJOBVSSINTEGRATION ................................................................................................................................ 117 DISABLE-VBRJOBSCHEDULE ............................................................................................................................................. 118 DISABLE-VBRVIPROXY ...................................................................................................................................................... 119 EJECT-VBRTAPEDRIVE ....................................................................................................................................................... 120 EJECT-VBRTAPEMEDIUM .................................................................................................................................................. 121 ENABLE-VBRHVPROXY ..................................................................................................................................................... 122 ENABLE-VBRJOB ................................................................................................................................................................ 123 ENABLE-VBRJOBGUESTFSINDEXING ............................................................................................................................... 124 ENABLE-VBRJOBSCHEDULE .............................................................................................................................................. 125 ENABLE-VBRJOBVSSINTEGRATION .................................................................................................................................. 126 ENABLE-VBRVIPROXY ....................................................................................................................................................... 127 ERASE-VBRTAPEMEDIUM ................................................................................................................................................. 128 EXPORT-VBRLOGS ............................................................................................................................................................. 130 EXPORT-VBRTAPEMEDIUM .............................................................................................................................................. 132 FIND-VBRDATASTORE ....................................................................................................................................................... 134 FIND-VBRHVENTITY .......................................................................................................................................................... 135 FIND-VBROBJECT .............................................................................................................................................................. 137 FIND-VBRRESOURCEPOOL................................................................................................................................................ 138 FIND-VBRTAPECATALOG .................................................................................................................................................. 139 FIND-VBRTAPECATALOGVERSION ................................................................................................................................... 140 FIND-VBRVCLOUDENTITY ................................................................................................................................................. 142 FIND-VBRVIDATASTORE ................................................................................................................................................... 144 FIND-VBRVIENTITY ............................................................................................................................................................ 146 FIND-VBRVIFOLDER .......................................................................................................................................................... 148 FIND-VBRVIRESOURCEPOOL ............................................................................................................................................ 150 FIND-VSBHVVIRTUALLAB ................................................................................................................................................. 152 FIND-VSBVIRTUALLAB ...................................................................................................................................................... 154 GET-HP3SNAPSHOT .......................................................................................................................................................... 156 GET-HP3STORAGE ............................................................................................................................................................. 158 GET-HP3VOLUME .............................................................................................................................................................. 159 GET-HP4CLUSTER ............................................................................................................................................................. 160 GET-HP4SNAPSHOT .......................................................................................................................................................... 162

5 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

GET-HP4STORAGE ............................................................................................................................................................. 164 GET-HP4VOLUME .............................................................................................................................................................. 165 GET-VBRBACKUP ............................................................................................................................................................... 167 GET-VBRBACKUPREPOSITORY .......................................................................................................................................... 168 GET-VBRBACKUPSESSION ................................................................................................................................................ 169 GET-VBRCREDENTIALS ...................................................................................................................................................... 171 GET-VBRFILESINRESTOREPOINT ...................................................................................................................................... 172 GET-VBRHVPROXY ............................................................................................................................................................ 173 GET-VBRINSTANTRECOVERY ............................................................................................................................................ 174 GET-VBRJOB ...................................................................................................................................................................... 175 GET-VBRJOBOBJECT ......................................................................................................................................................... 177 GET-VBRJOBOBJECTVSSOPTIONS ................................................................................................................................... 178 GET-VBRJOBOPTIONS ....................................................................................................................................................... 179 GET-VBRJOBPROXY .......................................................................................................................................................... 180 GET-VBRJOBSCHEDULEOPTIONS ..................................................................................................................................... 182 GET-VBRJOBVSSOPTIONS ............................................................................................................................................... 183 GET-VBRLOCALHOST ........................................................................................................................................................ 184 GET-VBRREPLICA ............................................................................................................................................................... 185 GET-VBRRESTOREPOINT ................................................................................................................................................... 186 GET-VBRRESTORESESSION ............................................................................................................................................... 188 GET-VBRSERVER ................................................................................................................................................................ 189 GET-VBRTAPEBACKUP ...................................................................................................................................................... 191 GET-VBRTAPEDRIVE .......................................................................................................................................................... 192 GET-VBRTAPEJOB ............................................................................................................................................................. 193 GET-VBRTAPELIBRARY ...................................................................................................................................................... 194 GET-VBRTAPEMEDIAPOOL .............................................................................................................................................. 195 GET-VBRTAPEMEDIUM ..................................................................................................................................................... 197 GET-VBRTASKSESSION ...................................................................................................................................................... 200 GET-VBRVIPROXY ............................................................................................................................................................. 201 GET-VBRTOOLKITDOCUMENTATION ............................................................................................................................... 202 GET-VBRWANACCELERATOR .......................................................................................................................................... 203 GET-VSBAPPLICATIONGROUP .......................................................................................................................................... 205 GET-VSBHVVIRTUALLAB .................................................................................................................................................. 207 GET-VSBJOB ...................................................................................................................................................................... 209 GET-VSBJOBOPTIONS ....................................................................................................................................................... 211 GET-VSBJOBSCHEDULEOPTIONS ..................................................................................................................................... 212 GET-VSBSESSION ............................................................................................................................................................... 213 GET-VSBTASKSESSION ...................................................................................................................................................... 215 GET-VSBVIRTUALLAB ........................................................................................................................................................ 217 IMPORT-VBRBACKUP ......................................................................................................................................................... 219 IMPORT-VBRTAPEMEDIUM ............................................................................................................................................... 220 MOVE-VBRTAPEMEDIUM ................................................................................................................................................. 222 NEW-VBRJOBOPTIONS ..................................................................................................................................................... 224 NEW-VBRJOBSCHEDULEOPTIONS ................................................................................................................................... 225 NEW-VBRJOBVSSOPTIONS ............................................................................................................................................... 226 NEW-VBRVCLOUDVAPPRESTORESETTINGS ................................................................................................................... 228

6 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

NEW-VSBJOBOPTIONS ..................................................................................................................................................... 231 REMOVE-HP3SNAPSHOT .................................................................................................................................................. 233 REMOVE-HP3STORAGE ..................................................................................................................................................... 234 REMOVE-HP4SNAPSHOT .................................................................................................................................................. 235 REMOVE-HP4STORAGE ..................................................................................................................................................... 236 REMOVE-VBRBACKUP ....................................................................................................................................................... 237 REMOVE-VBRBACKUPREPOSITORY .................................................................................................................................. 239 REMOVE-VBRBACKUPSESSION ......................................................................................................................................... 241 REMOVE-VBRCREDENTIALS .............................................................................................................................................. 242 REMOVE-VBRHVPROXY .................................................................................................................................................... 243 REMOVE-VBRJOB ............................................................................................................................................................... 245 REMOVE-VBRJOBOBJECT .................................................................................................................................................. 246 REMOVE-VBRREPLICA ....................................................................................................................................................... 247 REMOVE-VBRRESTOREPOINT ........................................................................................................................................... 249 REMOVE-VBRRESTORESESSION ........................................................................................................................................ 251 REMOVE-VBRSERVER ......................................................................................................................................................... 252 REMOVE-VBRTAPEMEDIAPOOL ....................................................................................................................................... 254 REMOVE-VBRVIPROXY ...................................................................................................................................................... 255 REMOVE-VBRWANACCELERATOR .................................................................................................................................. 257 REMOVE-VSBAPPLICATIONGROUP .................................................................................................................................. 259 REMOVE-VSBHVVIRTUALLAB ........................................................................................................................................... 261 REMOVE-VSBJOB ............................................................................................................................................................... 263 REMOVE-VSBSESSION ....................................................................................................................................................... 265 REMOVE-VSBVIRTUALLAB ................................................................................................................................................ 266 RESET-HVVMCHANGETRACKING ...................................................................................................................................... 268 RESET-VBRJOBOPTIONS ................................................................................................................................................... 270 RESET-VBRJOBSCHEDULEOPTIONS ................................................................................................................................. 272 RESET-VSBJOBOPTIONS .................................................................................................................................................... 273 RESTART-VBRINSTANTRECOVERY ..................................................................................................................................... 274 SET-VBRCREDENTIALS ....................................................................................................................................................... 276 SET-VBRJOBADVANCEDBACKUPOPTIONS ...................................................................................................................... 278 SET-VBRJOBADVANCEDNOTIFICATIONOPTIONS ........................................................................................................... 282 SET-VBRJOBADVANCEDOPTIONS .................................................................................................................................... 284 SET-VBRJOBADVANCEDHVOPTIONS .............................................................................................................................. 287 SET-VBRJOBADVANCEDSTORAGEOPTIONS .................................................................................................................... 289 SET-VBRJOBADVANCEDVIOPTIONS ................................................................................................................................ 291 SET-VBRJOBOBJECTVSSOPTIONS .................................................................................................................................... 293 SET-VBRJOBOPTIONS ....................................................................................................................................................... 294 SET-VBRJOBPROXY ........................................................................................................................................................... 295 SET-VBRJOBSCHEDULE ..................................................................................................................................................... 298 SET-VBRJOBSCHEDULEOPTIONS ..................................................................................................................................... 302 SET-VBRJOBVSSOPTIONS ................................................................................................................................................. 304 SET-VSBJOBOPTIONS ........................................................................................................................................................ 306 SET-VSBJOBSCHEDULEOPTIONS...................................................................................................................................... 308 SET-VSBJOBSCHEDULE ..................................................................................................................................................... 310 START-VBRINSTANTRECOVERY ......................................................................................................................................... 313

7 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

START-VBRHVINSTANTRECOVERY ................................................................................................................................... 316 START-VBRHVINSTANTRECOVERYMIGRATION ............................................................................................................... 318 START-VBRJOB .................................................................................................................................................................. 319 START-VBRLINUXFILERESTORE ........................................................................................................................................ 320 START-VBRQUICKMIGRATION .......................................................................................................................................... 322 START-VBRREPLICAFAILOVER .......................................................................................................................................... 324 START-VBRRESTOREVM ................................................................................................................................................... 325 START-VBRRESTOREVMFILES .......................................................................................................................................... 327 START-VBRTAPECATALOG ................................................................................................................................................ 329 START-VBRTAPEINVENTORY ............................................................................................................................................. 331 START-VBRTAPERESTORE ................................................................................................................................................. 333 START-VBRTAPERESTOREFILES ........................................................................................................................................ 335 START-VBRVCLOUDINSTANTRECOVERY .......................................................................................................................... 337 START-VBRVCLOUDRESTOREVAPP ................................................................................................................................. 340 START-VBRVCLOUDRESTOREVM ..................................................................................................................................... 343 START-VBRZIP ................................................................................................................................................................... 345 START-VBRWINDOWSFILERESTORE ................................................................................................................................. 347 START-VSBJOB ................................................................................................................................................................... 348 STOP-VBRINSTANTRECOVERY .......................................................................................................................................... 350 STOP-VBRJOB .................................................................................................................................................................... 352 STOP-VBRREPLICAFAILOVER ............................................................................................................................................ 354 STOP-VBRWINDOWSFILERESTORE .................................................................................................................................. 355 STOP-VSBJOB .................................................................................................................................................................... 356 SYNC-HP3STORAGE .......................................................................................................................................................... 358 SYNC-HP3VOLUME ........................................................................................................................................................... 359 SYNC-HP4STORAGE .......................................................................................................................................................... 360 SYNC-HP4VOLUME ........................................................................................................................................................... 361 SYNC-VBRBACKUPREPOSITORY ....................................................................................................................................... 362

8 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

CONTACTING VEEAM SOFTWARE At Veeam Software we value the feedback from our customers. It is important not only to help you quickly with your technical issues, but it is our mission to listen to your input, and build products that incorporate your suggestions.

Customer Support

Should you have a technical concern, suggestion or question, please visit our Customer Center Portal at cp.veeam.com to open a case, search our knowledge base, reference documentation, manage your license or obtain the latest product release.

Company Contacts

For the most up to date information about company contacts and offices location, please visit www.veeam.com/contacts.html.

Online Support

If you have any questions about Veeam Backup & Replication, you can use the following resources:

• Full documentation set: www.veeam.com/vmware-esx-backup/resources.html

• Community forum at www.veeam.com/forums

9 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

ABOUT THIS GUIDE This reference provides information about Veeam Backup PowerShell extension – a snap-in to Microsoft Windows PowerShell. The document applies to version 6.5 and all subsequent versions until it is replaced with a new edition.

Intended Audience

The reference is intended for anyone who wants to use the PowerShell extension in Veeam Backup & Replication. It is primarily aimed at administrators of the virtual environment, consultants, analysts and any other IT professionals who use Veeam Backup PowerShell.

Related Documentation

The complete set of Veeam Backup & Replication documentation can be found on the product resources web page at www.veeam.com/vmware-esx-backup/resources.html.

Document Revision History

Revision # Date Description of Changes

Revision 1 15/08/2013 Initial version of the document for Veeam Backup & Replication 7.0.

10 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

GETTING STARTED Veeam Backup & Replication comes with PowerShell extension — a snap-in to Microsoft Windows PowerShell 2.0. Windows PowerShell is a powerful command-line tool that allows administrators to automate some Veeam Backup & Replication activities. Veeam extends functionality of Windows PowerShell 2.0, and now administrators may use PowerShell to automate Veeam backup, replication and copy job creation and editing, VMs restores, replica failover and other operations.

Before installing Veeam PowerShell snap-in, make sure that Microsoft Windows PowerShell 2.0 is installed on the Veeam Backup & Replication console. To download Microsoft Windows PowerShell, use the following link: http://support.microsoft.com/kb/968929.

To open Veeam PowerShell, select PowerShell in the Veeam Backup & Replication main menu.

PowerShell uses cmdlets — simple single-function commands that can be run in the command-line shell. Cmdlets are specialized .NET classes that implement specific actions. Veeam PowerShell provides a set of its own cmdlets which correspond to actions you can perform via Veeam Backup & Replication UI. Please keep in mind that actions performed with PowerShell have the same force as actions performed via Veeam Backup & Replication (for example, if you delete some job with PowerShell scripts, the job will be removed from the Veeam Backup & Replication database, and you will not be able undo changes).

Note Veeam Support team does not write PowerShell scripts on demand.

Work with Veeam PowerShell cmdlets and scripts in many respects depends on your imagination, skills and expertise in Windows PowerShell 2.0. To learn more about Windows PowerShell 2.0 and its basics, use the book by Dr. Tobias Weltner: Microsoft Master-PowerShell.

Cmdlets operate with objects which they can accept and return. Every object has properties describing it, and methods that can be performed on it.

For example, the Get-VBRJob cmdlet has the following output:

11 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

You can filter and sort results at your discretion using the Where and Sort commands (to learn more about these commands, please refer to Windows PowerShell documentation).

PS C:\Administrator> Get-VBRJob | Where {$_.Name -eq "Backup Job 3"}

Job Name Type State Last Result Description

-------- ---- ----- ----------- -----------

Backup Job 3 Hyper-V Backup Stopped Success Created by Administrator

The result of filtering and sorting can be saved to a variable:

PS C:\Administrator> $job = Get-VBRJob | Where {$_.Name -eq "Backup Job 3"}

PS C:\Administrator> $job

Job Name Type State Last Result Description

-------- ---- ----- ----------- -----------

Backup Job 3 Hyper-V Backup Stopped Success Created by Administrator

You can get detailed information about the object:

PS C:\Administrator> $j | gm

TypeName: Veeam.Backup.Core.CBackupJob

Name

----

MemberType

----------

Definition

----------

CanRunByScheduler

Delete

DisableScheduler

EnableScheduler

Equals

FindInitialRepository

FindLastSession

FindSourceWanAccelerator

FindTargetRepository

FindTargetWanAccelerator

GetHashCode

GetHvOijs

GetInitialRepository

GetLastResult

Method

Method

Method

Method

Method

Method

Method

Method

Method

Method

Method

Method

Method

Method

bool ISchedulableJob..

void Delete()

void DisableScheduler(

void EnableScheduler()

bool Equals(System...

Veeam.Backup.Core...

Veeam.Backup.Core...

Veeam.Backup.Core...

Veeam.Backup.Core...

Veeam.Backup.Core...

int GetHashCode()

Veeam.Backup.Core...

Veeam.Backup.Core...

Veeam.Backup.Model...

12 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

GetLastState

GetObjectsInJob

GetOptions

GetProxy

GetScheduleOptions

GetSourceOffHostHvProxies

GetSourceViProxies

GetSourceWanAccelerator

GetTargetHost

GetTargetOffhostHvProxies

GetTargetProxies

GetTargetRepository

GetTargetViProxies

GetTargetWanAccelerator

Method

Method

Method

Method

Method

Method

Method

Method

Method

Method

Method

Method

Method

Method

Veeam.Backup.Model...

Veeam.Backup.Core...

Veeam.Backup.Model...

System.Collections...

Veeam.Backup.Model...

Veeam.Backup.Core...

Veeam.Backup.Core...

Veeam.Backup.Core...

Veeam.Backup.Core...

Veeam.Backup.Core...

System.Collections...

Veeam.Backup.Core...

Veeam.Backup.Core...

Veeam.Backup.Core...

And call a method or a property of the object, for example, view last session results.

Note Since Veeam Backup & Replication v5 and v6 use Windows PowerShell 2.0, scripts that you have created with previous versions of Veeam Backup & Replication which used Windows PowerShell 1.0 may not work.

13 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Examples of Use In this example, we will review the full VM restore process performed by means of Veeam PowerShell script. To let you get most out of this example, each command will be illustrated by the action from the Veeam Backup & Replication UI that provides the result similar to execution of the PowerShell script.

First, we get a list of all available backup jobs with the Get-VBRJob cmdlet:

PS C:\Administrator> Get-VBRBackup

Job Name Type Creation Time VM count

-------- ---- ------------- --------

Backup Job 1 VMware Backup 8/1/2013 4:47:19 AM 1

Backup Job 2 VMware Backup 8/1/2013 5:00:28 AM 1

Backup Job 7 VMware Backup 8/6/2013 3:15:13 AM 1

The similar action is performed by the Restore wizard in Veeam Backup & Replication:

Then, we get a list of available restore points, select the last restore point and save it into a variable:

PS C:\Administrator> Get-VBRBackup -Name "Backup Job 7" | Get-VBRRestorePoint

VM Name Creation Time Type Failoved

------- ------------- ---- --------

WinXPx86 7/23/2013 3:15:43 AM Full

WinXPx86 7/30/2013 3:10:15 AM Increment

WinXPx86 8/6/2013 3:45:52 AM Increment

14 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

PS C:\Administrator> $restorepoint = Get-VBRBackup -Name "Backup Job 7"

| Get-VBRRestorePoint | Select -Last 1

PS C:\Administrator> $restorepoint

VM Name Creation Time Type Failoved

------- ------------- ---- --------

WinXPx86 8/6/2013 3:45:52 AM Increment

A similar action is performed by the Restore wizard in Veeam Backup & Replication:

To restore a VM to another location, we will need:

• ESX host to which the VM should be restored

• Resource pool

• Datastore on which the VM will reside Let's get them and save into variables.

Getting the ESXi host:

PS C:\Administrator> $server = Get-VBRServer -Name "esx18.veeam.local"

PS C:\Administrator> $server

Name Type Machine Name Description

---- ---- ------------ -----------

esx18.veeam.local ESXi esx18.veeam.local

Getting the resource pool (you need to indicate the host to look for the resource pool on):

15 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

PS C:\Administrator> $pool = Get-VBRServer -Name "esx18.veeam.local" |

Find-VBRViResourcePool -Name "fileservers"

PS C:\Administrator> $pool

ConnHost : Veeam.Backup.Core.CHost

Type : ResourcePool

Reference : resgroup-14867

Id : ebaf51b0-c972-4080-95de-b590aa6cf73b_resgroup-14867

Name : fileservers

Path : fileservers

Similar actions are performed in the steps of the Restore wizard in Veeam Backup & Replication:

Selecting the host:

16 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

And then selecting the resource pool:

Now, let's perform restore of the VM:

PS C:\Administrator> Start-VBRRestoreVM -RestorePoint $restorepoint

-Server $server -ResourcePool $pool

Restore session

Restore started

Job 'WinXPx86' is working...

Restore Type VM Name State Start Time End Time

------------ ------- ----- ---------- --------

RestoreVm WinXPx86 Stopped 8/6/2013 4:58:34 AM 8/6/2013 5:01:18 AM

17 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

You can also view the restore job result in the Veeam Backup & Replication UI:

18 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

PowerShell Remoting Veeam PowerShell supports remote execution of cmdlets and scripts. That is, you can run cmdlets and scripts directly on the Veeam Backup & Replication, or against remote computers. A remote session can be started on one remote computer, or a number of remote computers at a time.

To enable PowerShell remoting:

1. Install the WinRM Service. 2. Enable PowerShell remoting. Start Windows PowerShell 2.0 as an administrator and type in

Enable-PSRemoting To learn more about PowerShell remoting and its configuration, see:

• http://blogs.msdn.com/b/powershell/archive/2008/05/10/remoting-with-powershell-quickstart.aspx

• http://www.computerperformance.co.uk/powershell/powershell_remote.htm

19 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Interactive PowerShell Help Veeam PowerShell includes an interactive console-based help for each cmdlet. To get a cmdlet description, you can use the following commands:

Get-VBRcommand displays a list of all Veeam PoweShell cmdlets that can be used.

PS C:\Administrator> Get-VBRCommand

CommandType

-----------

Name

----

ModuleName

----------

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Cmdlet

Add-VBRBackupJob

Add-VBRBackupRepository

Add-VBRCopyJob

Add-VBRCredentials

Add-VBRESX

Add-VBRESXi

Add-VBRHvBackupCopyJob

Add-VBRHvBackupJob

Add-VBRHvCluster

Add-VBRHvHost

Add-VBRHvJobObject

Add-VBRHvProxy

Add-VBRHvReplicaJob

Add-VBRHvScvmm

Add-VBRJobObject

Add-VBRLinux

Add-VBRReplicaJob

Add-VBRSmbV3Cluster

Add-VBRSmbV3Host

Add-VBRTapeFilesJob

Add-VBRTapeMediaPool

Add-VBRTapeVMJob

Add-VBRvCenter

Add-VBRvCloud

Add-VBRvCloudBackupCopyJob

Add-VBRvCloudJob

Add-VBRvCloudVC

Add-VBRViBackupCopyJob

Add-VBRViBackupJob

Add-VBRViJobObject

Add-VBRViProxy

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

VeeamPSSnapIn

20 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-Help <cmdletname> displays a full description of the specified cmdlet along with its syntax and full parameter description.

PS C:\Users\Administrator> Get-Help Get-VBRTaskSession

NAME

Get-VBRTaskSession

SYNOPSIS

Returns list of tasks performed during a specified session.

SYNTAX

Get-VBRTaskSession [-Session] <CBackupSession> [-Name <String[]>]

[-WarningAction <ActionPreference>] [-WarningVariable <String>]

[<CommonParameters>]

DESCRIPTION

This cmdlet returns a list of all tasks performed during the

specified session. You can get the tasks for backup, replication

and backup copy sessions.

Run Get-VSBTaskSession to get the tasks for SureBackup session.

RELATED LINKS

REMARKS

To see the examples, type: "get-help Get-VBRTaskSession -examples".

For more information, type: "get-help Get-VBRTaskSession -detailed".

For technical information, type: "get-help Get-VBRTaskSession -full".

21 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

VEEAM BACKUP & REPLICATION CMDLETS

Add-HP3Snapshot Short Description Creates a SAN snapshot.

Applies to Version: 7.0

Platform: VMware

HP SAN storage system: HP 3PAR StoreServ

Syntax

Add-HP3Snapshot -Volume <CSanVolume> [-Name <string>]

[-Description <string>] [<CommonParameters>]

Detailed Description This cmdlet creates a snapshot of the selected HP SAN volume.

Run Remove-HP3Snapshot to remove a SAN snapshot.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Volume <CSanVolume>

Specifies the SAN volume you want to take snapshot of. True Named

True (ByValue,

ByPropertyName)

False

[-Name <string>]

Specifies the name you want to assign to the snapshot.

False Named False False

[-Description <string>]

Specifies the description of the snapshot.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

<CommonParameters>

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

22 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command creates a snapshot of the "Vol 01" volume. The snapshot is named "vol_SS_01".

The target volume object is obtained with Get-HP3Volume and piped down.

Get-HP3Volume -Name "Vol 01" | Add-HP3Snapshot -Name "vol_SS_01"

23 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-HP3Storage Short Description Adds HP SAN storage to Veeam Backup & Replication.

Applies to Version: 7.0

Platform: VMware

HP SAN storage system: HP 3PAR StoreServ

Syntax

Add-HP3Storage -UserName <string> -Password <string> [-Name <string>] [-Description <string>] [-Url <string>] [<CommonParameters>]

-OR-

Add-HP3Storage -Credentials <CCredentials> [-Name <string>] [-Description <string>] [-Url <string>][<CommonParameters>]

Detailed Description This cmdlet adds the selected HP SAN storage to Veeam Backup & Replication.

When you add a storage to your management console, Veeam Backup & Replication automatically rescans the storage infrastructure. To rescan the SAN infrastructure manually, run Sync-HP3Storage or Sync-HP3Volume.

When adding a SAN storage, you will need to provide either username/password or credertials. This cmdlet provides syntax for both scenarios accordingly.

Run Remove-HP3Storage to remove a SAN storage.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-UserName <string>

Specifies the user name you want to use for authenticating with the SAN storage.

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

False Named False False

-Password <string>

Specifies the password you want to use for authenticating with the SAN storage.

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

False Named False False

-Credentials Specifies credentials you want to True Named False False

24 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

<CCredentials> use for authenticating with the SAN storage.

If you use the Credentials scenario, the -User and -Password parameters must be omitted.

[-Name <string>]

Specifies the SAN storage IP address or DNS name. False Named False False

[-Description <string>]

Specifies the description of the SAN storage.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

[-Url <string>]

Specifies the HP 3PAR Web Services API URL.

The HP 3PAR Web Services API delivers a programming interface for performing storage management tasks with HP 3PAR StoreServ storage systems.

False Named False False

<CommonParameters>

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

Example 1 This command adds a 3PAR storage with IP address 167.16.2.134 specified in the -Name parameter. The username is "Administrator" and the password is "Password". The URL is https://172.18.44.8:8080.

Add-HP3Storage -UserName "Administrator" -Password "Password" -Name 167.16.2.134 -Description "SAN Storage" -Url https://172.18.44.8:8080

Example 2 This command adds a 3PAR storage with IP address 167.16.2.134 specified in -Name parameter. The credentials object is obtained with Get-VBRCredentials and assigned to the $creds variable beforehand. The URL is https://172.18.44.8:8080.

Add-HP3Storage -Credentials $creds -Name 167.16.2.134 -Description "HP 3PAR Storage" -Url https://172.18.44.8:8080

25 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-HP4Snapshot Short Description Creates a SAN snapshot.

Applies to Version: 7.0

Platform: VMware

HP SAN storage systems: HP LeftHand P4000, HP StoreVirtual VSA

Syntax

Add-HP4Snapshot -Volume <CSanVolume> [-Name <string>] [-Description <string>][-ApplicationManagedShapshot] [<CommonParameters>]

Detailed Description This cmdlet creates a snapshot of the selected HP SAN volume.

Run Remove-HP4Snapshot to remove a SAN snapshot.

Alias Add-VBRHPSnapshot

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Volume <CSanVolume>

Specifies the SAN volume you want to take snapshot of. True Named

True (ByValue, ByPropertyName)

False

[-Name <string>] Specifies the name you want to assign to the snapshot. False Named False False

[-Description <string>]

Specifies the description of the snapshot.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

[-Application Managed Shapshot]

Indicates if the VM on the target volume should be quiesced to bring VM data to a consistent state.

If omitted, Veeam Backup & Replication will create a point-in-time snapshot.

False Named False False

26 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

<CommonParameters>

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

Example 1 This command creates a snapshot of the "Vol 01" volume.

• The snapshot is named "vol_SS_01". • The application-managed snapshot is enabled.

The target volume object is obtained with Get-HP4Volume and piped down.

Get-HP4Volume -Name "Vol 01" | Add-HP4Snapshot -Name "vol_SS_01" -ApplicationManagedShapshot

27 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-HP4Storage Short Description Adds HP SAN storage to Veeam Backup & Replication.

Applies to Version: 7.0

Platform: VMware

HP SAN storage systems: HP LeftHand P4000, HP StoreVirtual VSA

Syntax

Add-HP4Storage -DnsOrIpAddress <string> -UserName <string> -Password <string> [-Name <string>] [-Description <string>] [<CommonParameters>]

-OR-

Add-HP4Storage -DnsOrIpAddress <string> -Credentials <CCredentials> [-Name <string>] [-Description <string>] [<CommonParameters>]

Detailed Description This cmdlet adds the selected HP SAN storage to Veeam Backup & Replication.

When you add a storage to your management console, Veeam Backup & Replication automatically rescans the storage infrastructure. To rescan the SAN infrastructure manually, run Sync-HP4Storage or Sync-HP4Volume cmdlet.

When adding a SAN storage, you will need to provide either username/password or credertials. This cmdlet provides syntax for both scenarios accordingly.

Run Remove-HP4Storage to remove a SAN storage.

Alias Add-VBRHPStorage

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-DnsOrIpAddress <string>

Specifies the string with a full DNS name or IP address of the SAN storage.

True Named

True (ByValue,

ByPropertyName)

False

-UserName <string>

Specifies the user name you want to use for authenticating with the SAN storage.

If you use the Username/Password scenario, the -Credentials

False Named False False

28 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

parameter must be omitted.

-Password <string>

Specifies the password you want to use for authenticating with the SAN storage.

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

False Named False False

[-Name <string>] Specifies the name of the management group the storage belongs to.

False Named False False

-Credentials <CCredentials>

Specifies the credentials you want to use for authenticating with the SAN storage.

If you use the Credentials scenario, the -User and -Password parameters must be omitted.

True Named False False

[-Description <string>]

Specifies the description of the SAN storage.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

<CommonParameters>

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

Example 1 This command adds a SAN storage with IP address 167.16.2.134. The username is "Administrator" and the password is "Password".

Add-HP4Storage -DnsOrIpAddress 167.16.2.134 -UserName "Administrator" -Password "Password" -Description SAN Storage

Example 2 This command adds a SAN storage with IP address 167.16.2.134. The credentials object is obtained with Get-VBRCredentials and assigned to the $creds variable beforehand.

Add-HP4Storage -DnsOrIpAddress 167.16.2.134 -Credentials $creds -Description SAN Storage

29 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRBackupJob Short Description Creates a new backup job.

Note In Backup & Replication v6 this cmdlet was replaced by Add-VBRViBackupJob and Add-VBRHvBackupJob due to multihypervisor support introduced in the new version. The cmdlet will still work but it is advised to rewrite your scripts using new cmdlets for added benefits.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Add-VBRBackupJob [-Name]<String> [-Type] <String> [-Server] <CHost> [-Folder] <String> [-FileName <String>] -Objects <String[]>

Detailed Description This cmdlet allows you to create a new backup job.

Please note that when you create a backup job, you need to run it manually unless you enable a job schedule.

Run Start-VBRJob to start the created job.

Run Set-VBRJobSchedule to set schedule for the job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name] <String>

Specifies the string with the name of the created backup job.

True 1 False False

[-Type] <String>

Specifies the string with the type of the created backup job which defines how VM data is retrieved:

• VDDK – Virtual Disk Development Kit (VMware vStorage API)

• VCB – VMware Consolidated Backup (legacy mode)

• NET – Network backup (legacy mode).

False 2 False False

30 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

[-Server] <CHost>

Specifies the host where the created backup should be stored.

True 3 False False

[-Folder] <String>

Specifies the string with the path to the folder where the created backup should be stored.

False 4 False False

[-FileName <String>]

Specifies the string with the file name for the created backup (by default, the backup file is given the same name as the VM).

False Named False False

-Objects <String[]>

Specifies the string with the name(s) of VM(s) that you want to back up.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This example allows you to create a backup job with the following parameters:

• Name of the backup job: jobName

• Data retrieval type: VDDK

• Variable which contains the target host DNS name or IP address: $host

• Path to the backup folder: C:\VmBackups

• VMs which should be backed up: vm1, vm2

Add-VBRBackupJob –Name “jobName”–Type VDDK –Server $host –Folder "C:\VmBackups" –Objects vm1,vm2

31 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRBackupRepository Short Description Adds a new backup repository server.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Add-VBRBackupRepository [-Name <String>] [-Server <CHost>] [-MountServer <CHost>] -Folder <String> -Type <CBackupRepositoryInfo+EType> [-ImportIndex] [-ImportBackup] [-Description <String>] [-MaxConcurrentJobs <Int32>] [-DataRateLimit <Int32>] [-AlignDataBlocks] [-DecompressDataBlocks] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Add-VBRBackupRepository [-Name <String>] [-Server <CHost>] [-MountServer <CHost>] -Folder <String> -Type <CBackupRepositoryInfo+EType> [-ImportIndex] [-ImportBackup] [-Description <String>] [-UserName <String>] [-Password <String>] [-MaxConcurrentJobs <Int32>] [-DataRateLimit <Int32>] [-AlignDataBlocks] [-DecompressDataBlocks] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Add-VBRBackupRepository [-Name <String>] [-Server <CHost>] [-MountServer <CHost>] -Folder <String> -Type <CBackupRepositoryInfo+EType> [-ImportIndex] [-ImportBackup] [-Description <String>] [-Credentials <CCredentials>] [-MaxConcurrentJobs <Int32>] [-DataRateLimit <Int32>] [-AlignDataBlocks] [-DecompressDataBlocks] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet adds a new backup repository server to Veeam Backup & Replication.

When adding a backup repository, you may need to provide username/password or credertials to authenticate with the source server. This cmdlet provides three scenarios for each case including no authentification.

Run Import-VBRBackup to import the backups from a newly connected backup repository to Veeam Backup & Replication.

Run Remove-VBRBackupRepository to remove a backup repository.

32 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String>]

Specifies the the name you want to assign to the new backup repository.

False Named False False

[-Server <CHost>]

Specifies the host where the backup repository you want to add is located.

False Named False False

[-MountServer <CHost>]

Specifies the host where the NFS service should be installed.

False Named False False

-Folder <String> Specifies the full path to the folder where you want to store the backups.

True Named False False

-Type <CBackup RepositoryInfo+EType>

Specifies the type you want to assign to the repository:

• CifsShare

• LinuxLocal

• WinLocal

True Named False False

[-ImportIndex] If indicated, the guest OS file system index will be imported automatically.

False Named False False

[-ImportBackup]

If indicated, the existing backups located on the repository you are adding will be imported automatically. Otherwise, you will need to import the backups manually.

False Named False False

[-Description <String>]

Specifies the description of the backup repository.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

[-UserName <String>]

Specifies the user name you want to use for authenticating with the backup repository host.

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

False Named False False

[-Password Specifies the password you want to use for

False Named False False

33 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

<String>] authenticating with the backup repository host.

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

[-Credentials <CCredentials>]

Specifies credentials you want to use for authenticating with the backup repository host.

If you use the Credentials scenario, the -User and -Password parameters must be omitted.

False Named False False

[-MaxConcurrent Jobs <Int32>]

Specifies the maximum number of concurrent tasks for the repository. A valid range is 1-10.

False Named False False

[-DataRateLimit <Int32>]

Specifies the combined data ingestion rate for the repository. A valid range is 1-1024 MByte/s.

False Named False False

[-AlignData Blocks]

If set, the backup blocks size will be aligned by a 4Kb block boundary. Data alignment provides better deduplication on storage systems with fixed block size.

False Named False False

[-Decompress DataBlocks]

If set, backup data blocks will be decompressed before storing the backup to the repository. Decompression helps to achieve a better deduplication ratio.

False Named False False

<CommonParameters>

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

Example This command adds a new backup repository named "Backups Vol 01". The server to add is obtained with Get-VBRServer and assigned to the $server variable beforehand. The folder that is used as the backup repository is located on C:\Backup Repository. The server type is set to WinLocal. The -ImportBackup parameter is set to adopt the existing backup files. The Max concurrent tasks number is set to 6. The credentials to authentificate with the source server are obtained with Get-VBRCredentials and assigned to the $Administrator variable beforehand.

Add-VBRBackupRepository -Name "Backups Vol 01" -Server $server -Folder "c:\Backup Repository" -Type WinLocal -ImportBackup -MaxConcurrentJobs 6 -Credentials $Administrator

34 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRCopyJob Short Description Creates a new VM copy job.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Add-VBRCopyJob [-Name] <String> [-Type] <CDbBackupJobInfo+ESourceType> -Server <CHost> -Folder <String> [-FileName <String>] -Objects <String[]> [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Add-VBRCopyJob [-Name] <String> [-Type] <CDbBackupJobInfo+ESourceType> [-FileName <String>] -Objects <String[]> [-Description <String>] -Repository <CBackupRepository> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet creates a new job that copies the selected VM(s) to another location.

With a VM copy job, you can create a fully-functioning copy of a VM that will require no manual editing and adjustments. VM copying can be helpful if you want to move your datacenter, mirror your production environment to test lab storage, etc.

Please note that when you create a copy job, you need to run it manually unless you enable a job schedule.

Run Start-VBRJob to start the created job.

Run Set-VBRJobSchedule to set schedule for the job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name] <String>

Specifies the name you want to assign to the new copy job. True 1 False False

[-Type] <String>

Specifies the string with the type of the created copy job which defines how VM data is retrieved:

• VDDK – Virtual Disk Development Kit (VMware vStorage API),

• VCB – VMware

True 2 False False

35 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Consolidated Backup (legacy mode),

• NET – Network copy (legacy mode).

[-Server] <CHost>

Specifies the host where the created copy should be stored. True Named False False

[-Folder] <String>

Specifies the string with full path to the folder where the created VM copy should be stored.

True Named False False

[-FileName <String>]

Specifies the string with the file name for the created VM copy (by default, a copied file is given the same name as the VM).

False Named False False

-Objects <String[]>

Specifies the string with the name(s) of VM(s) that you want to copy.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This example allows you to create a copy job with the following parameters:

• Name of a copy job: jobName

• Data retrieval type: VDDK

• Variable which contains the target host DNS name or IP address: $host

• Path to a copy folder: C:\VmCopies

• VMs which should be copied: vm1, vm2

Add-VBRCopyJob –Name “jobName”–Type VDDK –Server $host –Folder "C:\VmCopies" –Objects vm1,vm2

36 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRCredentials Short Description Creates a credentials record.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Add-VBRCredentials -User <String> -Password <String> [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Add-VBRCredentials [-Description <String>] [-Credential <PSCredential>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet creates a new credentials record for authenticating with the instances of your virtual infrastructure.

You can add a new credentials record by indicating strings for user name and password (unprotected mode), or by supplying a PSCredential object.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-User <string>

Specifies the user name you want to use for authenticating with the instances of your virtual infrastructure.

Please note that you should use DOMAIN\USERNAME usernames format for all hosts except ESX/ESXi hosts.

True Named False False

-Password <string>

Specifies the password you want to use for authenticating with the instances of your virtual infrastructure.

True Named False False

-Description <string>

Specifies the description for the credentials record. This parameter in non-mandatory, although it is recommended to input this value to make the

False Named False False

37 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

credential records easily identified.

[-Credential <PSCredential>]

Specifies the credentials you want to add. You can get the PSCredential object by running the Get-Credential cmdlet.

False Named False False

<CommonParameters>

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

Example 1 This command creates a new credentials record for the administrator.

Add-VBRCredentials -User Administrator -Password Password_1 -Description "Administrator Credentials"

Example 2 This command adds a credentials record for the administrator. Get-Credential is used to enter the username and password in the secure mode.

Get-Credential | Add-VBRCredentials -Description "Administrator Credentials"

38 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRESX Short Description Adds an ESX host to Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Add-VBRESX [-Name] <String> [-User] <String> [-Password] <String> [-Port <Int32>] [-SSHUser <String>] [-SSHPassword <String>] [-SSHPort <Int32>] [-SSHEnable] [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Add-VBRESX [-Name] <String> [-Port <Int32>] [-SSHUser <String>] [-SSHPassword <String>] [-SSHPort <Int32>] [-SSHEnable] [-Description <String>] -Credentials <CCredentials> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet adds ESX servers to the Veeam Backup & Replication managing console.

ESX servers are virtual infrastructure servers hosting the virtual machines of your virtual environment. You need to add the ESX servers to Veeam Backup & Replication to be able to manage your virtual infrastructure via Veeam Backup & Replication console.

You may add an ESX/ESXi host, vCenter Server or Linux server (use corresponding command for each). If you are planning to use an ESX host being a part of the vCenter hierarchy, we recommend adding the corresponding vCenter Server instead of a single ESX host to ensure more flexibility and convenience at work.

When adding a new ESX server, you will need to provide either username and password or credertials. This cmdlet provides syntax for both scenarios accordingly.

Run Remove-VBRServer to remove a server from Veeam Backup & Replication.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name] <String>

Specifies the string with a full DNS name or IP address of the ESX host.

True 1 False False

[-User] <String>

Specifies the user name you want to use for authenticating with the ESX host.

If you use the

True 2 False False

39 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Username/Password scenario, the -Credentials parameter must be omitted.

[-Password] <String>

Specifies the password you want to use for authenticating with the ESX host.

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

True 3 False False

[-Port <Int32>]

Sets the integer specifying the number of the Web service port used to connect to the ESX host. By default, port 443 is used.

False Named False False

[-SSHUser <String>]

Specifies the string with the user name of the account used for service console connection to the host (recommended).

False Named False False

[-SSHPassword <String>]

Specifies the string with the password of the account used for service console connection to the host (recommended).

False Named False False

[-SSHPort <Int32>]

Sets the integer specifying the number of the service console port (recommended).

False Named False False

[-SSHEnable]

Set this parameter to TRUE if you want to use service console connection for the added ESX host (recommended).

False Named False False

[-Description <String>]

Specifies the description of the ESX server.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

-Credentials <CCredentials>

Specifies the credentials you want to use for authenticating with the ESX server.

If you use the Credentials scenario, the -User and -Password parameters must be omitted.

True Named False False

<CommonParameters>

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

40 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command adds the ESX host with 172.16.11.188 IP address. The username is "root" and the password is "qwerty".

Add-VBRESX –Name 172.16.11.188 –User root –Password qwerty

Example 2 This command adds the ESX host with 172.16.11.188 IP address. The credentials to authenticate with the host are obtained with Get-VBRCredentials and assigned to the $cAdministrator variable befohand.

Add-VBRESX –Name 172.16.11.188 -Credentials $Administrator

41 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRESXi Short Description Adds an ESXi host to Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Add-VBRESXi [-Name] <String> [-User] <String> [-Password] <String> [-Port <Int32>] [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Add-VBRESXi [-Name] <String> [-Port <Int32>] [-Description <String>] -Credentials <CCredentials> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet adds ESXi servers to the Veeam Backup & Replication managing console.

ESXi servers are virtual infrastructure servers hosting the virtual machines of your virtual environment. You need to add the ESXi servers to Veeam Backup & Replication to be able to manage your virtual infrastructure via Veeam Backup & Replication console.

You may add an ESX/ESXi host, vCenter Server or Linux server (use corresponding command for each). If you are planning to use an ESXi host being a part of the vCenter hierarchy, we recommend adding the corresponding vCenter Server instead of a single ESX host to ensure more flexibility and convenience at work.

When adding a new ESXi server, you will need to provide either username and password or credertials. This cmdlet provides syntax for both scenarios accordingly.

Run Remove-VBRServer to remove a server from Veeam Backup & Replication.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name] <String>

Specifies the string with a full DNS name or IP address of the ESX host.

True 1 False False

[-User] <String>

Specifies the user name you want to use for authenticating with the ESX host.

If you use the Username/Password scenario, the -Credentials

True 2 False False

42 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

parameter must be omitted.

[-Password] <String>

Specifies the password you want to use for authenticating with the ESX host.

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

True 3 False False

[-Port <Int32>]

Sets the integer specifying the number of the Web service port used to connect to the ESX host. By default, port 443 is used.

False Named False False

[-Description <String>]

Specifies the description of the ESX server.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

-Credentials <CCredentials>

Specifies the credentials you want to use for authenticating with the ESX server.

If you use the Credentials scenario, the -User and -Password parameters must be omitted.

True Named False False

<CommonParameters>

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

Example This command adds the ESXi host with 172.16.11.188 IP address. The username is "root" and the password is "qwerty".

Add-VBRESXi –Name 172.16.11.188 –User root –Password qwerty

Example 2 This command adds the ESXi host with 172.16.11.188 IP address. The credentials to authenticate with the host are obtained with Get-VBRCredentials and assigned to the $cAdministrator variable befohand.

Add-VBRESXi –Name 172.16.11.188 -Credentials $Administrator

43 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRHvBackupCopyJob Short Description Creates a Hyper-V backup copy job.

Applies to Version: 7.0

Platform: Hyper-V

For VMware, run Add-VBRViBackupCopyJob.

Syntax

Add-VBRHvBackupCopyJob -SourceAccelerator <CWanAccelerator> -TargetAccelerator <CWanAccelerator> [-Name <string>] [-Entity <IHvItem[]>][-Backup <CBackup[]>] [-BackupJob <CBackupJob[]>] [-Repository <CBackupRepository>] [-Description <string>][<CommonParameters>]

Detailed Description This cmdlet creates a new Hyper-V backup copy job.

The backup copy job is copying backup files from the source backup repository to the target backup repository. The backup copy job runs continuously synchronizing the backup repositories in user-defined time periods.

The cmdlet provides two scenarios that can be used for on-site and off-site modes:

• To transfer the data efficiently to to the off-site location, you can use the WAN accelerator technology. WAN accelerator is a backup infrastructure component that optimizes file transfer via WAN by means of data deduplication. The role of a WAN accelerator can be assigned to a dedicated Windows-based machine (physical or virtual). For best performance you should set a WAN accelerator on both source and target sides. This mode is recommended for off-site backups. To create and run a backup copy job using WAN accelerators you need to have source and target WAN accelerators created. Run Add-VBRWANAccelerator to create a WAN accelerator.

• You can create a backup copy job using direct operation. With this method, the job sends the data directly to the target backup repository without performing data deduplication. This mode is recommended for on-site backups, or off-site backups using fast connections.

Please note that the backup copy job is created in disabled state. Run Enable-VBRJob to start the job running on the defined schedule.

Note WAN optimization is available only in Veeam Backup & Replication Enterprise Plus Edition.

44 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-SourceAccelerator <CWanAccelerator>

Specifies the WAN accelerator on the source side.

If you select the mode using WAN accelerators, the -DirectOperation parameter should be omitted.

True Named False False

-TargetAccelerator <CWanAccelerator>

Specifies the WAN accelerator on the target side.

If you select the mode using WAN accelerators, the -DirectOperation parameter should be omitted.

True Named False False

-DirectOperation

Enables the direct operation method sending the data directly to the target backup repository without performing data deduplication.

If you select the direct operation mode, the -TargetAccelerator and -SourceAccelerator parameters should be omitted.

True Named False False

[-Name <string>]

Specifies the name you want to assign to the backup copy job.

You can input string up to 255 symbols.

False Named

True (ByValue,

ByProperty Name)

False

[-Entity <IHvItem[]>]

Specifies the VM(s) you want to copy.

You can assign multiple VMs to this object.

False Named

True (ByValue,

ByProperty Name)

False

[-Backup <CBackup[]>]

Specifies the existing backup(s) from where the VMs to copy are derived.

You can assign multiple backups to this object.

False Named

True (ByValue,

ByProperty Name)

False

[-BackupJob <CBackupJob[]>]

Specifies the existing backup job(s) from where the VMs to copy are derived.

You can assign multiple

False Named

True (ByValue,

ByProperty Name)

False

45 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

backup jobs to this object.

[-Repository <CBackup Repository>]

Specifies the backup repository to where you want to copy the VM data.

If not set, Veeam Backup & Replication will use the default backup repository.

False Named False False

[-Description <string>]

Specifies the description of the backup copy job.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

<CommonParameters>

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

Example 1 This command creates a backup copy job named "CopyJob1" with the following parameters:

• The source and target WAN accelerators are obtained with Get-VBRWANAccelerator and assigned to $wansource and $wantarget variables accordingly beforehand,

• The VMs to copy are obtained with Find-VBRHvEntity and assigned to the $vms variable beforehand,

• The repository to where the VM data will be copied is obtained with Get-VBRBackupRepository and assigned to the $repository variable beforehand.

Add-VBRHvBackupCopyJob -SourceAccelerator $wansource -TargetAccelerator $wantarget -Name CopyJob1 -Entity $vms -Repository $repository

Example 2 This command creates a direct backup copy job with the following parameters:

• The name of the job is "DC CopyJob",

• The backup job named "DC Backup" with the VMs to be copied is obtained with Get-VBRBackup and piped down,

• The -Repository parameter is not set to copy the VMs to the default backup repository.

Get-VBRBackup -Name "DC Backup" | Add-VBRHvBackupCopyJob -DirectOperation -Name "DC CopyJob"

46 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRHvBackupJob Short Description Creates a new Hyper-V backup job.

Applies to Version: 7.0 and earlier

Platform: Hyper-V

Foe VMware, run Add-VBRViBackupJob.

Syntax

Add-VBRHvBackupJob [-Name <String>] [-BackupRepository <CBackupRepository>] -Entity <IHvItem[]> [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet creates a new Hyper-V backup job.

Please note that when you create a backup job, you need to run it manually unless you enable a job schedule.

Run Start-VBRJob to start the created job.

Run Set-VBRJobSchedule to set schedule for the job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String>]

Specifies the name you want to assign to the backup job. False Named False False

[-Backup Repository <CBackup Repository>]

Specifies the backup repository where the created backup should be stored.

If not set, Veeam Backup & Replication will use the default backup repository.

False Named False False

-Entity <IHvItem[]>

Specifies the VM(s) you want to back up.

You can assign multiple VMs to this object.

True Named

True (ByValue,

ByProperty Name)

False

[-Description <String>]

Specifies the description of the backup job.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

47 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

<CommonParameters>

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

Example This command creates a backup job named "Exchange Backup". The VMs to backup are obtained with Find-VBRHvEntity and piped down. The backup repository is obtained with Get-VBRBackupRepository and assigned to the $Repository variable beforehand. the description is "Hyper-V Exchange Backup".

Find-VBRHvEntity -Name Exchange* | Add-VBRHvBackupJob -Name "Exchange Backup" -BackupRepository $Repository -Description "Hyper-V Exchange Backup"

48 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRHvCluster Short Description Adds a Hyper-V cluster to Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: Hyper-V

Syntax

Add-VBRHvCluster -Name <String> -User <String> -Password <String> [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Add-VBRHvCluster -Name <String> [-Description <String>] -Credentials <CCredentials> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet adds Hyper-V clusters to the Veeam Backup & Replication managing console.

Hyper-V cluster is a group of Hyper-V virtual machines sharing resources. If you include your virtual machines in clusters, you need to add the clusters to Veeam Backup & Replication to be able to manage your virtual infrastructure via Veeam Backup & Replication console.

When adding a new Hyper-V cluster, you will need to provide either username and password or credertials. This cmdlet provides syntax for both scenarios accordingly.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Name <String> Specifies the string with the DNS name of the added Hyper-V cluster.

True Named False False

-User <String>

Specifies the user name you want to use for authenticating with the Hyper-V cluster.

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

True Named False False

-Password <String>

Specifies the password you want to use for authenticating with the Hyper-V cluster.

If you use the Username/Password

True Named False False

49 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

scenario, the -Credentials parameter must be omitted.

[-Description <String>]

Specifies the description of the Hyper-V cluster.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

-Credentials <CCredentials>

Specifies the credentials you want to use for authenticating with the Hyper-V cluster.

If you use the Credentials scenario, the -User and -Password parameters must be omitted.

True Named False False

<CommonParameters>

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

50 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRHvHost Short Description Adds a Hyper-V host to Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: Hyper-V

Syntax

Add-VBRHvHost -Name <String> -User <String> -Password <String> [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Add-VBRHvHost -Name <String> [-Description <String>] -Credentials <CCredentials> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet adds Hyper-V host to the Veeam Backup & Replication managing console.

You need to add the hosts to Veeam Backup & Replication to be able to manage your virtual infrastructure via Veeam Backup & Replication console. If a Hyper-V host is part of a cluster, add the Hyper-V cluster instead of standalone Hyper-V host.

When adding a new Hyper-V host, you will need to provide either username and password or credertials. This cmdlet provides syntax for both scenarios accordingly.

Run Remove-VBRServer to remove the Hyper-V host.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Name <String> Specifies the string with the DNS name of the added Hyper-V cluster.

True Named False False

-User <String>

Specifies the user name you want to use for authenticating with the Hyper-V cluster.

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

True Named False False

-Password <String>

Specifies the password you want to use for authenticating with the Hyper-V cluster.

True Named False False

51 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

[-Description <String>]

Specifies the description of the Hyper-V cluster.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

-Credentials <CCredentials>

Specifies the credentials you want to use for authenticating with the Hyper-V cluster.

If you use the Credentials scenario, the -User and -Password parameters must be omitted.

True Named False False

<CommonParameters>

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

52 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRHvJobObject Short Description Adds a VM to a Hyper-V job.

Applies to Version: 7.0

Platform: Hyper-V

For VMware, run Add-VBRViJobObject.

Syntax

Add-VBRHvJobObject -Job <CBackupJob> -Entities <IHvItem[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet allows to add VM(s) to an existing job.

You can run this cmdlet with any kind of jobs.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job(s) you want to add the VM(s) to.

You can assign multiple backup jobs to this object.

True Named False False

-Entities <IHvItem[]>

Specifies the VM(s) you want to add to the job.

You can assign multiple VMs to this object.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

53 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command adds a VM named "VM01" to the job represented by $job variable. First the job object is got and assigned to $"Backup Hv Job" variable. The VM object is piped to the cmdlet.

Find-VBRHvEntity -Name VM01 | Add-VBRHvJobObject -Job $"Backup Hv Job"

Example 2 This command adds a VM represented by $Vm variable to the job represented to $"Backup Hv Job" variable. The variables are assigned beforehand.

Add-VBRHvJobObject -Job $"Backup Hv Job" -Entities $Vm

54 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRHvProxy Short Description Adds a Hyper-V backup proxy to Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: Hyper-V

For VMware, run Add-VBRViProxy.

Syntax

Add-VBRHvProxy -Server <CHost> [-Description <String>] [-MaxTasks <Int32>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet adds a Hyper-V backup proxy server to Veeam Backup & Replication managing console.

In the backup infrastructure, the backup proxy actually performs main data handling – retrieving data, processing it and transferring to the target destination. Use of backup proxies enables you to take the job processing off the backup server and allows for better scalability of your backup infrastructure.

Run Disable-VBRHvProxy to disable a Hyper-V proxy.

Run Enable-VBRHvProxy to enable a disabled Hyper-V proxy.

Run Remove-VBRHvProxy to remove a Hyper-V proxy from Veeam Backup & Replication managing console.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Server <CHost>

Specifies the server which will act as a Hyper-V backup proxy.

True Named

True (ByValue,

By Property

Name)

False

[-Description <String>]

Specifies the description of the Hyper-V proxy.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

[-MaxTasks <Int32>]

Sets the integer specifying the number of concurrent tasks that can be assigned to the proxy simultaneously.

False Named False False

55 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

<CommonParameters>

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

56 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRHvReplicaJob Short Description Creates a new Hyper-V replication job.

Applies to Version: 7.0 and earlier

Platform: Hyper-V

For VMware, run Add-VBRViReplicaJob.

Syntax

Add-VBRHvReplicaJob [-Name <String>] -Server <CHost> -Entity <IHvItem[]> [-Suffix <String>] [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Add-VBRHvReplicaJob [-Name <String>] -Path <CHvDbVolumeItem> -Entity <IHvItem[]> [-Suffix <String>] [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet creates a new Hyper-V replication job.

Replication is a process of copying a VM from its primary location (source host) to a destination location (redundant target host). Veeam Backup & Replication creates an exact copy of a VM (replica), registers it on the target host and maintains it in sync with the original VM.

Please note that when you create a replica job, you need to run it manually unless you enable a job schedule.

Run Start-VBRJob to start the created job.

Run Set-VBRJobSchedule to set schedule for the job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String>]

Specifies the name you want to assign to the replication job. False Named False False

-Server <CHost>

Specifies the server where the created replica should be stored.

True Named False False

-Path <CHvDb VolumeItem>

Specifies the Hyper-V volume where the created replica should be stored.

True Named False False

-Entity <IHvItem[]>

Specifies the VM(s) that you want to replicate. True Named

True (ByValue,

By

False

57 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

You can assign multiple VMs to this object.

Property Name)

[-Suffix <String>]

Specifies the suffix that will be appended to the name of the VM you are replicating. This name will be used to register the replicated VM on the target server.

False Named False False

[-Description <String>]

Specifies the description of the replication job.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

<CommonParameters>

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

Example This command creates the backup job named "kvm01 Backup". The VM to backup is obtained with Find-VBRHvEntity and piped down. The host to locate the replicated VM on is obtained with Get-VBRServer and assigned to the $server variable beforehand. The replicated VM must have the "_replica" suffix.

Find-VBRHvEntity -Name kvm01 | Add-VBRHvReplicaJob -Name "kvm01 Backup" -Server $server -Suffix "_replica"

58 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRHvScvmm Short Description Adds a SCVMM server to Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: Hyper-V

Syntax

Add-VBRHvScvmm -Name <String> -User <String> -Password <String> [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Add-VBRHvScvmm -Name <String> [-Description <String>] -Credentials <CCredentials> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet adds SCVMM (Microsoft System Center Virtual Machine Manager) server to the Veeam Backup & Replication managing console.

When adding a new SCVMM server, you will need to provide either username and password or credertials. This cmdlet provides syntax for both scenarios accordingly.

Run Remove-VBRServer to remove the SCVMM server.

Parameters

Parameter Description Require

d Positi

on

Accept Pipeline

Input

Accept Wildcard

Characters

-Name <String> Specifies the string with the DNS name of the added SCVMM server.

True Named False False

-User <String>

Specifies the user name you want to use for authenticating with the SCVMM server.

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

True Named False False

-Password <String>

Specifies the password you want to use for authenticating with the SCVMM server.

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

True Named False False

59 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

-Credentials <CCredentials>

Specifies the credentials you want to use for authenticating with the SCVMM server.

If you use the Credentials scenario, the -User and -Password parameters must be omitted.

True Named False False

-Description <String>]

Specifies the description of the SCVMM server.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

<CommonParameters>

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

Example 1 This command adds the SCVMM server using a username and a password.

Add-VBRHvScvmm -User "Administrator" -Password "Password" -Description "SCVMM Server"

Example 2 This command adds the SCVMM server using credentials. The credentials record is obtained with Get-VBRCredentials and assigned to the $"SCVMM Administrator" variable beforehand.

Add-VBRHvScvmm -Description "SCVMM Server" -Credentials $"SCVMM Administrator"

60 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRJobObject Short Description Adds VMs to existing job.

Note In Backup & Replication v6 this cmdlet was replaced by Add-VBRViJobObject and Add-VBRHvJobObject due to multihypervisor support introduced in the new version. The cmdlet will still work but it is advised to rewrite your scripts using new cmdlets for added benefits.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Add-VBRJobObject [-Job] <CBackupJob> [-Server] <CHost> [-Objects] <String[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Add-VBRJobObject [-Job] <CBackupJob> [-Server] <CHost> [-Entities] <CEntity[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet allows you to add VMs or VM containers to existing backup, replication or copy job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CBackupJob>

Specifies the job you want to add VMs to. True 1 False False

[-Server] <CHost>

Specifies the host where the VMs or VM containers you want to add reside.

True 2 False False

[-Objects] <String[]>

Specifies the string with the name(s) of VM(s) you want to add to the job.

You can assign multiple VMs to this object.

True 3

True (ByValue,

ByPropertyName)

False

[-Entities] <CEntity[]>

Specifies the VM(s) or VM container(s) you want to add to the job.

You can assign multiple VMs to this object.

True 3

True (ByValue,

ByPropertyName)

False

61 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

<CommonParameters>

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

Example This example allows you to add a VM to an existing backup job:

• Variable which contains the name of the backup job: $job

• Variable which contains DNS name of the host where the VM resides: $host

• Name of added VM: vm3

Add-VBRJobObject –Job $job–Server $host –Objects vm3

62 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRLinux Short Description Adds a Linux server to Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Add-VBRLinux [-Name] <String> [-SSHUser] <String> [-SSHPassword] <String> [-SSHPort <Int32>]

Detailed Description This cmdlet allows you to add a Linux server to Veeam Backup & Replication.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Name] <String>

Specifies the string with a full DNS name or IP address of the Linux server

True 1 False False

[-SSHUser] <String>

Specifies the string with the user name of the administrator account used to connect to the Linux server console

True 2 False False

[-SSHPassword] <String>

Specifies the string with the password of the administrator account used to connect to the Linux server console

True 3 False False

[-SSHPort <Int32>]

Provide an integer specifying the Web service port number used to connect to the Linux server console. By default, port 443 is used.

False Named False False

63 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRReplicaJob Short Description Creates new replication job.

Note In Veeam Backup & Replication v6 this cmdlet was replaced by Add-VBRViReplicaJob and Add-VBRHvReplicaJob due to multihypervisor support introduced in the new version. The cmdlet will still work but it is advised to rewrite your scripts using new cmdlets for added benefits.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Add-VBRReplicaJob [-Name] <String> [[-Type] <String>] [-Server] <CHost> [-Datastore] <Datastore> -Objects <String[]> [-Suffix <String>] [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet allows you to create a new replication job.

Replication is a process of copying a VM from its primary location (source host) to a destination location (redundant target host). Veeam Backup & Replication creates an exact copy of a VM (replica), registers it on the target host and maintains it in synch with the original VM.

Please note that when you create a replica job, you need to run it manually unless you enable a job schedule.

Run Start-VBRJob to start the created job.

Run Set-VBRJobSchedule to set schedule for the job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name] <String>

Specifies the string with the name you want to assign to the replication job.

True 1 False False

[[-Type] <String>]

Specifies the string with the type of the created replication job which defines how VM data is retrieved:

• VDDK – Virtual Disk Development Kit (VMware vStorage API)

• VCB – VMware Consolidated Backup

False 2 False False

64 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

(legacy mode) • NET – Network

replication (legacy mode)

[-Server] <CHost>

Specifies the host where the created replica should be stored. True 3 False False

[-Datastore] <Datastore>

Specifies the datastore where the created replica should reside. True 4 False False

-Objects <String[]>

Specifies the string with the name(s) of VM(s) that you want to replicate.

You can assign multiple VMs to this object.

True Named

True (ByValue,

ByPropertyName)

False

[-Suffix <String>]

Specifies the suffix that will be appended to the name of the VM you are replicating. This name will be used to register the replicated VM on the target server.

False Named False False

[-Description <String>]

Specifies the description of the replica job.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

Example This example allows you to create a replication job with the following parameters:

• Name of a replication job: Replica1

• Replication type: VDDK

• Variable which contains target host DNS name or IP address: $host

• Variable which contains datastore name: $datastore

• Replicated VM: vm4

Add-VBRReplicaJob –Name “Replica1”–Type VDDK –Server $host–Datastore $datastore –Objects vm4

65 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRTapeFilesJob Short Description Creates a new files to tape copy job.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Add-VBRTapeFilesJob [-Name <String>] -Server <CHost> -Path <String[]> -MediaPool <MediaPool> [-MediaPoolIncremental <MediaPool>] [-Description <String>] [-Credentials <CCredentials>] [-Masks <String>] [-IgnoreCase] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet creates a new files to tape copy job.

Please note that when you create a copy job, you need to run it manually unless you enable a job schedule.

Run Start-VBRJob to start the created job.

Run Set-VBRJobSchedule to set schedule for the job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Server <CHost> Specifies the source server object where the files you need are located.

True Named False False

-Path <string[]>

Specifies the path to the folder(s) you need to copy. Use -Masks and -IgnoreCase parameters to select particular files.

You can specify multiple names separated by commas.

True Named

True (ByValue,

ByPropertyName)

False

-MediaPool <MediaPool>

Specifies the target media pool object that will be used for full backups.

True Named False False

[-Name <string>]

Specifies the name you want to assign to the new files to tape copy job.

You can input string up to 255 symbols.

False Named False False

66 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

[-MediaPool Incremental <MediaPool>]

Specifies the target media pool object that will be used for incremental backups.

False Named False False

[Description <string>]

Specifies the description for the new files to tape copy job. False Named False False

[-Credentials <CCredentials>]

Specifies the credentials you want to use for authenticating with the source server.

False Named False False

[-Masks <String>]

Used to specify search conditions for -Path paramater.

Specifies masks to select files in folders.

False Named False False

[-IgnoreCase]

Used to specify search conditions for -Path paramater.

If set, the search by name will be non case sensitive.

False Named False False

<CommonParameters>

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

Example This command creates a new files to tape copy job with the following parameters:

• The job name is "Files to tape backup job 1",

• The $host variable contains the source server object,

• The source file path is C:\backup\Backup Job 1\VM01 Backup Job 1.vbm

• The $mediapool variable contains the target media pool to record the file to.

Add-VBRTapeFilesJob -Name "Files to tape backup job 1" -Server $server -Path "C:\backup\Backup Job 01\VM01 Backup Job 01.vbm" -MediaPool $mediapool

67 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRTapeMediaPool Short Description Creates a new media pool.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Add-VBRTapeMediaPool [-Name <String>] [-Medium <TapeMedium[]>] [-Library <TapeLibrary>] [-MoveFromFree] [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet creates a new media pool in a tape library.

The media pool is a number of tapes logically unified in block by their property.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <string>]

Specifies the name you want to assign to the media pool. If not set, the media pool name will be set by default.

False Named False False

[-Medium <TapeMedium[]>]

Specifies the tape(s) you want to include to the media pool.

You can assign multiple tapes to this object.

False Named

True (ByValue,

ByPropertyName)

False

[-Library <TapeLibrary>]

Specifies the tape library where you want to create media pool.

False Named

True (ByValue,

ByPropertyName)

False

[-MoveFromFree] If set, the media pool will be refilled with tapes from Free pool automatically.

False Named False False

[-Description <string>]

Specifies the description for the created media pool. False Named False False

<CommonParameters>

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

68 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example This command creates a media pool named FullBackups. The description of the new media pool is "Full backups media pool". First the tape and library objects are got and assigned to $tape and $lib variables accordingly.

Add-VBRTapeMediaPool -Name FullBackups -Medium $tape -Library $lib -Description "Full backups media pool"

69 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRTapeVMJob Short Description Creates a new backup to tape copy job.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Add-VBRTapeVMJob [-Name <String>] [-Repository <CBackupRepository[]>] [-BackupJob <CBackupJob[]>] -MediaPool <MediaPool> [-MediaPoolIncremental <MediaPool>] [-DisableIncremental] [-HardwareCompression] [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet creates a new job that copies a backup to tape.

To be able to create a backup to tape copy job, you need to have existing backups available.

Please note that when you create a copy job, you need to run it manually unless you enable a job schedule.

Run Start-VBRJob to start the created job.

Run Set-VBRJobSchedule to set schedule for the job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-MediaPool <MediaPool>

Specifies the target media pool that will be used for full backups.

You can input string up to 255 symbols.

True Named False False

[-Name <string>] Specifies the name you want to assign to the VM to tape copy job.

False Named False False

[-Repository <CBackup Repository[]>]

Specifies the source backup repository(ies) where the backups to copy are located.

You can assign multiple backup repositories to this object.

False Named

True (ByValue,

ByPropertyName)

False

[-BackupJob <CBackupJob[]>]

Specifies the backup job where the backups to copy can be derived from.

You can assign multiple

False Named

True (ByValue,

ByPropertyName)

False

70 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

backup jobs to this object.

[-MediaPool Incremental <MediaPool>]

Specifies the target media pool that will be used for incremental backups.

False Named False False

[-Disable Incremental]

If set, incremental backups will be recorded to the media pool specified in -MediaPoolIncremental parameter. Otherwise incremental backups will not be recorded (default).

False Named False False

[-Hardware Compression]

Enables hardware compression option.

Please note that if you plan to use hardware compression when recording backups to tape, consider that although it decreases traffic, this option affects performance.

False Named False False

[-Description <string>]

Specifies the description of the new VM to tape copy job. False Named False False

<CommonParameters>

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

Example This command creates a job copying a VM02 backup to tape.

• The $repository variable contains the backup repository where the backup files are located,

• The $mpool variable contains the media pool to record the backup,

• The job description is "VM02 to tape".

Add-VBRTapeVMJob -Name "VM02 Tape Copy Job 1" -Repository $repository -MediaPool $mpool -Description "VM02 to Tape"

71 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRvCenter Short Description Adds a vCenter Server to Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Add-VBRvCenter [-Name] <String> [-User] <String> [-Password] <String> [-Port <Int32>]

Detailed Description This cmdlet allows you to add a vCenter Server to Veeam Backup & Replication.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name] <String>

Specifies the string with a full DNS name or IP address of the vCenter Server.

True 1 False False

[-User] <String>

Specifies the string with the user name of the administrator account used to connect to the vCenter Server (in the DOMAIN\USERNAME format).

True 2 False False

[-Password] <String>

Specifies the string with the password of the administrator account used to connect to the vCenter Server.

True 3 False False

[-Port <Int32>]

Sets the integer specifying the number of Web service port used to connect to the vCenter Server. By default, port 443 is used.

False Named False False

Example This example allows you to add a vCenter Server with the following connection parameters:

• vCenter ServerDNS name: vcdev25.domain.local

• User name: domain\administrator

• Password: qwerty

Add-VBRVCenter –Name “vcdev25.domain.local”–User domain\administrator –Password qwerty

72 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRvCloud Short Description Adds a vCloud Director server to Veeam Backup & Replication.

Applies to Version: 7.0

Platform: VMware

Syntax

Add-VBRvCloud [-Name] <string> [-User] <string> [-Password] <string> [-Url <string>] [-Description <string>][<CommonParameters>]

-OR-

Add-VBRvCloud [-Name] <string> -Credentials <CCredentials> [-Url <string>] [-Description <string>][<CommonParameters>]

Detailed Description This cmdlet adds a new vCloud Director server to Veeam Backup & Replication.

When adding a new vCloud Director server you will need to provide either username/password or credertials. This cmdlet provides syntax for both scenarios accordingly.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name] <string>

Specifies the full DNS name or IP address of the vCloud Director server or any cell in the vCloud Director infrastructure.

True 0 False False

[-User] <string>

Specifies the user name you want to use for authenticating with the vCloud Director server.

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

True 1 False False

[-Password] <string>

Specifies the password you want to use for authenticating with the vCloud Director server.

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

True 2 False False

73 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

-Credentials <CCredentials>

Specifies the credentials you want to use for authenticating with the vCloud Director server.

If you use the Credentials scenario, the -User and -Password parameters must be omitted.

True Named False False

[-Url <string>] Specifies the URL you want to connect to the vCloud Director Web API with.

False Named False False

[-Description <string>]

Specifies the description of the new vCloud Director server. If not set, the user name who created the server and the date and time of creation will be added by default.

False Named False False

<CommonParameters>

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

Example 1 This command creates a new server named "vCloud Director Server" having the https://vclouddirectorserver:443 URL address. The username is "Administrator" and the password is "password".

Add-VBRvCloud -Name "vCloud Director Server" -User Administrator -Password password -Url https://vclouddirectorserver:443 -Description "vCloud Director Server"

Example 2 This command creates a new server named "vCloud Director Server" having the https://vclouddirectorserver:443 URL address. The credentials are obtained with Get-VBRCredentials and assigned to the $Administrator variable beforehand. The -Description parameter is not set to get the default description created.

Add-VBRvCloud -Name "vCloud Director Server" -Credentials $Administrator -Url https://vclouddirectorserver:443

74 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRvCloudBackupCopyJob Short Description Creates a vCloud backup copy job.

Applies to Version: 7.0

Platform: VMware

Syntax

Add-VBRvCloudBackupCopyJob [-Name <String>] [-Entity <IItem[]>] [-Backup <CBackup[]>] [-BackupJob <CBackupJob[]>] [-Repository <CBackupRepository>] -SourceAccelerator <CWanAccelerator> -TargetAccelerator <CWanAccelerator> [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Add-VBRvCloudBackupCopyJob [-Name <String>] [-Entity <IItem[]>] [-Backup <CBackup[]>] [-BackupJob <CBackupJob[]>] [-Repository <CBackupRepository>] -DirectOperation [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet creates a new vCloud backup copy job.

The backup copy job is copying backup files from the source backup repository to the target backup repository. The backup copy job runs continuously synchronizing the backup repositories in user-defined time periods.

The cmdlet provides two scenarios that can be used for on-site and off-site modes:

• To transfer the data efficiently to to the off-site location, you can use the WAN accelerator technology. WAN accelerator is a backup infrastructure component that optimizes file transfer via WAN by means of data deduplication. The role of a WAN accelerator can be assigned to a dedicated Windows-based machine (physical or virtual). For best performance you should set a WAN accelerator on both source and target sides. This mode is recommended for off-site backups. To create and run a backup copy job using WAN accelerators you need to have source and target WAN accelerators created. Run Add-VBRWANAccelerator to create a WAN accelerator.

• You can create a backup copy job using direct operation. With this method, the job sends the data directly to the target backup repository without performing data deduplication. This mode is recommended for on-site backups, or off-site backups using fast connections.

Please note that the backup copy job is created in disabled state. Run Enable-VBRJob to start the job running on the defined schedule.

Note WAN optimization is available only in Veeam Backup & Replication Enterprise Plus Edition.

75 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String>]

Specifies the name you want to assign to the backup copy job.

You can input string up to 255 symbols.

False Named False False

[-Entity <IItem[]>]

Specifies the VM(s) you want to copy.

You can assign multiple VMs to this object.

False Named

True (ByValue,

ByPropertyName)

False

[-Backup <CBackup[]>]

Specifies the existing backup from where the VMs to copy are derived.

You can assign multiple backups to this object.

False Named

True (ByValue,

ByPropertyName)

False

[-BackupJob <CBackupJob[]>]

Specifies the existing backup job from where the VMs to copy are derived.

You can assign multiple backup jobs to this object.

False Named

True (ByValue,

ByPropertyName)

False

[-Repository <CBackup Repository>]

Specifies the backup repository to where you want to copy the VM data.

If not set, Veeam Backup & Replication will use the default backup repository.

False Named False False

-SourceAccelerator <CWanAccelerator>

Specifies the WAN accelerator on the source side.

If you select the mode using WAN accelerators, the -DirectOperation parameter should be omitted.

True Named False False

-TargetAccelerator <CWanAccelerator>

Specifies the WAN accelerator on the target side.

If you select the mode using WAN accelerators, the -DirectOperation parameter should be omitted.

True Named False False

[-Description <String>]

Specifies the description of the backup copy job.

If not set, Veeam Backup & Replication will enter date and time of creation by

False Named False False

76 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

default.

-DirectOperation

Enables the direst operation method sending the data directly to the target backup repository without performing data deduplication.

If you select the direct operation mode, the -TargetAccelerator and -SourceAccelerator parameters should be omitted.

False Named False False

<CommonParameters>

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

Example 1 This command creates a backup copy job named "vCloud CopyJob1" with the following parameters:

• The source and target WAN accelerators are obtained with Get-VBRWANAccelerator and assigned to $wansource and $wantarget variables accordingly beforehand,

• The VMs to copy are obtained with Find-VBRvCloudEntity and assigned to the $vms variable beforehand,

• The repository to where the VM data will be copied is obtained with Get-VBRBackupRepository and assigned to the $repository variable beforehand.

Add-VBRvCloudBackupCopyJob -SourceAccelerator $wansource -TargetAccelerator $wantarget -Name CopyJob1 -Entity $vms -Repository $repository

Example 2 This command creates a direct backup copy job with the following parameters:

• The name of the job is "DC CopyJob",

• The backup job named "DC Backup" with the VMs to be copied is obtained with Get-VBRBackup and piped down,

• The -Repository parameter is not set to copy the VMs to the default backup repository.

Get-VBRBackup -Name "DC Backup" | Add-VBRvCloudBackupCopyJob -DirectOperation -Name "DC CopyJob"

77 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRvCloudJob Short Description Creates a vCloud Director backup job.

Applies to Version: 7.0

Platform: VMware

Syntax

Add-VBRvCloudJob -Entity <IItem[]> [-Name <string>] [-BackupRepository <CBackupRepository>] [-Description <string>] [<CommonParameters>]

Detailed Description This cmdlet creates a new vCloud Director backup job.

You should always use vCD backup jobs to back up VMs managed by vCloud Director. If you back up VMs managed by vCloud Director using a regular backup job, Veeam Backup & Replication will perform backup at the level of the underlying vCenter Server and will not capture vApp metadata. As a result, you will not let you restore a fully functioning VM to vCloud Director.

Please note that when you create a backup job, you need to run it manually unless you enable a job schedule.

Run Start-VBRJob to start the created job.

Run Set-VBRJobSchedule to set schedule for the job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Entity <IItem[]>

Specifies the VM(s) you want to backup.

You can assign multiple VMs to this object.

True Named True False

[-Name <string>] Specifies the name you want to assign to the backup job.

False Named False False

[-Backup Repository <CBackup Repository>]

Specifies the backup repository object where the backup files will be stored. If not set, the files will be stored in Veeam Backup & Replication default backup repository.

False Named False False

[-Description <string>]

Specifies the description of the new backup job. False Named False False

78 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

<CommonParameters>

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

Example 1 This command creates a new vCloud Director backup job with the following parameters:

• Job name: "vCD Backup Job 1".

• $vm: the VM to backup.

• $brepository: the backup repository to store the backup files.

• Description: "vCloud Director Backup Job".

Add-VBRvCloudJob -Entity $vm -Name "vCD Backup Job" -BackupRepository $brepository -Description "vCloud Director Backup Job"

Example 2 This command creates a new vCloud Director backup job with the following parameters:

• Job name: "vCD Backup Job 2".

• Description: "vCloud Director Backup Job".

• The VM named "vCloud Server" is piped to the cmdlet.

• The -BackupRepository parameter is not set to enable use of the default backup repository.

Find-VBRvCloudEntity -Name "vCloud Server" | Add-VBRvCloudJob -Name "vCD Backup Job 2" -Description "vCloud Director Backup Job"

79 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRvCloudVC Short Description Adds vCenter server to Veeam Backup & Replication.

Applies to Version: 7.0

Platform: VMware

Syntax

Add-VBRvCloudVC [-vCloudServer] <CHost> [-VCInfo] <CVcdVcInfo> [-User] <string> [-Password] <string> [-Name <string>] [-Port <int>] [-Description <string>] [<CommonParameters>]

-OR-

Add-VBRvCloudVC [-vCloudServer] <CHost> [-VCInfo] <CVcdVcInfo> -Credentials <CCredentials> [-Name <string>] [-Port <int>] [-Description <string>] [<CommonParameters>]

Detailed Description This cmdlet adds a new vCenter server to Veeam Backup & Replication console. The vCenter server is registered as a part of vCloud Director .

When adding a new vCenter server, you will need to provide either username and password or credentials. This cmdlet provides syntax for both scenarios accordingly.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-vCloudServer] <CHost>

Specifies the vCloud server you want to connect a vCenter to.

True 0

True (ByValue,

ByPropertyName)

False

[-VCInfo] <CVcdVcInfo>

Specifies the vCenter server you want to connect to the vCloud.

True 1 False False

[-User] <string>

Specifies the user name you want to use for authenticating with the vCenter server.

If you use the Username/Password scenario, the -Credentials parameter must be omitted.

True 2 False False

[-Password] <string>

Specifies the password you want to use for authenticating with the vCenter server.

If you use the

True 3 False False

80 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Username/Password scenario, the -Credentials parameter must be omitted.

-Credentials <CCredentials>

Specifies the credentials you want to use for authenticating with the vCenter server.

If you use the Credentials scenario, the -User and -Password parameters must be omitted.

True Named False False

[-Name <string>] Specifies the DNS name or IP address of the vCenter server you want to connect.

False Named False False

[-Port <int>]

Specifies the web-service port number. If not set, the default port number 443 will be used.

IMPORTANT: When you customize the port number, you should make sure that you set this port on the vCenter Server/ESX(i) host settings first.

False Named False False

[-Description <string>]

Specifies the description of the vCenter server. If not set, the default description containing the username of the user who created the record and date and time of creation will be used.

False Named False False

<CommonParameters>

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

81 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command adds a new vCenter server with the following parameters:

• The vCenter will be registered on the server with 172.16.1.13 IP address. The server object is piped to the cmdlet.

• The $vc variable contains the new vCenter server object.

• Username is "Administrator" and password is "Password".

• The new vCenter name is "vCenter Server 1".

• -Port parameter is not set to enable the default 443 web-service port number.

• -Description parameter is not set to enable the default description.

Get-VBRServer -Name 172.16.1.13 | Add-VBRvCloudVC -VCInfo $vc -User Administrator -Password Password -Name "vCenter Server 1"

Example 2 This command adds a new vCenter server with the following parameters:

• The server where the new vCenter will be registered is represented by $s variable.

• The $vc variable contains the new vCenter server object.

• The $creds variable contains the Administrator credentials record.

• The new vCenter name is "vCenter Server 2".

• The -Port parameter is set to 456 to set the connection through web-service port number 456 instead of default 443 port.

• The -Description parameter is not set to enable the default description.

Add-VBRvCloudVC -vCloudServer $s -VCInfo $vc -Credentials $creds -Name "vCenter Server 2" -Port 456

82 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRViBackupCopyJob Short Description Creates a VMware backup copy job.

Applies to Version: 7.0

Platform: VMware

For Hyper-V. run Add-VBRHvBackupCopyJob.

Syntax

Add-VBRViBackupCopyJob -SourceAccelerator <CWanAccelerator> -TargetAccelerator <CWanAccelerator> [-Name <string>] [-Entity <IViItem[]>] [-Backup <CBackup[]>] [-BackupJob <CBackupJob[]>] [-Repository <CBackupRepository>] [-Description <string>][<CommonParameters>]

-OR-

Add-VBRViBackupCopyJob -DirectOperation [-Name <string>] [-Entity <IViItem[]>] [-Backup <CBackup[]>] [-BackupJob <CBackupJob[]>] [-Repository <CBackupRepository>] [-Description <string>] [<CommonParameters>]

Detailed Description This cmdlet creates a new VMware backup copy job.

The backup copy job is copying backup files from the source backup repository to the target backup repository. The backup copy job runs continuously synchronizing the backup repositories in user-defined time periods.

The cmdlet provides two scenarios that can be used for on-site and off-site modes:

• To transfer the data efficiently to to the off-site location, you can use the WAN accelerator technology. WAN accelerator is a backup infrastructure component that optimizes file transfer via WAN by means of data deduplication. The role of a WAN accelerator can be assigned to a dedicated Windows-based machine (physical or virtual). For best performance you should set a WAN accelerator on both source and target sides. This mode is recommended for off-site backups. To create and run a backup copy job using WAN accelerators you need to have source and target WAN accelerators created. Run Add-VBRWANAccelerator to create a WAN accelerator.

• You can create a backup copy job using direct operation. With this method, the job sends the data directly to the target backup repository without performing data deduplication. This mode is recommended for on-site backups, or off-site backups using fast connections.

Please note that the backup copy job is created in disabled state. Run Enable-VBRJob to start the job running on the defined schedule.

Note WAN optimization is available only in Veeam Backup & Replication Enterprise Plus Edition.

83 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-SourceAccelerator <CWanAccelerator>

Specifies the WAN accelerator on the source side.

If you select the mode using WAN accelerators, the -DirectOperation parameter should be omitted.

True Named False False

-TargetAccelerator <CWanAccelerator>

Specifies the WAN accelerator on the target side.

If you select the mode using WAN accelerators, the -DirectOperation parameter should be omitted.

True Named False False

-DirectOperation

Enables direst operation method sending the data directly to the target backup repository without performing data deduplication.

If you select the direct operation mode, the -TargetAccelerator and -SourceAccelerator parameters should be omitted.

True Named False False

[-Name <string>]

Specifies the name you want to assign to the backup copy job.

You can input string up to 255 symbols.

False Named

True (ByValue,

ByPropertyName)

False

[-Entity <IViItem[]>]

Specifies the VM you want to copy.

You can assign multiple VMs to this object.

False Named

True (ByValue,

ByPropertyName)

False

[-Backup <CBackup[]>]

Specifies the existing backup(s) to set the VMs you want to copy.

You can assign multiple backups to this object.

False Named

True (ByValue,

ByPropertyName)

False

[-BackupJob <CBackupJob[]>]

Specifies the existing backup job(s) to set the VMs you want to copy.

You can assign multiple backup jobs to this object.

False Named

True (ByValue,

ByPropertyName)

False

[-Repository Specifies the backup False Named False False

84 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

<CBackup Repository>]

repository to where you want to copy the VM data.

If not set, Veeam Backup & Replication will use the default backup repository.

[-Description <string>]

Specifies the description of the backup copy job.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

<CommonParameters>

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

Example 1 This command creates a backup copy job named "CopyJob1" with the following parameters:

• The source and target WAN accelerators are obtained with Get-VBRWANAccelerator and assigned to $wansource and $wantarget variables accordingly beforehand,

• The VMs to copy are obtained with Find-VBRViEntity and assigned to the $vms variable beforehand,

• The repository to where the VM data will be copied is obtained with Get-VBRBackupRepository and assigned to the $repository variable beforehand.

Add-VBRViBackupCopyJob -SourceAccelerator $wansource -TargetAccelerator $wantarget -Name CopyJob1 -Entity $vms -Repository $repository

Example 2 This command creates a direct backup copy job with the following parameters:

• The name of the job is "DC CopyJob",

• The backup job named "DC Backup" with the VMs to be copied is obtained with Get-VBRBackup and piped down,

• The -Repository parameter is not set to copy the VMs to the default backup repository.

Get-VBRBackup -Name "DC Backup" | Add-VBRViBackupCopyJob -DirectOperation -Name "DC CopyJob"

85 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRViBackupJob Short Description Creates VMware backup job.

Applies to Version: 7.0 and earlier

Platform: VMware

For Hyper-V, run Add-VBRHvBackupJob.

Syntax

Add-VBRViBackupJob [-Name <String>] [-BackupRepository <CBackupRepository>] -Entity <IViItem[]>

Detailed Description This cmdlet allows you to create a new VMware backup job.

Please note that when you create a backup job, you need to run it manually unless you enable a job schedule.

Run Start-VBRJob to start the created job.

Run Set-VBRJobSchedule to set schedule for the job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String>]

Specifies the string with the name of the created backup job.

False Named False False

[-Backup Repository <CBackup Repository>]

Specifies the backup repository where the created backup should be stored.

False Named False False

-Entity <IViItem[]>

Specifies the VM(s) that you want to back up.

You can assign multiple VMs to this object.

True Named

True (ByValue,

ByPropertyName)

False

Example This command creates a backup job named "Exchange Backup". The VMs to backup are obtained with Find-VBRViEntity and piped down. The backup repository is obtained with Get-VBRBackupRepository and assigned to the $Repository variable beforehand. the description is "VMware Exchange Backup".

Find-VBRViEntity -Name Exchange* | Add-VBRHvBackupJob -Name "Exchange Backup" -BackupRepository $Repository -Description "VMware Exchange Backup"

86 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRViJobObject Short Description Adds a VM to a job.

Applies to Version: 7.0

Platform: VMware

For Hyper-V, run Add-VBRHvJobObject.

Syntax

Add-VBRViJobObject -Job <CBackupJob> -Entities <IViItem[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet allows to add VM(s) to an existing job.

You can run this cmdlet with any kind of jobs.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to add the VM(s) to.

You can assign multiple backup jobs to this object.

True Named False False

-Entities <IViItem[]>

Specifies the vM(s) you want to add to the job.

You can assign multiple VMs to this object.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

87 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command adds a VM named "VM01" to the job represented by $job variable. First the job object is got and assigned to $job variable.The VM object is piped to the cmdlet.

Find-VBRViEntity -Name VM01 | Add-VBRHvJobObject -Job $job

Example 2 This command adds a VM represented by $Vm variable to the job represented to $job variable. The variables are assigned beforehand.

Add-VBRViJobObject -Job $job -Entities $Vm

88 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRViProxy Short Description Adds a VMware backup proxy to Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware

For Hyper-V, run Add-VBRHvProxy.

Syntax

Add-VBRViProxy -Server <CHost> [-Description <String>] [-MaxTasks <Int32>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet adds a VMware backup proxy server to Veeam Backup & Replication managing console.

In the backup infrastructure, the backup proxy actually performs main data handling – retrieving data, processing it and transferring to the target destination. Use of backup proxies enables you to take the job processing off the backup server and allows for better scalability of your backup infrastructure.

Run Disable-VBRViProxy to disable a VMware proxy.

Run Enable-VBRViProxy to enable a disabled VMware proxy.

Run Remove-VBRViProxy to remove a VMware proxy from Veeam Backup & Replication managing console.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Server <CHost>

Specifies the server which will act as a VMware backup proxy.

True Named

True (ByValue,

By Property

Name)

False

[-Description <String>]

Specifies the description of the VMware proxy.

If not set, Veeam Backup & Replication will enter date and time of creation by default.

False Named False False

[-MaxTasks <Int32>]

Sets the integer specifying the number of concurrent tasks that can be assigned to the proxy simultaneously.

False Named False False

89 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

<CommonParameters>

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

90 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRViReplicaJob Short Description Adds new VMware replication job.

Applies to Version:

Platform: VMware

For Hyper-V, run Add-VBRHvReplicaJob.

Syntax

Add-VBRViReplicaJob [-Name <String>] -Server <CHost> -Entity <IViItem[]> [-Datastore <CViDatastoreItem>] [-ResourcePool <CViResourcePoolItem>] [-Folder <CViFolderItem>] [-Suffix <String>] [-BackupRepository <CBackupRepository>]

Detailed Description This cmdlet allows you to create a new VMware replication job.

Replication is a process of copying a VM from its primary location (source host) to a destination location (redundant target host). Veeam Backup & Replication creates an exact copy of a VM (replica), registers it on the target host and maintains it in synch with the original VM.

Please note that when you create a replica job, you need to run it manually unless you enable a job schedule.

Run Start-VBRJob to start the created job.

Run Set-VBRJobSchedule to set schedule for the job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String>]

Specifies the string with the name of the created replication job.

False Named False False

-Server <CHost> Specifies the host where the created replica should be stored.

True Named False False

-Entity <IViItem[]>

Specifies the VM(s) that you want to replicate.

You can assign multiple VMs to this object.

True Named True False

-Datastore <CViDatastore Item>]

Specifies the datastore to which you want to replicate. False Named False False

[-Resource Pool <CViResource

Specifies the resource pool to which you want to replicate. False Named False False

91 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

PoolItem>]

[-Folder <CViFolder Item>]

Specifies the folder to which you want to replicate. False Named False False

[-Suffix <String>]

Specifies the suffix that will be appended to the name of the VM you are replicating. This name will be used to register the replicated VM on the target server.

False Named False False

[-Backup Repository <CBackup Repository>]

Specifies the backup repository which will be used to store replica metadata files.

False Named False False

Example This example allows you to create a replication job with the default name and following parameters:

• Target host DNS name ends with ‘esx5’

• Replicated VM: knt01

add-vbrvireplicajob -server (get-vbrserver -name *esx5) -entity (find-vbrvientity -name knt01)

92 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRWANAccelerator Short Description Creates a new WAN accelerator.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Note WAN optimization is available only in Veeam Backup & Replication Enterprise Plus Edition.

Syntax

Add-VBRWANAccelerator -Server <CHost> [-Description <String>] [-CachePath <String>] [-CacheSize <UInt32>] [-CacheSizeUnit <ESizeUnit>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet creates a new WAN accelerator.

WAN accelerator is an architecture component that optimizes file transfer via WAN by means of data deduplication. The role of a WAN accelerator can be assigned to a dedicated Windows-based machine (physical or virtual). For best performance you should set a WAN accelerator on both source and target sides.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Server <CHost>

Specifies the server where WAN accelerator will be created. Please note that you can create WAN accelerator on Microsoft Windows servers only.

True Named

True (ByValue,

ByPropertyName)

False

[-Description <string>]

Specifies the description of the WAN accelerator. False Named False False

[-CachePath <string>]

Specifies the path to the folder where WAN accelerator will be created.

False Named False False

[-CacheSize <uint32>]

Specifies the cache folder capacity value in UInt32 format. Accepted values: 1 to 65535.

False Named False False

[-CacheSizeUnit <ESizeUnit>]

Specifies the measure unit for the cache folder capacity. The valid values are GB and TB.

False Named False False

93 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

<CommonParameters>

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

Example This command creates a new WAN accelerator with the following parameters:

• The $s variable contains the server where the WAN accelerator will be created.

• The description of the new WAN accelerator is "BackupWANAccelerator".

• The -CachePath parameter sets the folder where the new WAN accelerator will be created.

• Cache size capacity is set to 100GB.

Add-VBRWANAccelerator -Server $s -Description BackupWANAccelerator -CachePath "c:\wan" -CacheSize 100 -CacheSizeUnit GB

94 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VBRWinServer Short Description Adds Windows server to Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Add-VBRWinServer -Name <String> -User <String> -Password <String>

Detailed Description This cmdlet allows you to add a Windows server to Veeam Backup & Replication.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Name <String>

Specifies the string with a full DNS name or IP address of the Windows server.

True Named False False

-User <String>

Specifies the string with the user name of the account with administrator privileges on the Windows server.

True Named False False

-Password <String>

Specifies the string with the password of the account with administrator privileges on the Windows server.

True Named False False

95 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VSBApplicationGroup Short Description Adds application group.

Note In Backup & Replication v6 this cmdlet was replaced by Add-VSBViApplicationGroup and Add-VSBHvApplicationGroup due to multihypervisor support introduced in the new version. The cmdlet will still work but it is advised to rewrite your scripts using new cmdlets for added benefits.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Add-VSBApplicationGroup [-Name] <String> [-Vm] <CVm[]>

-OR-

Add-VSBApplicationGroup [-Name] <String> [-RestorePoint] <COib[]>

Detailed Description This cmdlet allows you to create an application group.

An application group is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group. The VMs in the application group are started first to ensure the proper testing environment for the primary VM.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name] <String>

Specifies the string with the name you want to assign to the application group.

True 1 False False

[-Vm] <CVm[]>

Specifies the VM(s) you want to include into the application group.

You can assign multiple VMs to this object.

True 2

True (ByValue,

ByPropertyName)

False

[-RestorePoint] <COib[]>

Specifies the restore points of VMs that should be added to the application group.

You can assign multiple restore points to this object.

True 2

True (ByValue,

ByPropertyName)

False

96 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example This example allows you to create an application group with the following parameters:

• Application group name: AppGroup

• Variable which contains objects of VMs to be added to the group: $vms

Add-VSBApplicationGroup –Name “AppGroup”–VM $vms

97 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VSBHvApplicationGroup Short Description Creates a Hyper-V application group for SureBackup job.

Applies to Version: 7.0

Platform: Hyper-V

For VMware, run Add-VSBViApplicationGroup.

Syntax

Add-VSBHvApplicationGroup [-Name <String>] [-VmFromBackup <CHvVmItem[]>] [-RestorePoint <COib[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]>]

Detailed Description This cmdlet creates a new Hyper-V application group.

An application group is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group. The VMs in the application group are started first to ensure the proper testing environment for the primary VM.

You can add VMs to your application group either by searching for existing VMs or by adding a restore point containing the VMs you need.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Name <String> Specifies the name you want to assign to the application group.

False Named False False

[-VmFromBackup <CHvVmItem[]>]

Specifies the VM(s) you want to add to the application group.

You can assign multiple VMs to this object.

True Named

True (ByValue,

ByPropertyName)

False

[-RestorePoint] <COib[]>

Specifies the restore points of the VMs you want to add to the application group.

You can assign multiple restore points to this object.

True Named

True (ByValue,

ByPropertyName)

False

98 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

<CommonParameters>

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

Example 1 This command creates a new application group named "MailServerAppgroup_1". The VM that should be included into the application group is piped to the cmdlet.

Find-VBRHvEntity -Name HV-DNS | Add-VSBHvApplicationGroup -Name MailServerAppgroup_1

Example 2 This command creates a new application group "MailServerAppgroup_2". First the restore point object is got and assigned to $restorepoint variable.

Add-VSBHvApplicationGroup -Name MailServerAppgroup_2 -RestorePoint $restorepoint

99 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VSBHvJob Short Description Creates a Hyper-V SureBackup job.

Applies to Version: 7.0

Platform: Hyper-V

For VMware, run Add-VSBJob.

Syntax

Add-VSBHvJob [-Name <String>] -VirtualLab <CHvSbVirtualLab> [-AppGroup <CSbAppGroup>] [-LinkedJob <CBackupJob[]>] [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet adds a new Hyper-V SureBackup job.

SureBackup is a Veeam recovery verification technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

Run Add-VSBHvVirtualLab to create a virtual lab.

Run Add-VSBHvApplicationGroup to create an application group.

Please note that when you create a SureBackup job, you need to run it manually unless you enable a job schedule.

Run Start-VSBJob to start the created SureBackup job.

Run Set-VSBJobScheduleOptions to set schedule for the SureBackup job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String>]

Specifies the name you want to assign to the Sure Backup job.

False Named False False

-VirtualLab <CSbVirtualLab>

Specifies the virtual lab you want to use for verification. True Named

True (ByValue,

ByPropertyName)

False

-AppGroup <CSbAppGroup>

Specifies the application group containing all components and services required to perform verification. If you do not use an application group, make

False Named

True (ByValue,

ByPropertyName)

False

100 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

sure that the -LinkedJob parameter is set.

[-LinkedJob] <CBackupJob[]

Specifies the backup job from where the VM(s) you want to verify can be derived.

If you do not use a linked backup job, make sure that the -AppGroup parameter is set.

You can assign multiple backup jobs to this object.

False Named

True (ByValue,

ByPropertyName)

False

[-Description] Specifies the description of the new Sure Backup job. False Named False False

<CommonParameters>

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

Example 1 This command creates a new Sure Backup job named "SureBackupJob1". First the virtual lab and application group objects are got and assigned to $vlab and $appgroup variables accordingly.

Add-VSBHvJob -Name SureBackupJob1 -VirtualLab $vlab -AppGroup $appgroup

Example 2 This command creates a new Sure Backup job named "SureBackupJob2". First the virtual lab and linked job objects are got and assigned to $vlab and $ljob variables accordingly.

Add-VSBHvJob -Name SureBackupJob2 -VirtualLab $vlab -LinkedJob $ljob

Example 3 This command creates a new Sure Backup job named "SureBackupJob3". First the virtual lab, application group and linked job objects are got and assigned to $vlab, $appgroup and $ljob variables accordingly.

Add-VSBHvJob -Name SureBackupJob2 -VirtualLab $vlab -AppGroup $appgroup -LinkedJob $ljob

101 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VSBHvVirtualLab Short Description Creates a Hyper-V virtual lab.

Applies to Version: 7.0

Platform: Hyper-V

For VMware, run Add-VSBVirtualLab.

Syntax

Add-VSBHvVirtualLab [-Name] <String> [-Server] <CHost> [-Folder] <String> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet creates a new Hyper-V virtual lab.

A virtual lab is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

Run Add-VSBHvApplicationGroup to create an application group.

Run Add-VSBHvJob to create a SureBackup job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Name <String> Specifies the name you want to assign to the virtual lab. True Named False False

[-Server] <CHost>

Specifies the Hyper-V host where the redo log files of the virtual lab will be stored.

True Named False False

-Folder <String>

Specifies the path to the folder where the redo log files of the virtual lab will be stored.

True Named False False

<CommonParameters>

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

102 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example This cmdlet creates a new virtual lab with the following parameters:

• Name: HvVirtalLab,

• Server to store redo files: object assigned to $host variable,

• Folder path to store redo files: c:\VirtualLabs. First the -Server object is got and assigned to $host variable.

Add-VSBHvVirtualLab -Name "HvVirtualLab" -Server $host -Folder "c:\VirtualLabs"

103 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VSBJob Short Description Creates a SureBackup job.

Applies to Version: 7.0 and earlier

Platform: VMware

For Hyper-V, run Add-VSBHvJob.

Syntax

Add-VSBJob [[-Name] <String>] -VirtualLab <CViSbVirtualLab> [-AppGroup <CSbAppGroup>] [-LinkedJob <CBackupJob[]>] [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet adds a new VMware SureBackup job.

SureBackup is a Veeam recovery verification technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

Run Add-VSBVirtualLab to create a virtual lab.

Run Add-VSBViApplicationGroup to create an application group.

Please note that when you create a SureBackup job, you need to run it manually unless you enable a job schedule.

Run Start-VSBJob to start the created SureBackup job.

Run Set-VSBJobScheduleOptions to set schedule for the SureBackup job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[[-Name] <String>]

Specifies the string with the name you want to assign to the SureBackup job.

False 1 False False

-VirtualLab <CViSbVirtualLab>

Specifies the virtual lab you want to use for verification.

True 2

True (ByValue,

ByPropertyName)

False

[-AppGroup <CSbAppGroup>]

Specifies the application group containing all components and services required to perform

True Named

True (ByValue,

ByPropertyName)

False

104 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

verification.

[-Description <String>]

Specifies the description for the created job. False Named False False

<CommonParameters>

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

Example This example allows you to create a SureBackup job with the following parameters:

• Job name: SureJob

• Variable which contains object of virtual lab: $vlab

• Variable which contains object of application group: $appgroup

Add-VSBJob –Name ‘SureJob’–VirtualLab $vlab–AppGroup $appgroup

105 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VSBViApplicationGroup Short Description Creates an application group for SureBackup job.

Applies to Version: 7.0

Platform: VMware

For Hyper-V, run Add-VSBHvApplicationGroup.

Syntax

Add-VSBViApplicationGroup -Name <String> -Vm <CViVmItem[]> [-WarningAction <ActionPreference>][-WarningVariable <String>] [<CommonParameters>]

-OR-

Add-VSBViApplicationGroup -Name <String> -RestorePoint <COib[]> [-WarningAction <ActionPreference>][-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returnes a new application group containing virtual machines that the application server is dependent on.

An application group is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

This cmdlet provides two scenarios. You can add VMs to your application group either by searching for existing VMs or by adding a restore point containing the VMs you need.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Name <String> Specifies the name you want to assign to the application group.

False Named False False

-Vm <CViVmItem[]>

Specifies the VM(s) you want to add to the application group.

You can assign multiple VMs to this object.

True Named

True (ByValue,

ByPropertyName)

False

[-RestorePoint] <COib[]>

Specifies the restore points of the VMs you want to add to the application group.

You can assign multiple

True Named

True (ByValue,

ByPropertyName)

False

106 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

restore points to this object.

<CommonParameters>

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

Example 1 This command creates a new application group named "MailServerAppgroup_1". The VM that should be included into the application group is piped to the cmdlet.

Find-VBRViEntity -Name DNSServer | Add-VSBHvApplicationGroup -Name "MailServerAppgroup_1"

Example 2 This command creates a new application group "MailServerAppgroup_2". First the restore point object is got and assigned to $restorepoint variable.

Add-VSBViApplicationGroup -Name "MailServerAppgroup_2" -RestorePoint $restorepoint

107 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Add-VSBVirtualLab Short Description Creates virtual lab.

Applies to Version: 7.0 and earlier

Platform: VMware

For Hyper-V, run Add-VSBHvVirtualLab.

Syntax

Add-VSBVirtualLab [-Name] <String> [-Server] <CHost> [-Datastore] <CViDatastoreItem> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet creates a new virtual lab.

A virtual lab is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name] <String>

Specifies the string with the name you want to assign to the virtual lab.

True 1 False False

[-Server] <CHost>

Specifies the ESX(i) host where the virtual lab should be created. True 2 False False

[-Datastore] <CViDatastore Item>

Specifies the datastore on which redo logs for tested VMs should be stored.

True 3 False False

<CommonParameters>

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

108 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example This example allows you to create a virtual lab with the following parameters:

• Lab name: VLab1

• Variable which contains object of the host where the lab will be created: $host

• Variable which contains object of the datastore where redo logs will reside: $dstore

Add-VSBVirtualLab –Name “VLab1”–Server $host–Datastore $dstore

109 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Connect-VSBHvVirtualLab Short Description Connects an existing Hyper-V virtual lab.

Applies to Version: 7.0

Platform: Hyper-V

For VMware, run Connect-VSBVirtualLab.

Syntax

Connect-VSBHvVirtualLab [-VirtualLab] <CHvLabShortInfo> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet connects an existing Hyper-V virtual lab to Veeam Backup & Replication console.

When you add a new host to your Veeam Backup & Replication console, the virtual labs that are registered on it are not added automatically. Use this cmdlet to add the virtual labs to your Veeam Backup & Replication console.

A virtual lab is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-VirtualLab] <CHvLabShortInfo>

Specifies the virtual lab you want to connect to your Veeam Backup & Replication console.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

110 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command connects a virtual lab represented by the $vlab variable. The virtual lab object is obtained with Get-VSBHvVirtualLab and assigned to $vlab variable beforehand.

Connect-VSBHvVirtualLab -VirtualLab $vlab

Example 2 This command connects a virtual lab named "Virtual Lab 01". The virtual lab to connect is obtained with Find-VSBHvVirtualLab by looking for the specific virtual lab by name on the server represented by the $server variable. The server object is obtained with Get-VBRServer and assigned to the variable beforehand.

Find-VSBHvVirtualLab -Server $server -Name "Virtual Lab 01" | Connect-VSBHvVirtualLab

111 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Connect-VSBVirtualLab Short Description Connects an existing VMware virtual lab.

Applies to Version: 7.0 and earlier

Platform: VMware

For Hyper-V, run Connect-VSBHvVirtualLab.

Syntax

Connect-VSBVirtualLab [-VirtualLab] <CVirtualLabDescriptor> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet connects an existing VMware virtual lab to Veeam Backup & Replication console.

When you add a new host to your Veeam Backup & Replication console, the virtual labs that are registered on it are not added automatically. Use this cmdlet to add the virtual labs to your Veeam Backup & Replication console.

A virtual lab is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-VirtualLab] <CVirtualLab Descriptor>

Specifies the virtual lab you want to connect. True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

112 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Copy-VBRJob Short Description Clones an existing job.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Copy-VBRJob [-Job] <CBackupJob[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet clones an existing job.

You can run this cmdlet with backup, replication and copy jobs.

Note Job cloning requires Veeam Backup & Replication Enterprise edition.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CBackupJob[]>

Specifies the job you want to clone. True 0

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example 1 This command clones the jobs named "DHCP Replica Job" and "DHCP Backup Job". The jobs are obtained with Get-VBRJob and piped down.

Get-VBRJob -Name "DHCP Replica Job", "DHCP Backup Job" | Copy-VBRJob

113 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 2 This command clones the job represented by the $job variable. The job is obtained with Get-VBRJob and assigned to the variable beforehand.

Copy-VBRJob -Job $job

114 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Disable-VBRHvProxy Short Description Disables a Hyper-V backup proxy.

Applies to Version: 7.0 and earlier

Platform: Hyper-V

For VMware, run Disable-VBRViProxy.

Syntax

Disable-VBRHvProxy -Proxy <CHvProxy[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet allows you to disable a Hyper-V backup proxy.

Run Enable-VBRHvProxy to enable a disabled Hyper-V proxy.

Run Get-VBRHvProxy to get the proxy you need to disable.

Run Remove-VBRHvProxy to remove a proxy from Veeam Backup & Replication managing console.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Proxy <CHvProxy[]>

Specifies the Hyper-V backup proxy you want to disable.

You can assign multiple proxies to this object.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command disables the selected Hyper-V proxy. The needed proxy object is obtained with Get-VBRHvProxy by selecting the proxy with name containing "Hyper-V" and passed down to the cmdlet.

Get-VBRHvProxy -Name *Hyper-V* | Disable-VBRHvProxy

115 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Disable-VBRJob Short Description Disables job.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Disable-VBRJob -Job <CBackupJob[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet disables a selected job. The job is not deleted from Veeam Backup & Replication. You can bring the job back to scheduled launch by running Enable-VBRJob.

You can run this cmdlet with backup, replication and copy jobs.

To stop the job once without disabling it, run Stop-VBRJob.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to disable.

You can assign multiple backup jobs to this object.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

116 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Disable-VBRJobGuestFSIndexing Short Description Disables job guest file system indexing option.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Disable-VBRJobGuestFSIndexing [-Job] <CBackupJob[]> [<CommonParameters>]

Detailed Description This cmdlet disables guest file system indexing in the selected job. The guest file system indexing settings are not deleted.

Guest file system indexing is cataloging the guest VM files during the backup. Indexing helps you recognize files stored on guest VM. If you backup your VMs without guest file system indexing option, you will not be able to perform guest OS files restore.

You can run this cmdlet with backup, replication and copy jobs.

Run Enable-VBRJobGuestFSIndexing to enable the guest file system indexing settings.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to edit.

You can assign multiple backup jobs to this object.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command disables the guest file system indexing option in the job named "Backup Job 01". The backup job object is piped to the cmdlet.

Get-VBRJob -Name "Backup Job 01" | Disable-VBRJobGuestFSIndexing

117 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Disable-VBRJobVSSIntegration Short Description Disables job VSS settings.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Disable-VBRJobVSSIntegration [-Job] <CBackupJob[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet disables the VSS settings in the selected job. The VSSs settings are not deleted form the job.

VSS (Volume Shadow Services) is a Windows OS service allowing to copy files of running applications that can be modified at the moment of copying. The VSS-aware applications typically are Active Directory, Microsoft SQL, Microsoft Exchange, Sharepoint, etc. To create a transactionally consistent backup of a VM running VSS-aware applications without shutting them down, Veeam Backup & Replication uses application-aware image processing. It allows backup the data fully and consistently.

You can run this cmdlet with backup, replication and copy jobs.

Run Enable-VBRJobVSSIntegration to enable the job VSSs settings.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to edit.

You can assign multiple jobs to this object.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command disables the VSS options in the job named "Backup Job 01". The backup job object is piped to the cmdlet.

Get-VBRJob -Name "Backup Job 01" | Disable-VBRJobVSSIntegration

118 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Disable-VBRJobSchedule Short Description Disables job schedule.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Disable-VBRJobSchedule -Job <CBackupJob[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>][<CommonParameters>]

Detailed Description This cmdlet disables job schedule. The schedule settings are not deleted. When you disable a job schedule, you can launch the job manually by running Start-VBRJob.

You can run this cmdlet with backup, replication and copy jobs.

Run Enable-VBRJobSchedule to enable the job schedule.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job(s) you want to disable.

You can assign multiple backup jobs to this object.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example 1 This command disables the job named "Backup Job 01". The job object is obtained with Get-VBRJob and piped down.

Get-VBRJob -Name "Backup Job 01" | Disable-VBRJobSchedule

Example 2 This command disables the job represented by the $job variable. The job object is obtained with Get-VBRJob and assigned to the variable beforehand.

Disable-VBRJobSchedule -Job $job

119 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Disable-VBRViProxy Short Description Disables a VMware backup proxy.

Applies to Version: 7.0 and earlier

Platform: VMware

For Hyper-V, run Disable-VBRHvProxy.

Syntax

Disable-VBRViProxy -Proxy <CViProxy[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet allows you to disable a VMware backup proxy.

Run Enable-VBRViProxy to enable a disabled VMware proxy.

Run Get-VBRViProxy to get the proxy you need to disable.

Run Remove-VBRViProxy to remove a VMware proxy from Veeam Backup & Replication managing console.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Proxy <CViProxy[]>

Specifies the VMware backup proxy you want to disable.

You can assign multiple proxies to this object.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command disables the selected VMware proxies named "VMware Backup Proxy 01", "VMware Backup Proxy 05". The proxies are obtained with Get-VBRViProxy by selecting by names and piped down.

Get-VBRHvProxy -Name "VMware Backup Proxy 01", "VMware Backup Proxy 05" | Disable-VBRViProxy

120 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Eject-VBRTapeDrive Short Description Ejects tape from the selected media drive.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Eject-VBRTapeDrive -Drive <TapeDrive> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet ejects tape from the specified drive. The tape returns to its original slot.

Run Eject-VBRTapeMedium to eject a specific tape from drive.

Run Export-VBRTapeMedium to remove a tape from the library.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Drive <TapeDrive> Specifies the drive you want to eject. True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command ejects the tape from the drive represented by $drive variable. The -Drive object is assigned to the variable beforehand.

Eject-VBRTapeDrive -Drive $drive

121 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Eject-VBRTapeMedium Short Description Ejects tape from media drive.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Eject-VBRTapeMedium -Medium <TapeMedium> [<CommonParameters>]

Detailed Description This cmdlet ejects the currently injected tape from the selected media drive. The tape returns to its original slot.

You can also eject tape from the certain drive using the Eject-VBRTapeDrive cmdlet.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Medium <TapeMedium>

Specifies the tape you want to eject. True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command ejects the currently injected tape represented by $tape variable from the drive. The -Tape object is assigned to the variable beforehand.

Eject-VBRTapeMedium -Tape $tape

122 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Enable-VBRHvProxy Short Description Enables a Hyper-V backup proxy.

Applies to Version: 7.0 and earlier

Platform: Hyper-V

For VMware, run Enable-VBRViProxy.

Syntax

Enable-VBRHvProxy -Proxy <CHvProxy[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet allows you to enable a Hyper-V backup proxy.

Run Add-VBRHvProxy to add a Hyper-V proxy to Veeam Backup & Replication managing console.

Run Disable-VBRHvProxy to disable a proxy.

Run Get-VBRHvProxy to get the proxy you need to enable.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Proxy <CHvProxy[]>

Specifies then object of the Hyper-V backup proxy you want to enable.

You can assign multiple proxies to this object.

True

Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command enables the selected Hyper-V proxy. The needed proxy is obtained with Get-VBRHvProxy by selecting the proxy with name containing "Hyper-V" and passed down to the cmdlet.

Get-VBRHvProxy -Name *Hyper-V* | Enable-VBRHvProxy

123 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Enable-VBRJob Short Description Returns a disabled job to scheduled run.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Enable-VBRJob -Job <CBackupJob[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a disabled job to scheduled run. Job can be disabled by Disable-VBRJob cmdlet.

You can run this cmdlet with any kind of jobs.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to enable.

You can assign multiple backup jobs to this object.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example 1 This command enables the job represented by variable. First the job object is got and assigned to $job variable.

Enable-VBRJob -Job $job

Example 2 This command enables the job named "Backup Job 01". The backup job is piped to the cmdlet.

Get-VBRJob -Name "Backup Job 01" | Enable-VBRJob

124 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Enable-VBRJobGuestFSIndexing Short Description Enables job guest file system indexing option.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Enable-VBRJobGuestFSIndexing [-Job] <CBackupJob[]> [<CommonParameters>]

Detailed Description This cmdlet enables guest file system indexing in the selected job.

Guest file system indexing is cataloging the guest VM files during the backup. Indexing helps you recognize files stored on guest VM. If you backup your VMs without guest file system indexing option, you will not be able to perform guest OS files restore.

You can enable the guest file system indexing settings in case you have these settings set beforehand. Use this cmdlet to enable the indexing option that was disabled with Disable-VBRJobGuestFSIndexing cmdlet.

You can run this cmdlet with backup and replica jobs including vCloud jobs.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to edit.

You can assign multiple backup jobs to this object.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example 1 This command enables the guest file system indexing option in the job named "Backup Job 01". The backup job object is piped to the cmdlet.

Get-VBRJob -Name "Backup Job 01" | Enable-VBRJobGuestFSIndexing

125 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Enable-VBRJobSchedule Short Description Enables job schedule.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Enable-VBRJobSchedule -Job <CBackupJob[]> [-WarningAction <ActionPreference>][-WarningVariable <String>][<CommonParameters>]

Detailed Description This cmdlet enables job schedule. Job schedule can be disabled by Disable-VBRJobSchedule cmdlet.

You can run this cmdlet with any kind of jobs.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job(s) you want to enable.

You can assign multiple backup jobs to this object.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example 1 This command enables the job represented by variable. First the job object is got and assigned to $"Backup Job 01" variable.

Enable-VBRJobSchedule -Job $"Backup Job 01"

Example 2 This command enables the jobs named "Backup Job 01" and "Backup Job 02". The backup jobs object is piped to the cmdlet.

Get-VBRJob -Name "Backup Job 01", "Backup Job 02" | Enable-VBRJobSchedule

126 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Enable-VBRJobVSSIntegration Short Description Enables job VSS settings.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Enable-VBRJobVSSIntegration [-Job] <CBackupJob[]> [<CommonParameters>]

Detailed Description This cmdlet enables the VSS settings in the selected job.

VSS (Volume Shadow Services) is a Windows OS service allowing to copy files of running applications that can be modified at the moment of copying. The VSS-aware applications typically are Active Directory, Microsoft SQL, Microsoft Exchange, Sharepoint, etc. To create a transactionally consistent backup of a VM running VSS-aware applications without shutting them down, Veeam Backup & Replication uses application-aware image processing. It allows backup the data fully and consistently.

You can enable the VSS settings in case you have these settings set beforehand. Use this cmdlet to enable the VSS settings that were disabled with Disable-VBRJobVSSIntegration cmdlet.

You can run this cmdlet with backup and replica jobs including vCloud jobs.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to disable.

You can assign multiple backup jobs to this object.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command enables the VSS option in the job named "Backup Job 01". The backup job object is piped to the cmdlet.

Get-VBRJob -Name "Backup Job 01" | Enable-VBRJobVSSIntegration

127 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Enable-VBRViProxy Short Description Enables a VMware backup proxy.

Applies to Version: 7.0 and earlier

Platform: VMware

For Hyper-V, run Enable-VBRHvProxy.

Syntax

Enable-VBRViProxy -Proxy <CViProxy[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet allows you to enable a VMware backup proxy.

Run Add-VBRViProxy to add a VMware proxy to Veeam Backup & Replication managing console.

Run Disable-VBRViProxy to disable a proxy.

Run Get-VBRViProxy to get the proxy you need to disable.

Run Remove-VBRViProxy to remove a VMware proxy from Veeam Backup & Replication managing console.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Proxy <CViProxy[]>

Specifies the VMware backup proxy you want to enable.

You can assign multiple proxies to this object.

True 0

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command enables the selected VMware proxy named "VMwareProxy". The needed proxy is obtained with Get-VBRViProxy by selecting by name and passed down to the cmdlet.

Get-VBRViProxy -Name "VMwareProxy" | Enable-VBRViProxy

128 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Erase-VBRTapeMedium Short Description Clears tape.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Erase-VBRTapeMedium -Medium <TapeMedium[]> [-Long] [-RunAsync] [<CommonParameters>]

Detailed Description This cmdlet clears a selected tape making it available for new recordings.

By default Veeam Backup & Replication runs short erase procedure clearing only the tape headers. The remaining data is overwritten. You can enable long erase procedure to clear all data from the tape by adding "-Long" parameter to your string.

The erased tape remains in the media pool it belongs to. Exceptions are predefined Unrecognized, Imported and Free media pools.

If you move tape with data to the Free media pool and confirm the operation, Mark as Free will take effect and the data will be overwritten.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Medium <TapeMedium[]>

Specifies the tape(s) you want to erase.

You can assign multiple tapes to this object.

True Named

True (ByValue, ByPropertyName)

False

[-Long]

If set, the erase procedure will clear all data from the tape. Otherwise Veeam Backup & Replication runs a short erase procedure that clears the headers only. The tape is regarded as free and the remaining data is ovewritten.

False Named False False

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False Named False False

129 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

<CommonParameters>

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

Example 1 The following command clears tape represented by $tape variable.

• The -TapeMedium object is assigned to the variable beforehand.

• The -Long parameter is not set to enable the default short erase procedure.

• The RunAsync parameter is set to bring the process to the background.

Erase-VBRTapeMedium -Tape $tape -RunAsync

Example 2 The following command clears tape with the barcode “00233400”. Pipeline is used to select the tape with the barcode “00233400” and pass it to the cmdlet.

Get-VBRTapeMedium | Where-Object {$_.barcode -eq "00233400"}| Erase-VBRTapeMedium -RunAsync

130 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Export-VBRLogs Short Description Collects logs for export.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Export-VBRLogs -Server <CHost[]> -FolderPath <String> [-Compress] [-From <DateTime>] [-To <DateTime>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Export-VBRLogs -Job <IJob[]> -FolderPath <String> [-Compress] [-From <DateTime>] [-To <DateTime>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Export-VBRLogs -Entity <IVmItem[]> -FolderPath <String> [-Compress] [-From <DateTime>] [-To <DateTime>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Export-VBRLogs -Backup <CBackup[]> -FolderPath <String> [-Compress] [-From <DateTime>] [-To <DateTime>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet collects system logs. You can use this cmdlet to collect logs you can send to the Veeam support.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Server <CHost[]>

Specifies the server(s) from which you want to collect logs.

Note that selected servers must be running and reachable over the network.

You can assign multiple servers to this object.

True Named

True (ByValue,

ByPropertyName)

False

131 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

[-From <DateTime>]

Specifies the start date to collect the logs for export. Enter the date in format set in your workstation Date and Time settings.

False Named False False

[-To <DateTime>]

Specifies the end date to collect the logs for export. Enter the date in format set in your workstation Date and Time settings.

False Named False False

-Job <IJob[]>

Specifies the job(s) you want to collect logs for.

You can assign multiple jobs to this object.

True Named

True (ByValue,

ByPropertyName)

False

-Entity <IVmItem[]>

Specifies the VM(s) you want to collect logs for.

You can assign multiple VMs to this object.

True Named

True (ByValue,

ByPropertyName)

False

-Backup <CBackup[]>

Specifies the backups you want to collect logs for.

You can assign multiple backups to this object.

True Named

True (ByValue,

ByPropertyName)

False

-FolderPath <String>

Specifies the destination folder to which the logs will be exported.

True Named False False

[-Compress] If set, the log files will be archived. False Named False False

<CommonParameters>

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

Example This command starts collecting log files.

• The $server variable contains the server from which the logs will be collected,

• The destination path to folder to save logs is c:\Logs,

• The -Compress parameter is set to archive the logs.

Export-VBRLogs -Server $server -FolderPath c:\Logs -Compress

132 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Export-VBRTapeMedium Short Description Removes selected tapes from library.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Export-VBRTapeMedium -Medium <TapeMedium[]> [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet moves a selected tape to the mail slot. You can take the tape out of the mail slot manually.

The mail slot is the slot through which you can put the new tapes into the library and take the tapes with data out. The mail slot is a service slot and you do not manage the tape residing inside it until it is imported to the library or after it is exported.

Run Import-VBRTapeMedium to put new tapes to the library.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Medium <TapeMedium[]>

Specifies the tape(s) you want to export.

You can assign multiple tapes to this object.

True Named

True (ByValue,

ByPropertyName)

False

[-RunAsync]

Indicates that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

133 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command exports the tapes belonging to the media pool named "Incremental Backups". The tapes are obtained with Get-VBRTapeMedium by piping the needed media pool down. The -RunAsync parameter is set to bring the process to the background.

Get-VBRTapeMediaPool -Name "Incremental Backups" | Get-VBRTapeMedium | Export-VBRTapeMedium -RunAsync

Example 2 This command moves the group of tapes represented by the $tapes variable to the mail slot. The tapes object is obtained with Get-VBRTapeMedium and assigned to the variable beforehand. The -RunAsync parameter is set to bring the process to the background.

$tapes | Export-VBRTapeMedium -RunAsync

134 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Find-VBRDatastore Short Description Returns a list of VMware datastores connected to the specified ESX(i) host.

Note In Backup & Replication v6 this cmdlet was replaced by Find-VBRViDatastore and Find-VBRHvEntity due to multihypervisor support introduced in the new version. The cmdlet will still work but it is advised to rewrite your scripts using new cmdlets for added benefits.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Find-VBRDatastore [-Server] <CHost> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all datastores connected to the specified ESX(i) host.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Server] <CHost>

Specifies the ESX(i) host you want to get the list of the connected datastores of.

True 1

True (ByValue,

ByPropertyName)

False

[-Name <String[]>]

Specifies the name of the datastore you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

135 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Find-VBRHvEntity Short Description Looks for Hyper-V objects.

Applies to Version: 7.0 and earlier

Platform: Hyper-V

Syntax

Find-VBRHvEntity [-Server <CHost[]>] [-HostsAndVMs] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Find-VBRHvEntity [-Server <CHost[]>] [-Hosts] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Find-VBRHvEntity [-Server <CHost[]>] [-HostsAndVolumes] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of Hyper-V objects managed by Veeam Backup & Replication.

You can get the list of all Hyper-V objects in your virtual environment or narrow down your search to hosts, VMs or volumes, or look for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Server <CHost[]>]

Specifies the server you want to look for entities on.

You can assign multiple servers to this object.

False Named

True (ByValue,

ByPropertyName)

False

[-HostsAndVMs] Views results as hosts and VMs. False Named False False

[-Hosts] Views results as hosts. False Named False False

[-HostsAnd Volumes]

Views results as hosts and volumes. False Named False False

[-Name <String[]>]

Specifies the name of the entity you want to get, or search conditions.

You can specify multiple names separated by

False Named False True

136 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

commas.

<CommonParameters>

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

Example 1 This command looks for all Hyper-V objects registered on server named "Hyper-V Host". The server is obtained with Get-VBRServer and piped down.

Get-VBRServer -Name "HvHost" | Find-VBRHvEntity

Example 2 This command looks for Hyper-V hosts and VMs registered on Hyper-V servers named "HvHost 01" and "HvHost 02". The servers are obtained with Get-VBRServer and piped down.

Get-VBRServer -Name "HvHost 01", "HvHost 02" | Find-VBRHvEntity -HostsAndVMs

Example 3 This command directly looks for the Hyper-V server named "HvExchange".

Find-VBRHvEntity -Name "HvExchange"

137 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Find-VBRObject Short Description Returns a list of all VMs and VM containers on the specified ESX(i) host.

Note In Backup & Replication v6 this cmdlet was replaced by Find-VBRViEntity and Find-VBRHvEntity due to multihypervisor support introduced in the new version.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Find-VBRObject [-Server] <CHost> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all VMs and VM containers on the specified ESX(i) host.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

Server Specifies the ESX(i) host. True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

138 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Find-VBRResourcePool Short Description Looks for VMware resource pools.

Note In Backup & Replication v6 this cmdlet was replaced by Find-VBRViResourcePool.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Find-VBRResourcePool [-Server] <CHost>

Detailed Description This cmdlet returns a list of all VMware resource pools on the specified ESX(i) host.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

Server Specifies then object of the ESX(i) host True 1 False False

<CommonParameters>

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

139 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Find-VBRTapeCatalog Short Description Looks for files stored on tapes.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Find-VBRTapeCatalog [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet looks for files stored on tapes that are managed by Veeam Backup & Replication. All information about tape backups is stored in Veeam Backup & Replication database and you can view the list of files on tapes that are online or offline.

You can get the list of all files that are stored on tapes or narrow down the output by file name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <string[]>]

Specifies the name of the file to look for or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example This command looks for .vbk files.

Find-VBRTapeCatalog -Name *.vbk

140 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Find-VBRTapeCatalogVersion Short Description Looks for versions of files stored in tape backups.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Find-VBRTapeCatalogVersion [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Find-VBRTapeCatalogVersion [-CatalogFile <CatalogueFile>] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet looks for versions of files stored on tapes that are managed by Veeam Backup & Replication.

File version is used as a file restore point.

You can get the list of all files and their versions that are stored on tapes or narrow down the output by file name or object of file you need.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <string[]>]

Specifies the name of the file you want to get versions for, or search conditions.

You can specify multiple names separated by commas.

False Named False True

[-CatalogFile <CatalogueFile>]

Specifies the file you want to get versions for. False Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

141 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of versions of file named "Payroll_Marketing.html". The file object is obtained with Find-VBRTapeCatalog and piped down.

Find-VBRTapeCatalog -Name "Payroll_Marketing.html" | Find-VBRTapeCatalogVersion

Example 2 This command looks for versions of file represented by $file variable. The file object is obtained with Find-VBRTapeCatalog, assigned to the variable and piped down.

$file | Find-VBRTapeCatalogueVersion

142 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Find-VBRvCloudEntity Short Description Looks for vCloud Director entities.

Applies to Version: 7.0

Platform: VMware

Syntax

Find-VBRvCloudEntity [-Server <CHost[]>][-Full][-Name <string[]>] [<CommonParameters>]

Find-VBRvCloudEntity [-Server <CHost[]>][-VApp][-Name <string[]>] [<CommonParameters>]

Find-VBRvCloudEntity [-Server <CHost[]>][-Template][-Name <string[]>] [<CommonParameters>]

Find-VBRvCloudEntity [-Server <CHost[]>][-VmTemplate][-Name <string[]>] [<CommonParameters>]

Find-VBRvCloudEntity [-Server <CHost[]>][-OrganizationVdc][-Name <string[]>] [<CommonParameters>]

Find-VBRvCloudEntity [-Server <CHost[]>][-StorageProfile][-Name <string[]>] [<CommonParameters>]

Find-VBRvCloudEntity [-Server <CHost[]>][-Datastore][-Name <string[]>] [<CommonParameters>]

Find-VBRvCloudEntity [-Server <CHost[]>][-Vc][-Name <string[]>] [<CommonParameters>]

Detailed Description This cmdlet looks for a certain entity of vCloud Director.

You can get the whole list of vCloud entities, or the list of specified entities (i.e. vApps), or narrow down the output by filtering by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Server <CHost[]>]

Specifies the server(s) where the entity to look for is located.

You can assign multiple servers to this object.

False Named

True (ByValue,

ByPropertyName)

False

[-Full] View results as the list of all vCloud entities. False Named False False

[-VApp] View results as vApps. False Named False False

143 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

[-Template] View results as vApp templates. False Named False False

[-VmTemplate] View results as VM templates. False Named False False

[-Organization Vdc]

View results as Organization vDCs.

False Named False False

[-StorageProfile] View results as storage profiles. False Named False False

[-Datastore] View results as datastores. False Named False False

[-Vc] View results as vClouds. False Named False False

-Name <string[]>]

Specifies the name(s) of the entity.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example 1 This command looks for all vCloud entities registered on the server represented by $server variable. The server object is obtained with Get-VBRServer and assigned to the variable beforehand.

Find-VBRvCloudEntity -Server $server -Full

Example 2 This command looks for the vCloud entities registered on the server with 172.16.1.13 IP address. The server object is obtained with Get-VBRServer and piped down. The output is filtered by name containing "SQL".

Get-VBRServer -Name "172.16.1.13" | Find-VBRvCloudEntity -Name *SQL*

Example 3 This command looks for the vApps registered on the server named "vCloud Server". The server object is obtained with Get-VBRServer and piped down.

Get-VBRServer -Name "vCloud Server" | Find-VBRvCloudEntity -VApp

Example 4 This command looks for the datastore named "Datastore 04" registered on the server represented by $server variable. The server object is obtained with Get-VBRServer and assigned to the variable beforehand.

Find-VBRvCloudEntity -Server $server -Datastore -Name "Datastore 04"

144 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Find-VBRViDatastore Short Description Looks for VMware datastores connected to the specified ESX(i) host.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Find-VBRViDatastore -Server <CHost> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all VMware datastores connected to the specified ESX(i) host.

You can get the list of all VMware datastores on the specified ESX(i) host or look for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Server <CHost>

Specifies the ESX(i) host to which the datastores you are looking for are connected.

True Named

True (ByValue,

ByPropertyName)

False

[-Name <String[]>]

Specifies the name of the datastore you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

145 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of datastores connected to the ESXi hosts. The servers are obtained with Get-VBRServer, sorted by "Type" and piped down.

Get-VBRServer -Type ESXi | Find-VBRViDatastore

Example 2 This command looks for the datastores connected to the ESXi host named "ESXiHost". The server is obtained with Get-VBRServer and piped down. The list of datastores is narrowed down to the datastore named "MSExchange" and datastores with names starting with "LocalStore_0".

Get-VBRServer -Name "ESXiHost" | Find-VBRViDatastore -Name "MSExchange", "LocalStore_0*"

146 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Find-VBRViEntity Short Description Looks for VMware entities.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Find-VBRViEntity [-Server <CHost[]>] [-HostsAndClusters] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Find-VBRViEntity [-Server <CHost[]>] [-VMsAndTemplates] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Find-VBRViEntity [-Server <CHost[]>] [-DatastoresAndVMs] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Find-VBRViEntity [-Server <CHost[]>] [-HostsAndDatastores] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Find-VBRViEntity [-Server <CHost[]>] [-ResourcePools] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Find-VBRViEntity [-Server <CHost[]>] [-Servers] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all VMware objects connected to the specified ESX(i) host.

You can get the list of all VMware entities registered in your virtual VMware environment or narrow down the search results to specific objects, or look for instances directly by name.

147 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Server <CHost[]>]

Specifies the ESX(i) host you want to look for entities on. False Named

True (ByValue,

ByPropertyName)

False

[-HostsAnd Clusters]

Views results as hosts and clusters. False Named False False

[-VMsAnd Templates]

Views results as VMs and templates. False Named False False

[-Datastores AndVMs]

Views results as datastores and VMs. False Named False False

[-HostsAnd Datastores]

Views results as hosts and datastores. False Named False False

[-ResourcePools] Views results as resource pools. False Named False False

[-Servers] Views results as servers. False Named False False

[-Name <String[]>]

Specifies the name of the entity you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named True True

<CommonParameters>

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

Example 1 This command looks for the list of hosts and clusters connected to the ESXi hosts named "ESXiHost 01" and "ESXiHost 02". The servers are obtained with Get-VBRServer and piped down.

Get-VBRServer -Name "ESXiHost 01", "ESXiHost 02" | Find-VBRViEntity -HostsAndClusters

Example 2 This command looks for the list of resource pools connected to the ESXi host named "ESXiHost". The server is obtained with Get-VBRServer and piped down. The list of resource pools is narrowed down to the resource pools with names starting with "Veeam".

Get-VBRServer -Name "ESXiHost" | Find-VBRViEntity -ResourcePools -Name Veeam*

148 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Find-VBRViFolder Short Description Looks for list of folders on the specified ESX(i) host .

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Find-VBRViFolder -Server <CHost> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of folders on the specified ESX(i) host.

You can get the list of all folders on the specified ESX(i) host or look for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Server <CHost> Specifies the ESX(i) host you want to look for folders on. True Named

True (ByValue,

ByPropertyName)

False

[-Name <String[]>]

Specifies the name of the folder you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

149 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of folders located on the ESXi hosts. The servers are obtained with Get-VBRServer, sorted by "Type" and piped down.

Get-VBRServer -Type ESXi | Find-VBRViFolder

Example 2 This command looks for the datastores connected to the ESXi host named "ESXiHost". The server is obtained with Get-VBRServer and piped down. The list of datastores is narrowed down to the datastore named "MSExchange" and datastores with names starting with "LocalStore_0".

Get-VBRServer -Name "ESXiHost" | Find-VBRViFolder -Name "MSExchange", LocalStore_0*

150 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Find-VBRViResourcePool Short Description Looks for resource pools on the specified ESX(i) host.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Find-VBRViResourcePool -Server <CHost> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of resource pools on the specified ESX(i) host.

You can get the list of all resource pools on the specified ESX(i) host or look for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Server <CHost> Specifies the ESX(i) host you want to look for resource pools on.

True Named

True (ByValue,

ByPropertyName)

False

[-Name <String[]>]

Specifies the name of the resource pool you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False False

<CommonParameters>

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

151 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of resource pools located on the ESXi hosts. The servers objects are obtained with Get-VBRServer, sorted by "Type" and piped down.

Get-VBRServer -Type ESXi | Find-VBRViResourcePool

Example 2 This command looks for the resource pool named "ResourcePool_05" connected to the ESXi host named "ESXiHost". The server object is obtained with Get-VBRServer and piped down.

Get-VBRServer -Name "ESXiHost" | Find-VBRViResourcePool -Name "ResourcePool_05"

152 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Find-VSBHvVirtualLab Short Description Looks for the virtual labs created on the specified Hyper-V host.

Applies to Version: 7.0

Platform: Hyper-V

For VMware, run Find-VSBVirtualLab.

Syntax

Find-VSBVirtualLab [-Server] <CHost> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all virtual labs created on the specified Hyper-V host.

A virtual lab is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

You can get the list of all virtual labs on the specified ESX(i) host or look for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Server] <CHost>

Specifies the server where virtual labs are registered. True 1

True (ByValue,

ByPropertyName)

False

-Name <String[]>

Specifies the name of the virtual lab or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

153 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of all virtual labs created on the Hyper-V server named "Hyper-V Host". The server object is obtained with Get-VBRServer and piped down.

Get-VBRServer -Name "Hyper-V Host" | Find-VSBHvVirtualLab

Example 2 This command looks for the virtual labs with names starting with "Hv" on the server represented by the $server variable. The server object is obtained with Get-VBRServer and assigned to the variable beforehand.

Find-VSBHvVirtualLab -Server $server -Name Hv*

154 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Find-VSBVirtualLab Short Description Looks for virtual labs created on the specified ESX(i) host.

Applies to Version: 7.0 and earlier

Platform: VMware

For Hyper-V, run Find-VSBHvVirtualLab.

Syntax

Find-VSBVirtualLab [-Server] <CHost> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all virtual labs created on the specified ESX(i) host.

A virtual lab is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

You can get the list of all VMware virtual labs on the specified ESX(i) host or look for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Server] <CHost>

Specifies the server you want to look for virtual labs on. True 1

True (ByValue,

ByPropertyName)

False

[-Name <String[]>]

Specifies the name of the resource pool you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False False

<CommonParameters>

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

155 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of all virtual labs located on the ESXi hosts. The servers are obtained with Get-VBRServer, sorted by "Type" and piped down.

Get-VBRServer -Type ESXi | Find-VSBVirtualLab

Example 2 This command looks for the virtual lab named "MailServer_VLab" connected to the ESXi host named "ESXiHost". The server is obtained with Get-VBRServer and piped down.

Get-VBRServer -Name "ESXiHost" | Find-VSBVirtualLab -Name "MailServer_VLab"

156 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-HP3Snapshot Short Description Returns a SAN snapshot object.

Applies to Version: 7.0

Platform: VMware

HP SAN storage system: HP 3PAR StoreServ

Syntax

Get-HP3Snapshot [-Name <string[]>][<CommonParameters>]

-OR-

Get-HP3Snapshot [-Name <string[]>] [-Volume <CSanVolume[]>][<CommonParameters>]

Detailed Description This cmdlet returns a SAN snapshot object.

You can get the list of all SAN snapshots in your storage system or narrow down the output by the snapshot name or a specific volume.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <string[]>]

Specifies the name of the snapshot you want to get.

You can specify multiple names separated by commas.

False Named False True

[-Volume <CSanVolume[]>]

Specifies the volume(s) for which you want to get the snapshots.

You can assign multiple volumes to this object.

False Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

157 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of all snapshots.

Get-HP3Snapshot

Example 2 This command looks for snapshots of the specific volumes. The list of volumes is obtained with Get-HP3Volume, the first three volumes are selected and piped down.

Get-HP3Volume | Select -First 3 | Get-HP3Snapshot

158 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-HP3Storage Short Description Returns a SAN storage object.

Applies to Version: 7.0

Platform: VMware

HP SAN storage system: HP 3PAR StoreServ

Syntax

Get-HP3Storage [-Name <string[]>][<CommonParameters>]

Detailed Description This cmdlet returns SAN storage object.

You can get the list of all SAN snapshots in your storage system or narrow down the output by the storage name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <string[]>]

Specifies the name of the storage you want to get.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example This command looks for the list of storages with names starting with "HP Store".

Get-HP3Storage -Name "HP Store*"

159 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-HP3Volume Short Description Returns a SAN volume object.

Applies to Version: 7.0

Platform: VMware

HP SAN storage system: HP 3PAR StoreServ

Syntax

Get-HP3Volume -Storage <CHp3PARHost[]> [-Name <string[]>][<CommonParameters>]

Detailed Description This cmdlet returns SAN volume object.

You can get the list of all SAN volumes in your storage system, narrow down the output by the volume name or specify a cluster or a storage within which you want to look for the volumes.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Storage <CHp3PARHost[]>

Specifies the storage(s) within which you want to look for the volumes.

You can assign multiple storages to this object.

True Named

True (ByValue,

ByPropertyName)

False

[-Name <string[]>]

Specifies the name of the volume you want to get.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example This command looks for the volume named "HP Store" in the storage named "HP Store 01".

The storage object is obtained with Get-HP3Storage and piped down.

Get-HP3Storage -Name "HP Store 01" | Get-HP3Volume -Name "HP Store*"

160 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-HP4Cluster Short Description Returns a SAN cluster object.

Applies to Version: 7.0

Platform: VMware

HP SAN storage systems: HP LeftHand P4000, HP StoreVirtual VSA

Syntax

Get-HP4Cluster -Storage <CHpP4Group[]> [-Name <string[]>][<CommonParameters>]

Detailed Description This cmdlet returns SAN cluster object.

You can get the list of all SAN clusters in your storage system, or narrow down the output by the cluster name or a specific storage.

Alias Get-VBRHPCluster

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Storage <CHpP4Group[]>

Specifies the storage within which you want to look for the clusters.

You can assign multiple storages to this object.

True Named

True (ByValue,

ByPropertyName)

False

[-Name <string[]>]

Specifies the name of the cluster you want to get.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

161 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example This command looks for the list of clusters in the storage named "HP Store 01".

The storage object is obtained with Get-HP4Storage and piped down.

Get-HP4Storage -Name "HP Store 01" | Get-HP4Cluster

162 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-HP4Snapshot Short Description Returns a SAN snapshot object.

Applies to Version: 7.0

Platform: VMware

HP SAN storage systems: HP LeftHand P4000, HP StoreVirtual VSA

Syntax

Get-HP4Snapshot [-Name <string[]>][<CommonParameters>]

-OR-

Get-HP4Snapshot [-Name <string[]>] [-Volume <CSanVolume[]>][<CommonParameters>]

Detailed Description This cmdlet returns SAN snapshot object.

You can get the list of all SAN snapshots in your storage system, or narrow down the output by the snapshot name or a specific volume.

Alias Get-VBRHPSnapshot

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <string[]>]

Specifies the name of the snapshot you want to get.

You can specify multiple names separated by commas.

False Named False True

[-Volume <CSanVolume[]>]

Specifies the volume(s) you want to get the snapshots of.

You can assign multiple volumes to this object.

False Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

163 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of all snapshots.

Get-HP4Snapshot

Example 2 This command looks for snapshots of the specific volumes. The list of volumes is obtained with Get-HP4Volume, the first three volumes are selected and piped down.

Get-HP4Volume | Select -First 3 | Get-HP4Snapshot

164 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-HP4Storage Short Description Returns a SAN storage object.

Applies to Version: 7.0

Platform: VMware

HP SAN storage systems: HP LeftHand P4000, HP StoreVirtual VSA

Syntax

Get-HP4Storage [-Name <string[]>] [<CommonParameters>]

Detailed Description This cmdlet returns a SAN storage object.

You can get the list of all SAN snapshots in your storage system, or narrow down the output by the storage name.

Alias Get-VBRHPStorage

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <string[]>]

Specifies the name of the storage you want to get.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example This command looks for the list of storages with names starting with "HP Store".

Get-HP4Storage -Name "HP Store*"

165 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-HP4Volume Short Description Returns a SAN volume object.

Applies to Version: 7.0

Platform: VMware

HP SAN storage systems: HP LeftHand P4000, HP StoreVirtual VSA

Syntax

Get-HP4Volume [-Name <string[]>] [<CommonParameters>]

-OR-

Get-HP4Volume -Cluster <CHpP4kCluster[]> [-Name <string[]>] [<CommonParameters>]

-OR-

Get-HP4Volume -Storage <CHpP4Group[]> [-Name <string[]>] [<CommonParameters>]

Detailed Description This cmdlet returns a SAN volume object.

You can get the list of all SAN volumes in your storage system,narrow down the output by the volume name, or specify a cluster or a storage within which you want to look for the volumes.

Alias Get-VBRHPVolume

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <string[]>]

Specifies the name of the volume you want to get.

You can specify multiple names separated by commas.

False Named False True

-Cluster <CHpP4kCluster[]>

Specifies the cluster within which you want to look for the volumes.

You can assign multiple clusters to this object.

True Named

True (ByValue,

ByPropertyName)

False

-Storage <CHpP4Group[]>

Specifies the storage within which you want to look for the volumes.

You can assign multiple

True Named

True (ByValue,

ByPropertyName)

False

166 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

storages to this object.

<CommonParameters>

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

Example 1 This command looks for the list of volumes with names starting with "HP Store" within the cluster named "Cluster 1".

The cluster object is obtained with Get-HP4Cluster and piped down.

Get-HP4Cluster -Name "Cluster 1" | Get-HP4Volume -Name "HP Store*"

Example 2 This command looks for all volumes in the storage named "HP Store 01".

The storage object is obtained with Get-HP4Storage and piped down.

Get-HP4Storage -Name "HP Store 01" | Get-HP4Volume

167 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRBackup Short Description Returns the list of backups.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Get-VBRBackup [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all backups stored in the Veeam Backup & Replication database.

By default, the backup files are named by backup jobs names.

You can get the list of all backup files or look for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String[]>]

Specifies the name of the backup file you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False False

<CommonParameters>

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

Example 1 This command looks for all backups stored in the database.

Get-VBRBackup

Example 2 This command looks for the backups named "vCloud Webservices Backup" and "Exchange Backup_imported".

Get-VBRBackup -Name "vCloud Webservices Backup", "Exchange Backup_imported"

168 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRBackupRepository Short Description Returns the list of all backup repositories.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Get-VBRBackupRepository [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all backup repositories managed by Veeam Backup & Replication.

You can get the list of all backup repositories or look for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String[]>]

Specifies the name of the backup repository you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example 1 This command looks for the list of all backup repositories managed by Veeam Backup & Replication.

Get-VBRBackupRepository

Example 2 This command looks for the backup repositories named "Backups Vol2" and for backup repositories with names starting with "Local".

Get-VBRBackupRepository -Name "Backups Vol2", "*Local"

169 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRBackupSession Short Description Returns a list of backup sessions that have been run.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Get-VBRBackupSession [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all backup, replication and backup copy sessions that have been run.

You can get the list of all backup, replication and backup copy sessions, or look for instances directly by name.

Run Get-VBRTaskSession to get the list of all tasks performed during the specific backup, replication or backup copy session.

Run Get-VSBSession to get the list of SureBackup sessions that have been run.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String[]>]

Specifies the name of the backup session you want to get, or search conditions.

The name of the session is a name of the job.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

170 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of all backup sessions.

Get-VBRBackupSession

Example 2 This command looks for all backup copy sessions.

Get-VBRBackupSession -Name *Copy Job*

171 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRCredentials Short Description Returnes a list of credentials records.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Get-VBRCredentials [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of credentials managed by Veeam Backup & Replication.

You can get the list of all credentials or look for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <string[]>]

Specifies the user name or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example This command gets the list of credentials records containing "SQL" in the account name.

Get-VBRCredentials -Name *SQL*

172 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRFilesInRestorePoint Short Description Returns a list of all files for the selected restore point.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Get-VBRFilesInRestorePoint [-RestorePoint] <COib> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all files for the selected restore point.

You can get the list of all files in a selected restore point or look for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-RestorePoint] <COib>

Specifies the restore points for which you want to get the list of files.

True 1

True (ByValue,

ByPropertyName)

False

[-Name <String[]>]

Specifies the name of the file(s) you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example This command gets the list of files in the last restore point of the backup named "Webservices Backup". The restore point is obtained with Get-VBRRestorePoint and piped down.

Get-VBRRestorePoint -Name "Webservices Backup" | Select -Last 1 | Get-VBRFilesInRestorePoint

173 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRHvProxy Short Description Returns a list of Hyper-V backup proxies.

Applies to Version: 7.0 and earlier

Platform: Hyper-V

For VMware, run Get-VBRViProxy.

Syntax

Get-VBRHvProxy [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all Hyper-V backup proxies managed by Veeam Backup & Replication.

You can get the list of all Hyper-V backup proxies or look for instances directly by name.

Run Get-VBRJobProxy to get the list of proxies assigned to a specific job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String[]>]

Specifies the name of the Hyper-V proxy server you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example 1 This command looks for the list of all Hyper-V proxies.

Get-VBRHvProxy

Example 2 This command gets the Hyper-V proxies with names containing "Local".

Get-VBRHvProxy -Name *Local*

174 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRInstantRecovery Short Description Returns the instant VM recovery session running at the moment.

Applies to Version: 7.0

Platform: VMware

Syntax

Get-VBRInstantRecovery [-Full] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns the instant VM recovery session running at the moment.

You can get the information about the instant recovery sessions in short or detailed view.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Full] Specifies the information on sessions and history returned in detailed view.

False Named False False

<CommonParameters>

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

Example This command gets the list of the instant recovery sessions in detailed view.

Get-VBRInstantRecovery -Full

175 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRJob Short Description Returns a list of created jobs.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Get-VBRJob [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of jobs stored in Veeam Backup & Replication database.

With this cmdlet, you can get the following jobs:

• Backup Jobs

• Replication Jobs

• Backup Copy Jobs

• VM Copy Jobs

• File Copy Jobs You can get the list of all jobs or look for instances directly by name.

Run Get-VBRBackupSession or Get-VBRTaskSession to get the information on job session or session tasks.

Run Get-VBRReplica to get the list of replication jobs.

Run Get-VBRTapeJob to get the list of tape jobs.

Run Get-VSBJob to get the list of SureBackup jobs.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String[]>]

Specifies the name of the job you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

176 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example This command gets the list of backup copy jobs.

Get-VBRJob -Name *Backup Copy Job*

177 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRJobObject Short Description Returns the list of objects in the specified job.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Get-VBRJobObject [-Job] <CBackupJob> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of objects in the specified job. The job objects are VMs, VM containers, datastores or resource pools.

You can run this cmdlet for backup, replication, backup copy, VM copy or file copy jobs.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CBackupJob>

Specifies the job you want to get the objects of. True 1

True (ByValue,

ByPropertyName)

False

[-Name <String[]>]

Specifies the name of the job object (i.e. a VM) you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example This command looks for the SharePoint VMs in the job named "VM Copy Job 01". The job is obtained with Get-VBRJob and piped down.

Get-VBRJob -Name "VM Copy Job 01" | Get-VBRJobObject -Name *SharePoint*

178 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRJobObjectVssOptions Short Description Returns a list of VSS settings set for specific VM in job.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Get-VBRJobObjectVssOptions [-ObjectInJob] <CObjectInJob> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of VSS settings set for specific VM in the job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-ObjectInJob] <CObjectInJob>

Specifies the VMs or VM containers for which you want to get VSS parameters.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command looks for the VSS settings of the VM included in job named "Exchange Backup Copy". The VM is obtained with Get-VBRJobObject and piped down. The job is obtained with Get-VBRJob and assigned to the $"Exchange Backup Copy" variable beforehand.

Get-VBRJobObject -Job $"Exchange Backup Copy" | Get-VBRJobObjectVssOptions

179 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRJobOptions Short Description Returns a list of job settings.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Get-VBRJobOptions [-Job] <CBackupJob[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of job settings for a selected job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CBackupJob[]>

Specifies the job you want to get the options of. True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

180 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRJobProxy Short Description Returns the list of proxy servers assigned to a selected job.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Get-VBRJobProxy -Job <CBackupJob[]> [-Target] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns the list of source or target proxy servers assigned to a selected job. You will see the notification if the automatic proxy selection is enabled.

Run Get-VBRViProxy or Get-VBRHvProxy to get a list of all VMware or Hyper-V proxies managed by Veeam Backup & Replication.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job for which you want to get the list proxies.

You can assign multiple backup jobs to this object.

True Named

True (ByValue,

ByPropertyName)

False

[-Target]

If set, the command returns the list of target proxy servers. If omitted, the command returns the list of source proxy servers.

False Named False False

<CommonParameters>

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

181 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of target proxies assigned to the job named "Backup Job 01". The job object is piped to the cmdlet.

Get-VBRJob -Name "Backup Job 01" | Get-VBRJobProxy -Target

Example 2 This command looks for the list of source proxies assigned to the job named "Backup Job 01".The job object is piped to the cmdlet.

Get-VBRJob -Name "Backup Job 01" | Get-VBRJobProxy

182 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRJobScheduleOptions Short Description Returns a list of scheduling settings for a selected job.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Get-VBRJobScheduleOptions [-Job] <CBackupJob[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of job scheduling settings for a selected job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CBackupJob[]>

Specifies the job you want to get the scheduling options of. True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

183 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRJobVSSOptions Short Description Returns a list of VSS settings for a selected job.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Get-VBRJobVSSOptions [-Job] <CBackupJob[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of VSS settings for a selected job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CBackupJob[]>

Specifies the job you want to get the VSS options of. True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

184 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRLocalhost Short Description Returns returns the local server Veeam Backup & Replication is installed on.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Get-VBRLocalhost [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns the local server Veeam Backup & Replication is installed on.

<CommonParameters>

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

Example This command looks for the local Veeam Backup & Replication server.

Get-VBRLocalhost

185 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRReplica Short Description Returns the list of replication jobs.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Get-VBRReplica [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns the list of replication jobs stored in Veeam Backup & Replication database.

Run Get-VBRJob to get the list of backup, replication and copy jobs.

Run Get-VSBJob to get the list of SureBackup jobs.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String[]>]

Specifies the name of the replication job you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example 1 This command looks for all replication jobs stored in the database.

Get-VBRReplica

Example 2 This command looks for the replication jobs with names starting with "DC".

Get-VBRReplica -Name DC*

186 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRRestorePoint Short Description Returns the list of restore points.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Get-VBRRestorePoint [[-Backup] <CBackup[]>] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of restore points stored in Veeam Backup & Replication database.

You can get the list of all restore points, or get the restore points for a specific backup or for a specific VM.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[[-Backup] <CBackup[]>]

Specifies the backup for which you want to get the restore points.

You can assign multiple backups to this object.

False 1

True (ByValue,

ByPropertyName)

False

[-Name <String[]>]

Specifies the name of the VM for which you want to get the restore points, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

187 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the restore points of the VM named "MSExchange02" in the backup named "MSExchange Backup". The backup is obtained with Get-VBRBackup and piped down.

Get-VBRBackup -Name "MSExchange Backup" | Get-VBRRestorePoint -Name *MSExchange02*

Example 2 This command looks for the restore points of the backup represented by the variable $backup. The backup to look the restore points in is obtained with Get-VBRBackup and assigned to the variable beforehand.

Get-VBRRestorePoint -Backup $backup

188 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRRestoreSession Short Description Returns the list of restore sessions.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Get-VBRRestoreSession [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all restore sessions stored in Veeam Backup & Replication database.

You can get the list of all restore sessions or get the restore sessions of a specific VM or VM(s).

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String[]>]

Specifies the name of the VM you want to get the restore session of, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example 1 This command looks for all restore sessions stored in the database.

Get-VBRRestoreSession

Example 2 This command looks for the restore sessions of the VM named "Hv_DNS".

Get-VBRRestoreSession -Name "Hv_DNS"

189 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRServer Short Description This cmdlet returns a list of all servers and hosts connected to Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Get-VBRServer [-Type <CDBHost+EType>] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all servers and hosts connected to Veeam Backup & Replication.

You can get the list of all servers or narrow down the output to the servers of specific type, or search for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Type <CDBHost+EType>]>

Specifies the server type:

• BackupServer

• ESX

• ESXi

• HvCluster

• HvServer

• Linux

• Local

• SanHost

• Scvmm

• SmbCluster

• SmbServer

• VC

• VcdSystem

• Windows

False Named False False

[-Name <String[]>]

Specifies the name of the server you want to get, or search conditions.

False Named False True

190 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

You can specify multiple names separated by commas.

<CommonParameters>

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

Example 1 This command looks for the servers named "Active_Directory".

Get-VBRServer -Name "Active_Directory"

Example 2 This command looks for the list of Hyper-V servers.

Get-VBRServer -Type HvServer

191 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRTapeBackup Short Description Returns the list of backups recorded to tape.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Get-VBRTapeBackup [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns the list of backups recorded to tape.

Run Get-VBRTapeJob to get the list of the copy to tape jobs.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <string[]>]

Specifies the name(s) of the backup or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example 1 This command looks for all backups recorded to tapes.

Get-VBRTapeBackup

Example 2 This command looks for backups with names containing "VM01".

Get-VBRTapeBackup -Name *VM01*

192 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRTapeDrive Short Description Returns the list of tape drives.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Get-VBRTapeDrive [-Library <TapeLibrary>] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns the list of tape recording drives. You can also view the model name, the state of the drive and whether it is enabled or disabled.

You can get the whole list of drives throughout all libraries, or the list of drives within specified library, or search for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Library <TapeLibrary>]

Specifies the tape medium library that the tape drive belongs to.

False Named

True (ByValue,

ByPropertyName)

False

[-Name <string[]>]

Specifies the tape drive name(s), or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example The following command gets a tape drive named "TapeDrive" in the library named "HP01".

Get-VBRTapeLibrary -Name "HP01" | Get-VBRTapeDrive –Name "TapeDrive"

193 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRTapeJob Short Description Returns the list of copy to tape jobs.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Get-VBRTapeJob [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns the list of copy to tape jobs.

Run Get-VBRTapeBackup to get the list of backups recorded to tape.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <string[]>]

Specifies the name(s) of the tape job, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example The following command looks for a copy to tape job named "File2Tape Backup Job".

Get-VBRTapeJob -Name "File2Tape Backup Job"

194 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRTapeLibrary Short Description Returns a list of tape libraries.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Get-VBRTapeLibrary [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of tape media libraries visible via Veeam Backup & Replication.

You can get the list of all tape libraries, or search for instances directly by name.

Run Start-VBRTapeInventory to rescan the list of tape entities managed by Veeam Backup & Replication.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <string[]>]

Specifies the name of the tape media library, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example The following command gets a list of tape media libraries filtering the output by name starting with "HP".

Get-VBRTapeLibrary -Name HP*

195 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRTapeMediaPool Short Description Returns a list of tape media pools.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Get-VBRTapeMediaPool [-Library <TapeLibrary>] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of tape media pools managed by Veeam Backup & Replication.

Media pools are logical groups of tapes within a tape media library which may have predefined or custom names based on purpose, recorded data, and so on.

You can get the list of media pools within specified library, or search for instances directly by name.

Run Start-VBRTapeInventory to rescan the list of tape entities managed by Veeam Backup & Replication.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Library <TapeLibrary>]

Specifies the library that the media pool belongs to. False Named

True (ByValue,

ByPropertyName)

False

[-Name <string[]>]

Specifies the name(s) of the tape media library the media pool belongs to.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

196 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of media pools in the HPLib_01 library. The library object is obtained with Get-VBRTapeLibrary and piped down.

Get-VBRTapeLibrary -Name HPLib_01 | Get-VBRTapeMediaPool

Example 2 This command looks for the media pool named "Incremental Backups". The library object is obtained with Get-VBRTapeLibrary and assigned to $lib variable beforehand.

Get-VBRTapeMediaPool -Library $lib -Name "Incremental Backups'

197 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRTapeMedium Short Description Returns a list of tapes.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Get-VBRTapeMedium [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Get-VBRTapeMedium [-Free] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Get-VBRTapeMedium [-Unrecognized] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Get-VBRTapeMedium [-Offline] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Get-VBRTapeMedium [-Online] [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Get-VBRTapeMedium -Backup <CBackup> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Get-VBRTapeMedium -MediaPool <MediaPool> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Get-VBRTapeMedium -Library <TapeLibrary> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of tapes managed by Veeam Backup & Replication.

You can get the full list of tapes or narrow down the output by name, by type (Free, Unrecognized,Offline, Online), by media pool or by tape library, or look for tapes containing a specific backup.

Run Start-VBRTapeInventory to rescan the list of tape entities managed by Veeam Backup & Replication.

198 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String[]>]

Specifies the name of tape you want to get.

You can specify multiple names separated by commas.

False Named False True

[-Free] Narrows down your search conditions to the Free tapes. False Named False False

[-Unrecognized] Narrows down your search conditions to the Unrecognized tapes.

False Named False False

[-Offline] Narrows down your search conditions to the Offline tapes.

False Named False False

[-Online] Narrows down your search conditions to the Online tapes.

False Named False False

-Backup <CBackup>

Specifies the backup you want to get. You will get a tape or a list of tapes where the backup data is stored.

True Named

True (ByValue,

ByPropertyName)

False

-MediaPool <MediaPool>

Specifies the media pool within which you want to look for the tapes.

True Named

True (ByValue,

ByPropertyName)

False

-Library <TapeLibrary>

Specifies the tape library within which you want to look for the tapes.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

199 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 The following command gets a tape named "00110001".

Get-VBRTapeMedium -Name "00110001"

Example 2 The following command gets a tape with the barcode "00233400".

Get-VBRTapeMedium | Where-Object {$_.barcode -eq "00233400"}

Example 3 This command looks for the list of tapes belonging to the media pool named "Incremental Backups". The media pool is obtained with Get-VBRTapeMediaPool and piped down.

Get-VBRTapeMediaPool -Name "Incremental Backups" | Get-VBRTapeMedium

200 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRTaskSession Short Description Returns list of tasks performed during a specified session.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Get-VBRTaskSession [-Session] <CBackupSession> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all tasks performed during the specified session. You can get the tasks for backup, replication and backup copy sessions.

Run Get-VSBTaskSession to get the tasks for SureBackup session.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Session] <CBackupSession>

Specifies the session you want to get. True 1

True (ByValue,

ByPropertyName)

False

[-Name <String[]>]

Specifies the name of the session you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example This command gets the list of tasks for backup session named "Oracle Backup". The backup session is obtained with Get-VBRBackupSession and piped down.

Get-VBRBackupSession -Name "Oracle Backup" | Get-VBRTaskSession

201 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRViProxy Short Description Returns VMware backup proxies.

Applies to Version: 7.0 and earlier

Platform: VMware

For Hyper-V, run Get-VBRHvProxy.

Syntax

Get-VBRViProxy [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all VMware backup proxies managed by Veeam Backup & Replication.

Run Get-VBRJobProxy to get the list of proxies assigned to a specific job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String[]>]

Specifies the name of the VMware proxy you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example 1 This command looks for the list of all VMware proxies.

Get-VBRViProxy

Example 2 This command looks for the proxy named "LocalProxy".

Get-VBRViProxy -Name "LocalProxy"

202 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRToolkitDocumentation Short Description Opens Veeam Backup & Replication Help.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Get-VBRToolkitDocumentation

Detailed Description This cmdlet opens Veeam Backup & Replication Help in a separate window.

203 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRWANAccelerator Short Description Returnes WAN accelerators.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Note WAN optimization is available only in Veeam Backup & Replication Enterprise Plus Edition.

Syntax

Get-VBRWANAccelerator [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet gets the list of WAN accelerators managed by Veeam Backup & Replication.

WAN accelerator is an architecture component that optimizes file transfer via WAN by means of data deduplication. The role of a WAN accelerator can be assigned to a dedicated Windows-based machine (physical or virtual). For best performance you should set a WAN accelerator on both source and target sides.

You can get the list of all WAN accelerators, or search for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <string[]>]

Specifies the name(s) of the WAN accelerator, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

204 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of all WAN accelerators.

Get-VBRWANAccelerator

Example 2 This command looks for WAN accelerators with the names starting with "WAN".

Get-VBRWANAccelerator -Name WAN*

205 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VSBApplicationGroup Short Description Returns application groups.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Get-VSBApplicationGroup [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns the list of all created application groups.

An application group is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database.To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group. The VMs in the application group are started first to ensure the proper testing environment for the primary VM.

You can get the list of all application groups, or search for instances directly by name.

Run Add-VSBViApplicationGroup or Add-VSBHvApplicationGroup to add a new VMware or Hyper-V application group.

Run Add-VSBJob or Add-VSBHvJob to add a new VMware or Hyper-V SureBackup job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String[]>]

Specifies the name of the application group you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

206 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of all application groups.

Get-VSBApplicationGroup

Example 2 This command looks for the application group named "MailServer Appgroup".

Get-VSBApplicationGroup -Name "MailServer Appgroup"

207 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VSBHvVirtualLab Short Description Returns a list of Hyper-V virtual labs.

Applies to Version: 7.0

Platform: Hyper-V

For VMware, run Get-VSBVirtualLab.

Syntax

Get-VSBVirtualLab [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns all Hyper-V virtual labs that are connected to Veeam Backup & Replication console.

A virtual lab is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database.To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

Please note, that when you add a new host to your Veeam Backup & Replication console, the virtual labs that are registered on it are not added automatically. Run Connect-VSBHvVirtualLab to add the virtual labs to your Veeam Backup & Replication console.

You can get the list of all virtual labs, or search for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String[]>]

Specifies the name(s) of the virtual lab, or search conditions.

You can specify multiple names separated by commas.

False 1 False True

<CommonParameters>

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

208 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of all virtual labs created or connected to Veeam Backup & Replication.

Get-VSBHvVirtualLab

Example 2 This command looks for the list of virtual labs with names starting with "Exchange".

Get-VSBHvVirtualLab -Name Exchange*

209 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VSBJob Short Description Returns a list of SureBackup jobs.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Get-VSBJob [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all created SureBackup jobs.

SureBackup is a Veeam recovery verification technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

You can get the list of all SureBackup jobs or look for specific jobs directly by name.

Run Get-VSBSession or Get-VSBTaskSession to get the information on SureBackup session or session tasks.

Run Get-VBRJob to look for backup, replication or copy jobs.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String[]>]

Specifies the name of the SureBackup job you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

210 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of all created SureBackup jobs.

Get-VSBJob

Example 2 This command looks for the SureBackup jobs named "SureJob 01" and "SureJob 02".

Get-VSBJob -Name "SureJob 01", "SureJob 02"

211 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VSBJobOptions Short Description Returns a list of settings of a selected SureBackup job.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Get-VSBJobOptions [-Job] <CSbJob> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of job settings for the specified SureBackup job.

Run Get-VSBJobScheduleOptions to get the list of SureBackup job scheduling options.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CSbJob>

Specifies the SureBackup job you want to get the settings of. True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example 1 This command looks for the list of job settings for the SureBackup job named "SureJob 02". The SureBackup job is obtained with Get-VSBJob and piped down.

Get-VSBJob -Name "SureJob 02" | Get-VSBJobOptions

Example 2 This command looks for the list of job settings for the SureBackup job represented by the $SureJob variable. The SureBackup job is obtained with Get-VSBJob and assigned to the variable beforehand.

Get-VSBJobOptions -Job $SureJob

212 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VSBJobScheduleOptions Short Description Returns a list of scheduling settings of a selected SureBackup job.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Get-VSBJobScheduleOptions [-Job] <CSbJob> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of job scheduling options for the specified SureBackup job.

Run Get-VSBJobOptions to get the list of SureBackup job settings.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CSbJob>

Specifies the SureBackup job you want to get the scheduling settings of.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example 1 This command looks for the list of job settings for the SureBackup job named "SureJob 02". The SureBackup job is obtained with Get-VSBJob and piped down.

Get-VSBJob -Name "SureJob 02" | Get-VSBJobScheduleOptions

Example 2 This command looks for the list of job settings for the SureBackup job represented by the $SureJob variable. The SureBackup job is obtained with Get-VSBJob and assigned to the variable beforehand.

Get-VSBJobScheduleOptions -Job $SureJob

213 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VSBSession Short Description Returns a list of SureBackup sessions that have been run.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Get-VSBSession [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all SureBackup sessions that have been run.

Run Get-VSBTaskSession to get the list of all tasks performed during the specific SureBackup session.

Run Get-VBRBackupSession to get list of backup sessions that have been run.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String[]>]

Specifies the name of the SureBackup session you want to get, or search conditions.

The name of the SureBackup session is a name of the SureBackup job.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

Example 1 This command looks for the list of all backup sessions.

Get-VSBSession

Example 2 This command looks for the SureBackup session named "Winserver SureJob".

214 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VSBSession -Name *Winserver SureJob*

215 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VSBTaskSession Short Description Returns a list of all tasks performed during the specified SureBackup session.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Get-VSBTaskSession [-Session] <CSbSession> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all tasks performed during the specified SureBackup session.

Run Get-VBRTaskSession to get the tasks for backup, replication and backup copy sessions.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Session] <CSbSession>

Specifies the SureBackup session you want to get.

Run Get-VSBSession to get the SureBackup session object you need.

True 1

True (ByValue,

ByPropertyName)

False

[-Name <String[]>]

Specifies the name of the SureBackup session you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

216 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command gets the list of tasks for SureBackup session named "SureJob". The backup session is obtained with Get-VSBSession and piped down.

Get-VSBSession -Name "SureJob" | Get-VBRTaskSession

Example 2 This command gets the list of tasks for SureBackup session represented by the $SureJob variable. The backup session is obtained with Get-VSBSession and assigned to the variable beforehand.

Get-VSBTaskSession -Session $SureJob

217 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VSBVirtualLab Short Description Returns VMware virtual labs.

Applies to Version: 7.0 and earlier

Platform: VMware

For Hyper-V, run Get-VSBHvVirtualLab.

Syntax

Get-VSBVirtualLab [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet returns a list of all created VMware virtual labs.

A virtual lab is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

Please note, that when you add a new host to your Veeam Backup & Replication console, the virtual labs that are registered on it are not added automatically. Run Connect-VSBVirtualLab to add the virtual labs to your Veeam Backup & Replication console.

You can get the list of all virtual labs, or search for instances directly by name.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Name <String[]>]

Specifies the name of the VMware virtual lab you want to get, or search conditions.

You can specify multiple names separated by commas.

False Named False True

<CommonParameters>

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

218 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command looks for the list of all virtual labs.

Get-VSBVirtualLab

Example 2 This command looks for the virtual labs named "MailServer VLab 01" and "MailServer VLab 05".

Get-VSBVirtualLab -Name "MailServer VLab 01", "MailServer VLab 05"

219 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Import-VBRBackup Short Description Imports backup files to Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Import-VBRBackup [-Server] <CHost> [-FileName] <String> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet imports backup files to Veeam Backup & Replication. You can import backups, i.e. from a server that is not managed by Veeam Backup & Replication or after adding a new backup repository.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Server] <CHost>

Specifies the target server where you want to store the imported backups.

True 1

True (ByValue,

ByPropertyName)

False

[-FileName] <String>

Specifies the path to the backup file you want to import. True 2 False False

<CommonParameters>

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

Example This command imports the folder with SureBackup files to the server named "Fileserver". The target server is obtained with Get-VBRServer and piped down.

Get-VBRServer -Name "Fileserver" | Import-VBRBackup -FileName "ESX17.Veeam.Local\C:\Backups\SureBackups"

220 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Import-VBRTapeMedium Short Description Moves new tape to library.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Import-VBRTapeMedium [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Import-VBRTapeMedium [-Library <TapeLibrary>] [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet moves a newly added tape to an available slot in a library. You need to put the new tapes to the mail slot manually.

The mail slot is the slot through which you can put the new tapes into the library and take the tapes with data out. The mail slot is a service slot and you do not manage the tape residing inside it until it is imported to the library or after it is exported.

You can move new tapes to a free slot selected automatically or to a specific library. This cmdlet provides two scenarios for each case.

Use Export-VBRTapeMedium cmdlet to move tapes to the mail slot to take them out of the library.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Library <TapeLibrary>]

Specifies the library you want to move the tapes to.

False Named

True (ByValue,

ByPropertyName)

False

[-RunAsync]

Indicates that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

221 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command moves the tape from the mail slot to a free slot. The -RunAsync parameter is set to bring the process to the background.

Import-VBRTapeMedium -RunAsync

Example 2 This command moves the tape from the mail slot to the library with name containing "003". The library object is obtained with Get-VBRTapeLibrary and piped down. The -RunAsync parameter is set to bring the process to the background.

Get-VBRTapeLibrary -Name *003* | Import-VBRTapeMedium -RunAsync

222 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Move-VBRTapeMedium Short Description Moves a tape to another tape media pool.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Move-VBRTapeMedium -Medium <TapeMedium[]> -MediaPool <MediaPool> [<CommonParameters>]

Detailed Description This cmdlet moves a selected tape to specified tape media pool.

If you move tape with data to the Free media pool and confirm the operation, Mark as Free will take effect and the data will be overwritten.

IMPORTANT! If a tape media is used by an existing tape\file backup job, it will be removed only after the job is finished. In case you definitely have to disable this pool, you should first modify the corresponding job to target another media pool.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Medium <TapeMedium[]>

Specifies the tape(s) you want to move.

You can assign multiple tapes to this object.

True Named

True (ByValue,

ByPropertyName)

False

-MediaPool <MediaPool>

Specifies the target media pool where you want to move the tape(s) to.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

223 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command moves the tapes from the Unrecognized media pool to the media pool represented by the $pool variable. The tapes object is obtained with Get-VBRTapeMedium by selecting the tapes by Unrecognized parameter, and piped down. The target media pool is obtained with Get-VBRTapeMediaPool and assigned to the variable beforehand.

Get-VBRTapeMedium -Unrecognized | Move-VBRTapeMedium -MediaPool $pool

Example 2 This command moves the tape represented by the $tape variable to the media pool represented by the $pool variable. The tape object and the media pool object are obtained with Get-VBRTapeMedium and Get-VBRTapeMediaPool accordingly and assigned to the variables beforehand.

Move-VBRTapeMedium -Medium $tape -MediaPool $pool

224 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

New-VBRJobOptions Short Description Sets job options.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

New-VBRJobOptions [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

New-VBRJobOptions [-ForBackupJob] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

New-VBRJobOptions [-ForReplicaJob] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet lets you edit job settings of backup jobs, replication jobs or selected VMs.

This cmdlet returns the CJobOptions object containing the default settings of the job you want to edit. You can customize any setting that you want to apply to the job. This object is then used in Set-VBRJobOptions.

You can edit settings of jobs (including vCloud backup jobs), Vms or replication jobs by running this cmdlet with -ForJob, -ForObject or -ForReplicaJob parameters respectively.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-ForBackupJob] Returns the list of the default settings for backup job. False Named False False

[-ForReplicaJob] Returns the list of the default settings for replication job. False Named False False

<CommonParameters>

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

225 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

New-VBRJobScheduleOptions Short Description Sets job schedule options.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

New-VBRJobScheduleOptions [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet lets you edit scheduling settings of jobs.

This cmdlet returns the ScheduleOptions object containing the default scheduling settings of the job you want to edit. You can customize any setting that you want to apply to the job. This object is then used in Set-VBRJobScheduleOptions cmdlet.

You can use the ScheduleOptions object with backup, replication or copy jobs.

226 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

New-VBRJobVssOptions Short Description Sets job VSS options.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

New-VBRJobVssOptions [-ForJob] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

New-VBRJobVssOptions [-ForObject] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

New-VBRJobVssOptions [-ForReplicaJob] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet lets you edit VSS settings of backup jobs, replication jobs or selected VMs.

VSS (Volume Shadow Services) is a Windows OS service allowing to copy files of running applications that can be modified at the moment of copying. The VSS-aware applications typically are Active Directory, Microsoft SQL, Microsoft Exchange, Sharepoint, etc. To create a transactionally consistent backup of a VM running VSS-aware applications without shutting them down, Veeam Backup & Replication uses application-aware image processing. It allows backup the data fully and consistently.

This cmdlet returns the CVssOptions object containing the VSS settings of the job you want to edit. You can customize any setting that you want to apply to the job. This object is then used in Set-VBRJobVSSOptions cmdlet.

You can edit settings of backup jobs (including vCloud backup jobs), Vms or replication jobs by running this cmdlet with -ForJob, -ForObject or -ForReplicaJob parameters respectively.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-ForJob] Returns the list of the default VSS settings for backup, replication or copy job.

False Named False False

[-ForObject] Returns the list of the default VSS settings for VMs. False Named False False

[-ForReplicaJob] Returns the list of the default False Named False False

227 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

VSS settings for replication job.

<CommonParameters>

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

Example This example helps you get the CVssOptions object with customized VSS settings for a backup job.

• The Enable setting is set to True,

• The GuestFSIndexingType setting is set to "Everyfolders",

• The TransactionLogsTruncation setting is set to Always.

PS C:\PS> New-VBRJobVssOptions

Enabled Is Credentials GuestFS Indexing Transaction Logs

------- --------------- ---------------- ----------------

False False None Never

PS C:\PS> $o=New-VBRJobVssOptions

PS C:\PS> $o.Enabled=$true

PS C:\PS> $o.GuestFSIndexingType="Everyfolders"

PS C:\PS> $o.TransactionLogsTruncation="Always"

PS C:\PS> $o

Enabled Is Credentials GuestFS Indexing Transaction Logs

------- --------------- ---------------- ----------------

True False Everyfolders Always

228 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

New-VBRvCloudVAppRestoreSettings Short Description Creates a set of vApp restore parameters.

Applies to Version: 7.0

Platform: VMware

Syntax

New-VBRvCloudVAppRestoreSettings [-RestorePoint] <COib> [-vAppName <String>] [-OrgVdc <IVcdItem>] [-PowerUp] [-Reason <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet is an assistant command creating a CVcdVAppRestoreSettings object that is further used by Start-VBRvCloudRestoreVApp cmdlet. This object gathers the parameters of a selected vApp that will be needed for restore.

The vApp that you want to restore and its parameters are derived from the specified restore point data. Use the -OrgVdc parameter to set another organization where you want to restore the vApp to.

You can customize any of the parameters that are derived from the restore point. For more information, see the Advanced Setup below.

Advanced Setup The restore parameters include the settings of the vApp, namely restore point, vApp name, Organization vDC, and VMs included, as well as the settings of the VM: restore point, storage profile, datastore and template. Each of these settings can be reset to user settings allowing to restore the vApp i.e. to another organization, or with another vApp name, or apply other storage profiles to the VMs.

When applying different restore settings, it is recommended to set "null" to all VM settings that you leave unchanged to avoid conflicts when restoring the vApp to another infrastructure. For example, if the target organization has no access to the datastore that is originally set for the vApp, PowerShell will terminate your vApp restore job.

If you set "null" to all VM settings, Veeam Backup & Replication will apply the default settings of the target organization.

Please make sure that you set the parameters for all VMs that belong to the vApp, otherwise you will not be able to run the restore job.

229 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-RestorePoint] <COib>

Specifies the restore point of the vApp you want to restore the vApp to.

True 1

True (ByValue,

ByPropertyName)

False

[-vAppName <String>]

Specifies the name of the restored vApp. Use this parameter in case you want to restore the vApp with different name.

False Named False False

[-OrgVdc <IVcdItem>]

Specifies the Organization vDC you want to restore the vApp to. If not set, the vApp will be restored to the original Organization vDC.

False Named False False

[-PowerUp [<Boolean>]

If set to True, the vApp will be powered up right after it is restored. Otherwise, you will need to power up the vApp manually.

False Named False False

[-Reason <String>]

Specifies the reason for performing restore of the selected vApp.

The information you provide will be saved in the session history so that you can reference it later.

False Named False False

<CommonParameters>

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

230 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example This command creates settings for the future restore of the vApp in another Organization vDC.

• The $restorepoint variable contains the restore point of the vApp.

• The $vdc variable contains the Organization vDC object where the vApp will be restored.

• The PowerUp parameter is set to True to start the vApp automatically right after the restore.

$restoreparams = New-VBRvCloudVAppRestoreSettings -RestorePoint $restorepoint -vAppName "vApp01" -OrgVdc $Org

Here you get the $restorepoint variable containing the vApp settings:

• vAppOib - the restore point of the vApp,

• OrgVdc - the organization vDataCenter where the vApp is registered,

• Vms - the list of VMs whithin the vApp,

• vAppName - the name of the vApp.

vAppOib OrgVdc Vms vAppName

------- ------ --- --------

Veeam.Bacvup.. Veeam.Backup... {Veeam.Backup... vApp01

You can view the properties of the VMs within the vApp by typing "$restoreparams.vms":

• VmOib - the VM restorepoint,

• StorageProfile - the VM storage profile,

• vCloudDatastore - the datastore that the VM uses,

• VmTemplate - the VM template.

VmOib StorageProfile vCloudDatastore VmTemplate

----- -------------- --------------- ----------

Veeam... Name: 'Storag... Veeam.Backup.CV...

You need to specify the new organization to where you want to restore the vApp. The new organization object is assigned to the $org variable. All other VM parameters are set to null.

$restoreparams = New-VBRvCloudVAppRestoreSettings -RestorePoint $restorepoint -OrgVdc $Org

$restoreparams.vms[0].vCloudDatastore=$null

$restoreparams.vms[0].StorageProfile=$null

$restoreparams.vms[0].VmTemplate=$null

The $restoreparams variable now contains the data needed for the restore and can be used by Start-VBRvCloudRestoreVApp.

231 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

New-VSBJobOptions Short Description Sets SureBackup job options.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

New-VSBJobOptions [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet lets you edit job settings of SureBackup jobs.

This cmdlet returns the CDRJobOptions object containing the default settings of the SureBackup job you want to edit. You can customize any setting that you want to apply. This object is then used in the Set-VSBJobOptions cmdlet.

<CommonParameters>

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

Example This command creates a CDRJobOptions object with the following settings:

• The EmailNotification is enabled,

• The EmailNotificationAddresses is set to [email protected],

• The RunningVmsNumber is set to 6,

• The other settings are left by default.

PS C:\PS> $sureoptions=New-VSBJobOptions

PS C:\PS> $sureoptions.EmailNotification="True"

PS C:\PS> $sureoptions.EmailNotificationAddresses="[email protected]"

PS C:\PS> $sureoptions.RunningVmsNumber=6

PS C:\PS> $sureoptions

RunManually : True

ShutdownTestVms : True

EmailNotification : True

EmailNotificationAddresses : [email protected]

SnmpNotification : False

232 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

LinkWithJobs : False

RunningVmsNumber : 6

Validation : False

SkipValidationForAppGroup : True

233 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-HP3Snapshot Short Description Removes a SAN snapshot.

Applies to Version: 7.0

Platform: VMware

HP SAN storage system: HP 3PAR StoreServ

Syntax

Remove-HP3Snapshot -Snapshot <CSanSnapshot[]> [<CommonParameters>]

Detailed Description This cmdlet permanently removes the selected SAN snapshot from your storage system.

Run Add-HP3Snapshot to add a SAN snapshot.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Snapshot <CSanSnapshot[]>

Specifies the snapshot(s) you want to remove.

You can assign multiple snapshots to this object.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command removes the snapshot named "vol1_SS_1".

The snapshot object is obtained with Get-HP3Snapshot and piped down.

Get-HP3Snapshot -Name "vol1_SS_1" | Remove-HP3Snapshot

234 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-HP3Storage Short Description Removes a SAN storage from Veeam Backup & Replication.

Applies to Version: 7.0

Platform: VMware

HP SAN storage system: HP 3PAR StoreServ

Syntax

Remove-HP3Storage -Storage <CHp3PARHost> [<CommonParameters>]

Detailed Description This cmdlet removes the selected SAN storage from Veeam Backup & Replication.

The SAN storage is not deleted from server. When you remove a SAN storage, you stop managing it via your Veeam Backup & Replication console.

Run Add-HP3Storage to add a SAN storage.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Storage <CHp3PARHost>

Specifies the storage you want to remove. True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command removes the storage named "HP Store 01".

The storage object is obtained with Get-HP3Storage and piped down.

Get-HP3Storage -Name "HP Store 01" | Remove-HP3Storage

235 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-HP4Snapshot Short Description Removes a SAN snapshot.

Applies to Version: 7.0

Platform: VMware

HP SAN storage systems: HP LeftHand P4000, HP StoreVirtual VSA

Syntax

Remove-HP4Snapshot -Snapshot <CSanSnapshot[]> [<CommonParameters>]

Detailed Description This cmdlet permanently removes the selected SAN snapshot from your storage system.

Run Add-HP4Snapshot to add a SAN snapshot.

Alias Remove-VBRHPSnapshot

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Snapshot <CSanSnapshot[]>

Specifies the snapshot(s) you want to remove.

You can assign multiple snapshots to this object.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command removes the snapshot named "vol1_SS_1".

The snapshot object is obtained with Get-HP4Snapshot and piped down.

Get-HP4Snapshot -Name "vol1_SS_1" | Remove-HP4Snapshot

236 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-HP4Storage Short Description Removes a SAN storage from Veeam Backup & Replication.

Applies to Version: 7.0

Platform: VMware

HP SAN storage systems: HP LeftHand P4000, HP StoreVirtual VSA

Syntax

Remove-HP4Storage -Storage <CHpP4Group> [<CommonParameters>]

Detailed Description This cmdlet removes the selected SAN storage from Veeam Backup & Replication.

The SAN storage is not deleted from server. When you remove a SAN storage, you stop managing it via your Veeam Backup & Replication console.

Run Add-HP4Storage to add a SAN storage.

Alias Remove-VBRHPStorage

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Storage <CHpP4Group>

Specifies the storage you want to remove. True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command removes the storage named "HP Store 01".

The storage object is obtained with Get-HP4Storage and piped down.

Get-HP4Storage -Name "HP Store 01" | Remove-HP4Storage

237 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VBRBackup Short Description Removes a selected backup.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Remove-VBRBackup [-Backup] <CBackup[]> [-FromDisk] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet removes a selected backup.

You can remove the backup file completely from disk, or only delete the backup information from Veeam Backup & Replication database.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Backup] <CBackup[]>

Specifies the backup you want to remove.

You can assign multiple backups to this object.

True 1

True (ByValue,

ByPropertyName)

False

[-FromDisk]

If indicated, the backup file will be permanently removed from disk. Otherwise, only the information about the backup is deleted from database.

False Named False False

<CommonParameters>

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

238 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command removes the backups named "Backup Job 01" and "Backup Job 02" from database only. The backups are obtained with Get-VBRBackup and piped down.

Get-VBRBackup -Name "Backup Job 01", "Backup Job 02" | Remove-VBRBackup

Example 2 This command removes the backups with names ending with "2012" from disk. The backups are obtained with Get-VBRBackup and piped down.

Get-VBRBackup -Name *2012 | Remove-VBRBackup -FromDisk

Example 3 This command removes the backup represented by the $backup variable from disk. The backup is obtained with Get-VBRBackup and assigned to the variable beforehand.

Remove-VBRBackup $backup -FromDisk

239 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VBRBackupRepository Short Description Removes a specified backup repository from Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Remove-VBRBackupRepository -Repository <CBackupRepository[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet allows you to remove the specified backup repository from Veeam Backup & Replication.

When you remove a backup repository, Veeam Backup & Replication unassigns the repository role from the server, so it is no longer used as a backup destination. The actual server remains connected to Veeam Backup & Replication.

Run Add-VBRBackupRepository to add a new backup repository.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Repository <CBackup Repository[]>

Specifies the backup repository you want to remove.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example 1 This command removes the backup repository named "Local Repository 01". The repository is obtained with Get-VBRBackupRepository and piped down.

Get-VBRBackupRepository -Name "Local Repository 01" | Remove-VBRBackupRepository

240 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 2 This command removes the backup repository represented by the $repository variable. The repository is obtained with Get-VBRBackupRepository and assigned to the variable beforehand.

Remove-VBRBackupRepository $repository

241 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VBRBackupSession Short Description Removes a specified backup session.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Remove-VBRBackupSession [-Session] <CBackupSession[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet removes specified backup session(s) from Veeam Backup & Replication.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-[-Session] <CBackupSession[]>

Specifies the backup session you want to remove.

You can assign multiple sessions to this object.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command removes the backup session named "Backup Job 01". The backup session is obtained with Get-VBRBackupSession and piped down.

Get-VBRBackupSession -Name "Backup Job 01" | Remove-VBRBackupSession

242 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VBRCredentials Short Description Removes a credentials record from Veeam Backup & Replication.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Remove-VBRCredentials -Credential <CCredentials> [<CommonParameters>]

Detailed Description This cmdlet permanently removes the selected credentials record from the database.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Credential <CCredentials>

Specifies the credentials you want to remove. True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example 1 The following command permanently removes the credentials record with name "Administrator". Pipeline is used to select the record named "Administrator" and pass it to the cmdlet.

Get-VBRCredentials -Name “Administrator” | Remove-VBRCredentials

Example 2 This command removes the credentials record. First the -Credential object is got and assigned to $c variable.

Remove-VBRCredentials -Credential $c

243 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VBRHvProxy Short Description Removes a specified Hyper-V backup proxy from Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: Hyper-V

For VMware, run Remove-VBRViProxy.

Syntax

Remove-VBRHvProxy -Proxy <CHvProxy[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet allows you to remove the specified Hyper-V backup proxy from Veeam Backup & Replication.

When you remove a backup proxy, Veeam Backup & Replication unassigns the proxy role from the server, so it is no longer used as a backup proxy. The actual server remains connected to Veeam Backup & Replication.

Note You cannot remove a backup proxy that is explicitly selected in any backup, replication or VM copy job. To remove such a proxy, you need to delete all job references to it first.

Run Add-VBRHvProxy to add a Hyper-V proxy to Veeam Backup & Replication managing console.

Run Disable-VBRHvProxy to disable a Hyper-V proxy.

Run Enable-VBRHvProxy to enable a disabled Hyper-V proxy.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Proxy <CHvProxy[]>

Specifies the Hyper-V backup proxy you want to remove. True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

244 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command removes the proxies named "Proxy 01" and "Proxy 03". The proxies are obtained with Get-VBRHvProxy and piped down.

Get-VBRHvProxy -Name "Proxy 01", "Proxy 03"| Remove-VBRHvProxy

Example 2 This command removes the proxy represented by the $proxy variable. The proxy is obtained with Get-VBRHvProxy and assigned to the variable beforehand.

Remove-VBRHvProxy -Proxy $proxy

245 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VBRJob Short Description Removes the specified job.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Remove-VBRJob [-Job] <CBackupJob[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet allows you to remove the specified job from Veeam Backup & Replication. You can remove backup, replication and backup copy jobs.

Run Remove-VSBJob to remove SureBackup jobs.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CBackupJob[]>

Specifies the job you want to remove. True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example 1 This command removes the file copy jobs. The jobs to remove are obtained with Get-VBRJob and piped down.

Get-VBRJob -Name "File Copy*" | Remove-VBRJob

Example 2 This command removes the job represented by the $job variable. The job is obtained with Get-VBRJob and assigned to the variable beforehand.

Remove-VBRJob -Job $job

246 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VBRJobObject Short Description Removes VMs or VM containers from the specified job.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Remove-VBRJobObject [-Objects] <CObjectInJob[]>

Detailed Description This cmdlet allows you to remove VMs or VM containers from existing backup, replication or copy job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Objects] <CObjectInJob[]>

Specifies objects (VMs and VM containers) you want to remove.

True 2

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

247 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VBRReplica Short Description Removes a selected replica.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Remove-VBRReplica [-Backup] <CBackup[]> [-FromDisk] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet removes a selected replicated VM or a replication job.

You can remove the replica completely from disk, or only delete the information about replication job from Veeam Backup & Replication database. In the latter case, the replicated VM will stay on target host.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Backup] <CBackup[]>

Specifies the replica you want to remove.

You can assign multiple replicas to this object.

True 1

True (ByValue,

ByPropertyName)

False

[-FromDisk]

If indicated, the replicated VM will be permanently removed from disk. Otherwise, only the information about the replication job is deleted from database.

False Named False False

<CommonParameters>

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

248 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command removes the replication jobs named "Replica Job 01" and "Replica Job 02" from database only. The replicas are obtained with Get-VBRReplica and piped down.

Get-VBRReplica -Name "Replica Job 01", "Replica Job 02" | Remove-VBRReplica

Example 2 This command removes the replicated VM named "AD_replica" from disk. The replica is obtained with Get-VBRReplica and piped down.

Get-VBRReplica -Name "AD_replica" | Remove-VBRReplica -FromDisk

Example 3 This command removes the replicated VM represented by the $replica variable from disk. The replica is obtained with Get-VBRReplica and assigned to the variable beforehand.

Remove-VBRReplica $replica -FromDisk

249 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VBRRestorePoint Short Description Removes restore points.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Remove-VBRRestorePoint [-Oib] <COib[]> [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet allows you to remove restore points from Veeam Backup & Replication.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Oib] <COib[]>

Specifies the restore point(s) you want to remove.

You can assign multiple restore point to this object.

True 1

True (ByValue,

ByPropertyName)

False

[-Name <String[]>]

Specifies the name of the VM the restore points of which you want to remove, or search conditions.

You can specify multiple names separated by commas.

False Named False Truse

<CommonParameters>

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

250 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command removes the increment restore points from all backups with names containing "Fileserver". The restore points are obtained with Get-VBRRestorePoint and piped down.

Get-VBRRestorePoint -Name *Fileserver* | Where {$_.type -eq "Increment"} | Remove-VBRRestorePoint

Example 2 This command removes the restore point represented by the $restorepoint variable. The restore point object is obtained with Get-VBRRestorePoint and assigned to the variable beforehand.

Remove-VBRRestorePoint -Oib $restorepoint

251 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VBRRestoreSession Short Description Removes restore session.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Remove-VBRRestoreSession [-Session] <CRestoreSession[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet allows you to remove the specified restore session from Veeam Backup & Replication.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Session] <CRestoreSession[]>

Specifies the restore session you want to remove.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example 1 This command removes the last restore session of the VM named "Fileserver". The restore session is obtained with Get-VBRRestoreSession and piped down.

Get-VBRRestoreSession -Name "Fileserver 03" | Select -Last 1 | Remove-VBRRestoreSession

Example 2 This command removes the restore session represented by the $session variable. The restore session object is obtained with Get-VBRRestoreSession and assigned to the variable beforehand.

Remove-VBRRestoreSession -Session $session

252 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VBRServer Short Description Removes a selected server from Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Remove-VBRServer [-Server] <CHost[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet removes a specified server from Veeam Backup & Replication. When you remove a server, you stop managing it via your Veeam Backup & Replication console.

When you remove a server that was used as a target host or as a repository, actual backup files (.vbk, .vrb and .vib) and replica files (.vmdk, .vhd and .vrb) remain on the server. You can import these files later to the Veeam Backup & Replication console by running Import-VBRBackup.

Note A server that has any dependencies cannot be deleted. For example, you cannot delete a server that is referenced by a backup or replication job, or that performs the role of a backup proxy or repository. To remove such a server, you will need to delete all referencing jobs or objects first.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Server] <CHost[]>

Specifies the server you want to remove.

You can assign multiple servers to this object.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

253 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command removes a Virtual Center named "vCenter01". The server is obtained with Get-VBRRestoreSession, selected by -Type and -Name parameters, and piped down.

Get-VBRServer -Type VC -Name vCenter01 | Remove-VBRServer

Example 2 This command removes the server represented by the $session variable. The server object is obtained with Get-VBRServer and assigned to the variable beforehand.

Remove-VBRServer -Server $server

254 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VBRTapeMediaPool Short Description Removes a media pool from processing.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Remove-VBRTapeMediaPool -MediaPool <MediaPool[]> [<CommonParameters>]

Detailed Description This cmdlet excludes a selected media pool from processing. The location of pool media will be changed to Offline.

IMPORTANT! If a media pool is used by an existing backup/files to tape copy job, you will not be allowed to remove it. In case you definitely have to disable this pool, you should first modify the corresponding job to target another media pool.

You can bring the media back to processing by means of native library management console.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-MediaPool <MediaPool[]>

Specifies the media pool(s) you want to remove. True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command removes the media pool from processing. First the -MediaPool object is got and assigned to $pool variable.

Remove-VBRTapeMediaPool -MediaPool $pool

255 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VBRViProxy Short Description Removes VMware backup proxy from Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware

For Hyper-V, run Remove-VBRHvProxy.

Syntax

Remove-VBRViProxy -Proxy <CViProxy[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet removes the specified VMware backup proxy from Veeam Backup & Replication.

When you remove a backup proxy, Veeam Backup & Replication unassigns the proxy role from the server, so it is no longer used as a backup proxy. The actual server remains connected to Veeam Backup & Replication.

Note You cannot remove a backup proxy that is explicitly selected in any backup, replication or VM copy job. To remove such a proxy, you need to delete all job references to it first.

Run Add-VBRViProxy to add a VMware proxy to Veeam Backup & Replication console.

Run Disable-VBRViProxy to disable a VMware proxy.

Run Enable-VBRViProxy to enable a disabled VMware proxy.

Run Get-VBRJobProxy to get the list of proxies assigned to a specific job.

Run Get-VBRViProxy to get a list of all VMware proxies managed by Veeam Backup & Replication.

Run Set-VBRJobProxy to assign a specific proxy to a job or to switch to the automatic proxy selection.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Proxy <CViProxy[]>

Specifies the proxy you want to remove. True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

256 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command removes the proxies named "Proxy 01" and "Proxy 03". The proxies are obtained with Get-VBRViProxy and piped down.

Get-VBRViProxy -Name "Proxy 01", "Proxy 03"| Remove-VBRViProxy

Example 2 This command removes the proxy represented by the $proxy variable. The proxy is obtained with Get-VBRViProxy and assigned to the variable beforehand.

Remove-VBRViProxy -Proxy $proxy

257 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VBRWANAccelerator Short Description Removes a WAN accelerator.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Note WAN optimization is available only in Veeam Backup & Replication Enterprise Plus Edition.

Syntax

Remove-VBRWANAccelerator -Accelerator <CWanAccelerator> [<CommonParameters>]

Detailed Description This cmdlet removes the selected WAN accelerator.

WAN accelerator is an architecture component that optimizes file transfer via WAN by means of data deduplication. The role of a WAN accelerator can be assigned to a dedicated Windows-based machine (physical or virtual). For best performance you should set a WAN accelerator on both source and target sides.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Accelerator <CWanAccelerator>

Specifies the WAN accelerator you want to remove.

True Named False False

<CommonParameters>

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

258 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 The following command removes the WAN Accelerator with name "WANAccelerator 1". Pipeline is used to select the WAN Accelerator named "WANAccelerator 1" and pass it to the cmdlet.

Get-VBRWANAccelerator -Name "WANAccelerator 1" | Remove-VBRWANAccelerator

Example 2 The following command removes WAN accelerator. First the accelerator object is got and assigned to $a variable.

Remove-VBRWANAccelerator -Accelerator $a

259 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VSBApplicationGroup Short Description Removes a specified application group from Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Remove-VSBApplicationGroup [-AppGroup] <CSbAppGroup[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet removes a specified application group from Veeam Backup & Replication.

An application group is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

Run Add-VSBViApplicationGroup or Add-VSBHvApplicationGroup to add a new VMware or Hyper-V application group.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-AppGroup] <CSbAppGroup[]>

Specifies the application group you want to remove.

You can assign multiple application groups to this object.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

260 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command removes the application groups named "AppGroup 01" and "AppGroup 02". The application groups are obtained with Get-VSBApplicationGroup and piped down.

Get-VSBApplicationGroup -Name "AppGroup 01", "AppGroup 02"| Remove-VSBApplicationGroup

Example 2 This command removes the application group represented by the $appgroup variable. The application group is obtained with Get-VSBApplicationGroup and assigned to the variable beforehand.

Remove-VSBApplicationGroup -AppGroup $appgroup

261 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VSBHvVirtualLab Short Description Removes a virtual lab.

Applies to Version: 7.0

Platform: Hyper-V

For VMware, run Remove-VSBVirtualLab.

Syntax

Remove-VSBHvVirtualLab [-VirtualLab] <CHvSbVirtualLab[]> [-WarningAction <ActionPreference>][-WarningVariable <String>] [-WhatIf][-Confirm][<CommonParameters>]

Detailed Description This cmdlet removes a virtual lab from Veeam Backup & Replication console.

A virtual lab is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

The virtual lab is not deleted from server where it was created. When you remove a virtual lab, you stop managing it via your Veeam Backup & Replication console.

You can add a removed virtual lab to your console by running Connect-VSBHvVirtualLab.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-VirtualLab] <CHvSbVirtualLab[]>

Specifies the virtual lab object you want to remove from your Veeam Backup & Replication console.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

262 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command removes a virtual lab represented by the $vlab variable. First the virtual lab object is got and assigned to $vlab variable.

Remove-VSBHvVirtualLab -VirtualLab $vlab

Example 2 This command removes a virtual lab named "Virtual Lab 01". The virtual lab object is piped to the cmdlet.

Get-VSBHvVirtualLab -Name "Virtual Lab 01" | Remove-VSBHvVirtualLab

263 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VSBJob Short Description Removes a specified SureBackup job from Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Remove-VSBJob [-Job] <CSbJob[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet removes a specified SureBackup job from Veeam Backup & Replication.

SureBackup is a Veeam recovery verification technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CSbJob[]>

Specifies the SureBackup job you want to remove.

You can assign multiple jobs to this object.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

264 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command removes the SureBackup job named "SureJob 01" and "SureJob 12". The SureBackup jobs are obtained with Get-VSBJob and piped down.

Get-VSBJob -Name "SureJob 01", "SureJob 12"| Remove-VSBJob

Example 2 This command removes the SureBackup job represented by the $surejob variable. The SureBackup job is obtained with Get-VSBJob and assigned to the variable beforehand.

Remove-VSBJob -Job $surejob

265 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VSBSession Short Description Removes a specified SureBackup job session from Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Remove-VSBSession [-Sessions] <CSbSession[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet removes a specified SureBackup job session from Veeam Backup & Replication.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Sessions] <CSbSession[]>

Specifies the SureBackup job session you want to remove.

You can assign multiple sessions to this object.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example 1 This command removes the SureBackup sessions named "Winserver SureJob" and "Mailserver SureJob". The SureBackup sessions are obtained with Get-VSBSession and piped down.

Get-VSBSession -Name "Winserver SureJob", "Mailserver SureJob" | Remove-VSBSession

Example 2 This command removes the SureBackup job session represented by the $suresession variable. The SureBackup job session is obtained with Get-VSBSession and assigned to the variable beforehand.

Remove-VSBSession -Sessions $suresession

266 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Remove-VSBVirtualLab Short Description Removes a specified VMware virtual lab from Veeam Backup & Replication.

Applies to Version: 7.0 and earlier

Platform: VMware

For Hyper-V, run Remove-VSBHvVirtualLab.

Syntax

Remove-VSBVirtualLab [-VirtualLab] <CViSbVirtualLab[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet allows you to remove a specified VMware virtual lab from Veeam Backup & Replication.

A virtual lab is a component of SureBackup technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

The virtual lab is not deleted from server where it was created. When you remove a virtual lab, you stop managing it via your Veeam Backup & Replication console.

You can add a removed virtual lab to your console by running the Connect-VSBVirtualLab cmdlet.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-VirtualLab] <CViSbVirtualLab[]>

Specifies the virtual lab you want to remove.

You can assign multiple virtual labs to this object.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

267 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command removes a virtual lab named "Virtual Lab 01". The virtual lab object is obtained with Get-VSBVirtualLab and piped down.

Get-VSBVirtualLab -Name "Virtual Lab 01" | Remove-VSBVirtualLab

Example 2 This command removes a virtual lab represented by the $vlab variable. The virtual lab object is obtained with Get-VSBVirtualLab and assigned to the variable beforehand.

Remove-VSBVirtualLab -VirtualLab $vlab

268 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Reset-HvVmChangeTracking Short Description Clears change tracking data for a csecific VM or specific virtual disk (VHD).

Applies to Version: 7.0 and earlier

Platform: Hyper-V

Syntax

Reset-HvVmChangeTracking [-Server] <CHost> [-VMName <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Reset-HvVmChangeTracking [-Server] <CHost> [-VhdPath <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet clears and resets change tracking data for a VM or specific virtual disk (VHD).

Change tracking data is history of changes kept for each data block. Using the changed block tracking (CBT) mechanism allows to reduce the backup time as the backup process compares the CBT data instead of scanning all data. You may need to reset the change tracking data in case it was corrupted.

This cmdlet provides two scenarios. You can reset change tracking for a specific VM or for a specific virtual disk (VHD).

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Server] <CHost>

Specifies the server hosting the VM for which you want to reset change tracking data.

True 2 False False

[-VMName <String>]

Specifies the VM for which you want to reset change tracking data.

False Named False False

[-VhdPath <String>]

Specifies the virtual disk (VHD) for which you want to reset change tracking data.

False Named False False

<CommonParameters>

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

269 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command resets change tracking data for the VM named "Fileserver". The VM is located on host represented by the $server variable. The server object is obtained with Get-VBRServer and assigned to the variable beforehand.

Reset-HvVmChangeTracking -Server $server -VMName "Fileserver"

Example 2 This command resets change tracking data for the specified virtual disk. The VM is located on host represented by the $server variable. The server object is obtained with Get-VBRServer and assigned to the variable beforehand.

Reset-HvVmChangeTracking -Server $server -VhdPath "C:\Users\Public\Hyper-V\Virtual Hard Disks\hv_dns.vhdx"

270 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Reset-VBRJobOptions Short Description Resets job settings to default.

Applies to Version:

Platform: VMware

Syntax

Reset-VBRJobOptions -Job <CBackupJob> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet clears the custom settings of the specified job and restores their default values.

Note that the VSS settings (application-aware image processing and guest file system indexing) are not reset with this cmdlet. To reset the VSS settings, run Set-VBRJobVssOptions cmdlet with non-customized CVssOptions object. To apply different VSS settings to the job, run one of the following cmdlets:

• DisableVBRJobGuestFSIndexing

• DisableVBRJobVSSIntegration

• EnableVBRJobGuestFSIndexing

• EnableVBRJobVSSIntegration

• SetVBRJobVssOptions -Credentials

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob> Specifies the job you want to edit. True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command sets default settings to backup job named "Backup Job 8". The backup job object is piped to the cmdlet.

271 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Get-VBRJob -Name "Backup Job 8" | Reset-VBRJobOptions

272 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Reset-VBRJobScheduleOptions Short Description Resets job schedule settings to default.

Applies to Version:

Platform: VMware, Hyper-V

Syntax

Reset-VBRJobScheduleOptions -Job <CBackupJob> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet sets the default scheduling options to the selected job.

You can run this cmdlet with any kind of jobs.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob> Specifies job you want to edit. True Named

True (ByValue,

ByPropertyName)

True

<CommonParameters>

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

273 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Reset-VSBJobOptions Short Description Resets SureBackup job settings to default.

Applies to Version:

Platform: VMware, Hyper-V

Syntax

Reset-VSBJobOptions -Job <CSbJob> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet clears the custom settings of the specified job and restores their default values.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CSbJob> Specifies the SureBackup job you want to edit. True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command sets default settings to backup job named "SureBackup Job 8". The backup job object is piped to the cmdlet.

Get-VBRJob -Name "SureBackup Job 8" | Reset-VSBJobOptions

274 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Restart-VBRInstantRecovery Short Description Restarts a failed instant recovery job.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Restart-VBRInstantRecovery [-InstantRecovery] <InstantRecovery[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet restarts a failed instant recovery job.

With instant recovery technology, Veeam Backup & Replication starts a VM directly from a backup, incremental or full, without copying it to production storage.

Please note that the instantly recovered VM runs from a backup and does not provide a wholly functioning service. You need to finalize the successful instant recovery by either migrating the recovered VM to production or by stopping publishing the recovered VM. Run Start-VBRQuickMigration or Stop-VBRInstantRecovery respectively.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Instant Recovery] <InstantRecovery[]>

Specifies the instant recovery session you want to restart.

Run Get-VBRInstantRecovery to get the needed session object.

You can assign multiple instant recovery sessions to this object.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

275 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command restarts the last instant recovery session. The needed session object is obtained with Get-VBRInstantRecovery, selected by order and piped down.

Get-VBRInstantRecovery | Select -Last 1 | Restart-VBRInstantRecovery

Example 2 This command restarts the instant recovery session represented by the $"Recovery Session" variable. The needed session object is obtained with Get-VBRInstantRecovery and assigned to the variable beforehand.

Restart-VBRInstantRecovery -InstantRecovery $"Recovery Session"

276 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VBRCredentials Short Description Edits credentials records properties.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Set-VBRCredentials -Credential <CCredentials> -Password <string> [<CommonParameters>]

-OR-

Set-VBRCredentials -Credential <CCredentials> -Description <string> [<CommonParameters>]

Detailed Description This cmdlet allows editing password or description of a selected credentials record. Select the appropriate syntax for each case.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Credential <CCredentials>

Specifies credentials you want to edit. True Named

True (ByValue,

ByPropertyName)

False

-Password <string>

Specifies the new password for the selected credentials. True Named

True (ByValue,

ByPropertyName)

False

-Description <string>

Specifies the new description for the selected credentials. True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

277 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 The following command sets a new password for the credentials record with name "Administrator". The new password is "Password_1". The record named "Administrator" is piped to the cmdlet.

Get-VBRCredentials -Name Administrator | Set-VBRCredentials -Password Password_1

Example 2 The following command sets a new description for the credentials record. First the -Credential object is got and assigned to $c variable.

Set-VBRCredentials -Credential $c -Description "ESXi Host Credentials"

278 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VBRJobAdvancedBackupOptions Short Description Customs advanced job backup settings.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Set-VBRJobAdvancedBackupOptions -Job <CBackupJob[]> [-Algorithm <JobAlgorithms> {ReverseIncremental | Incremental }] [-TransformFullToSyntethic <bool>] [-TransformIncrementsToSyntethic <bool>] [-TransformToSyntethicDays <DayOfWeek[]> {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] [-EnableFullBackup <bool>] [-FullBackupDays <DayOfWeek[]> {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] [-FullBackupScheduleKind <EFullBackupScheduleKind> {Daily | Monthly}] [-Months <EMonth[]> {January | February | March | April | May | June | July | August | September | October | November | December}] [-DayNumberInMonth <EDayNumberInMonth> {First | Second | Third | Fourth | Last | OnDay}] [-DayOfWeek <DayOfWeek> {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] [<CommonParameters>]

Detailed Description This cmdlet sets advanced backup options for the selected job.

You can select backup method: reverse incremental or incremetal, and set schedule settings for synthetic full backups.

You can apply these settings to multiple jobs simultaneously.

Read more about advanced backup job settings in Veeam Backup & Replication user guide at http://www.veeam.com/vmware-backup/help-center.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to edit.

You can assign multiple jobs to this object.

True Named

True (ByValue,

ByPropertyName)

False

[-Algorithm <JobAlgorithms> {Reverse Incremental | Incremental }]

Specifies backup method:

• ReverseIncremental: every backup job run creates a full backup file by merging a previous full backup with recent changes.

False Named False False

279 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

• Incremental: the first job run creates a full backup file, and the subsequent runs backups only the changed blocks.

[-TransformFullTo Syntethic <bool>]

Used with incremental backup method.

If set to TRUE, the full synthetic backup will be enabled. Otherwise, you will have to perform full backups manually.

False Named False False

[-Transform IncrementsTo Syntethic <bool>]

Used with incremental backup method.

If set to TRUE, the previous full backup chain will be transformed into the reversed incremental backup chain. Otherwise all created synthetic fulls will remain on disk. Used to save disk space.

False Named False False

[-TransformTo SyntethicDays <DayOfWeek[]> {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}]

Specifies days to perform synthetic fulls. False Named False False

[-EnableFullBackup <bool>]

If set to TRUE, the active full backup will be scheduled. Use -FullBackupDays, -FullBackupScheduleKind, -Months, -DayNumberInMonth and -DayOfWeek parameters to set the full backup schedule.

False Named False False

[-FullBackupDays <DayOfWeek[]> {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}]

Sets backup schedule.

Specifies days to perform the full backup.

False Named False False

[-FullBackup ScheduleKind <EFullBackupScheduleKind> {Daily | Monthly}]

Sets backup schedule.

Sets weekly or monthly period to schedule the full backup.

False Named False False

[-Months <EMonth[]> {January | February

Sets backup schedule.

Specifies months to False Named False False

280 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

| March | April | May | June | July | August | September | October | November | December}]

perform the full backup.

[-DayNumber InMonth <EDayNumberInMonth> {First | Second | Third | Fourth | Last | OnDay}]

Sets backup schedule.

Specifies the period condition for the monthly backup job run: First/Second/Third/Forth/Last.

Use this parameter to set the condition for -DayOfWeek parameter, i.e. to run the job on first Saturday every month.

False Named False False

[-DayOfWeek <DayOfWeek> {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}]

Sets backup schedule.

Specifies the day of week to run the backup job. Use this parameter to set the day for -NumberInMonth parameter, i.e. to run the job on first Saturday every month.

False Named False False

<CommonParameters>

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

281 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command sets the following backup options for the backup job represented by the $job variable:

• The backup algorithm is set to ReverseIncremental,

• The active full backup schedule is set to monthly. The job object is assigned to the variable beforehand and piped to the cmdlet.

$job | Set-VBRJobAdvancedBackupOptions -Algorithm ReverseIncremental -FullBackupScheduleKind Monthly

Example 2 This command sets the following backup options for all backup jobs:

• The backup algorithm is set to Incremental,

• The synthetic full backup is enabled on every Sunday and Thursday,

• The previous fulls are set to rollback to chain of increments to save disk space,

• The active full backup schedule is set to every second Sunday monthly.

Get-VBRJob -Name Backup* | Set-VBRJobAdvancedBackupOptions -Algorithm Incremental -TransformFullToSyntethic True -TransformIncrementsToSyntethic True -TransformToSyntethicDays Sunday, Thursday -EnableFullBackup True -FullBackupScheduleKind Monthly -DayNumberInMonth Second -FullBackupDays Sunday

282 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VBRJobAdvancedNotificationOptions Short Description Customs job notification settings.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Set-VBRJobAdvancedNotificationOptions -Job <CBackupJob[]> [-SnmpNotification <bool>] [-EmailNotificationAddresses <string>] [-EmailNotification <bool>] [<CommonParameters>]

Detailed Description This cmdlet sets notification options for the selected job.

You can set SNMP and email notifications on job run results.

You can apply these settings to multiple jobs simultaneously.

Read more about job notification settings in Veeam Backup & Replication user guide at http://www.veeam.com/vmware-backup/help-center.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to edit.

You can assign multiple jobs to this object.

True Named

True (ByValue,

ByPropertyName)

False

[-SnmpNotification <bool>]

If set to TRUE, the SNMP notification will be sent. You need to have the SNMP notification pre-configured.

False Named False False

[-EmailNotification <bool>]

If set to TRUE, the notifications will be sent to email address(es).

False Named False False

[-EmailNotification Addresses <string>]

Specifies the email address(es) to send the email notification. You can specify multiple addresses separated by semicolon.

False Named False False

<CommonParameters>

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

283 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example This command sets SNMP and email notifications for the backup job named "Backup Job 01". The job object is piped to the cmdlet.

Get-VBRJob -Name "Backup Job 01" | Set-VBRJobAdvancedNotificationOptions -SnmpNotification True -EmailNotification True -EmailNotificationAddresses [email protected]

284 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VBRJobAdvancedOptions Short Description Customs advanced job settings.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Set-VBRJobAdvancedOptions -Job <CBackupJob[]> [-Periodicity <PeriodicityType> {Cycles | Days}] [-Frequency <uint32>] [-Enabled <bool>] [-Days <DayOfWeek[]> {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] [-CommandLine <string>] [-EnableIntegrityChecks <bool>] [-RetainDays <int>] [<CommonParameters>]

Detailed Description This cmdlet sets advanced options for the selected job.

You can set:

• Integrity check: Veeam Backup and Replication will check every full backup file for integrity and recovery availability,

• Custom data retention period: if a VM included in this job is deleted, its data will be stored for the specified period. When this period ends, the backup files are deleted. The default period is 14 days,

• Post job activity: you can specify a command you want to run after the job run, i.e. to sent a job result report. You can schedule this command to run i.e. every second job run or on specific days.

You can apply these settings to multiple jobs simultaneously.

Read more about advanced job settings in Veeam Backup & Replication user guide at http://www.veeam.com/vmware-backup/help-center.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to edit.

You can assign multiple jobs to this object.

True Named

True (ByValue,

ByPropertyName)

False

[-EnableIntegrity Checks <bool>]

If set to TRUE, automatic backup integrity check will be enabled. Integrity check process verifies the full backup file integrity to avoid data corruption. Otherwise integrity check

False Named False False

285 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

in not performed.

[-RetainDays <int>]

Specifies the integer setting the number of days to keep backup data for deleted VMs. If ommited, the data retention period will be set to 14 days by default.

False Named False False

[-Enabled <bool>]

If set to TRUE, the command set in -CommandLine will be executed after the job run. You need to schedule the command run periodically with -Periodicity and -Frequency parameters, or on specific days with -Days parameter.

False Named False False

[-CommandLine <string>]

Specifies the command you want to execute after the job run. You can schedule the command run periodically with -Periodicity and -Frequency parameters, or on specific days with -Days parameter.

False Named False False

[-Periodicity <PeriodicityType> {Cycles | Days}]

Used to set command run schedule.

Specifies the command run schedule type:

• Cycles: the command will be executed in periods set with -Frequency parameter,

• Days: the command will be executed on the days specified with -Days parameter.

False Named False False

[-Frequency <uint32>]

Used to set command run schedule to Cycle.

Specifies the integer setting the number of the backup job runs after which the command will be executed.

To set the command run to cycle run, set -Periodicity parameter to Cycle.

You can also set the daily schedule with -Days parameter.

False Named False False

[-Days <DayOfWeek[]>

Used to set command run schedule to Days.

False Named False False

286 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

{Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}]

Specifies the days to run the command.

You can also set the cycle schedule with -Frequency parameter.

<CommonParameters>

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

Example 1 This command edits advanced job settings to backup job named "Backup Job 01":

• The integrity check is enabled,

• The data retention period is set to 30 days. The job is obtained with Get-VBRJob cmdlet and piped down.

Get-VBRJob -Name "Backup Job 01" | Set-VBRJobAdvancedOptions -EnableIntegrityChecks True -RetainDays 30

Example 2 This command edits advanced job settings to backup job named "Backup Job 01":

• The integrity check is enabled,

• The data retention is not set to leave the default settings,

• The post job activity is enabled to run the "report.exe" command periodically after every fifth job run.

The job is obtained with Get-VBRJob cmdlet and piped down.

Get-VBRJob -Name "Backup Job 01" | Set-VBRJobAdvancedOptions -EnableIntegrityChecks -Enabled True -CommandLine "report.exe" -Periodicity Cycles -Frequency 5

287 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VBRJobAdvancedHvOptions Short Description Customs Hyper-V job settings.

Applies to Version: 7.0

Platform: Hyper-V

Syntax

Set-VBRJobAdvancedHvOptions -Job <CBackupJob[]> [-CanDoCrashConsistent <bool>] [-EnableHvQuiescence <bool>] [-UseChangeTracking <bool>] [-ExcludeSwapFile <bool>] [<CommonParameters>]

Detailed Description This cmdlet sets special options for the selected Hyper-V job.

In case you cannot use application-aware image processing, you can enable a Hyper-V quiescence mechanism to backup data that can be changed during the backup.

You can apply these settings to multiple jobs simultaneously.

Read more about Hyper-V job settings in Veeam Backup & Replication user guide at http://www.veeam.com/vmware-backup/help-center.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to edit.

You can assign multiple jobs to this object.

True Named

True (ByValue,

ByPropertyName)

False

[-CanDoCrash Consistent <bool>]

If set to TRUE, the crash consistent backup will be enabled. Otherwise the VM will be suspended for a short period of time.

False Named False False

[-EnableHv Quiescence <bool>]

If set to TRUE, the Hyper-V quiescence mechanism will be enabled. Use this mechanism if the application-aware image processing cannot be used.

False Named False False

[-UseChange Tracking <bool>]

If set to TRUE, the changed block tracking will be enabled.

False Named False False

[-ExcludeSwapFile If set to TRUE, the swap file will be excluded from

False Named False False

288 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

<bool>] backup.

<CommonParameters>

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

Example This command edits advanced job settings to backup job named "Backup Job 01":

• The Hyper-V quiescence is enabled,

• The crash consistent backup is enabled,

• The changed block data is enabled,

• The swap file is excluded form backup. The job is obtained with Get-VBRJob cmdlet and piped down.

Get-VBRJob -Name "Backup Job 01" | Set-VBRJobAdvancedHvOptions -EnableHvQuiescence True -CanDoCrashConsistent True -UseChangeTracking True -ExcludeSwapFile True

289 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VBRJobAdvancedStorageOptions Short Description Customs advanced job storage settings.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Set-VBRJobAdvancedStorageOptions -Job <CBackupJob[]> [-EnableDeduplication [<Boolean>]] [-CompressionLevel <Int32>] [-StorageBlockSize <EKbBlockSize>] [-WarningAction <ActionPreference>] [-WarningVariable <String>][<CommonParameters>]

Detailed Description This cmdlet sets storage options for the selected job.

You can enable backup data deduplication and customize data units compression level and size.

You can apply these settings to multiple jobs simultaneously.

Read more about job storage settings in Veeam Backup & Replication user guide at http://www.veeam.com/vmware-backup/help-center.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to edit.

You can assign multiple jobs to this object.

True Named

True (ByValue,

ByPropertyName)

False

[-Enable Deduplication [<Boolean>]]

If set to TRUE, the data will be deduplicated during the backup job run (recommended). Otherwise, no data will be checked for duplication.

False Named False False

[-Compression Level <Int32>]

Specifies the compression level for the created backup:

• AUTO_COMPRESSION _LEVEL = -1,

• NONE_COMPRESSION _LEVEL = 0,

• DEDUPE_COMPRESSION _LEVEL = 4,

False Named False False

290 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

• OPTIMAL_COMPRESSION _LEVEL = 5,

• HIGH_COMPRESSION _LEVEL = 6,

• EXTREME_COMPRESSION _LEVEL = 9

[-StorageBlockSize <EKbBlockSize>]

Specifies the size of data blocks. Larger sized blocks provide faster procession but lower deduplication level.

• KbBlockSize256 = 0,

• KbBlockSize512 = 1,

• KbBlockSize1024 = 3,

• KbBlockSize2048 = 4,

• KbBlockSize4096 = 5,

• KbBlockSize8192 = 6,

• Automatic = 7

False Named False False

<CommonParameters>

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

Example This command edits advanced storage settings for the backup jobs named "Backup Job 01" and "Backup Job 02". The backup jobs objects are piped to the cmdlet.

• The -EnableDeduplication parameter is set to $TRUE to enable data deduplication,

• The compression level is set to none (0),

• The storage blocks size is set to Automatic.

Get-VBRJob -Name "Backup Job 01", "Backup Job 02" | Set-VBRJobAdvancedStorageOptions -EnableDeduplication $TRUE -CompressionLevel 0 -StorageBlockSize 7

291 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VBRJobAdvancedViOptions Short Description Customs VMware job settings.

Applies to Version: 7.0

Platform: VMware

Syntax

Set-VBRJobAdvancedViOptions -Job <CBackupJob[]> [-ExcludeSwapFile <bool>] [-VmAttributeName <string>] [-SetResultsToVmAttribute <bool>] [-DoubleSnapshotThresholdMb <long>] [-EnableDoubleSnapshot <bool>] [-EnableChangeTracking <bool>] [-UseChangeTracking <bool>] [-VMToolsQuiesce <bool>] [<CommonParameters>]

Detailed Description This cmdlet sets special options for the selected VMware job.

Read more about VMware job settings in Veeam Backup & Replication user guide at http://www.veeam.com/vmware-backup/help-center.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to edit.

You can asign multiple jobs to this object.

True Named

True (ByValue,

ByPropertyName)

False

[-VMToolsQuiesce <bool>]

If set to TRUE, the VMware quiescence mechanism will be enabled. Use this mechanism if the application-aware image processing cannot be used.

False Named False False

[-EnableChange Tracking <bool>]

If set to TRUE, the changed block tracking will be enabled.

False Named False False

[-UseChange Tracking <bool>]

If set to TRUE, the changed block tracking will be used even if CBT is disabled on the ESX(i) host.

False Named False False

[-EnableDouble Snapshot <bool>]

If set to TRUE, the delta data will be written to several delta files with specified volume limit. A new delta file will be created when the previous file reaches the

False Named False False

292 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

threshold value set in -DoubleSnapshotThresholdMb parameter.

[-DoubleSnapshot ThresholdMb <long>]

Specifies threshold limit value for the delta file in Mb.

False Named False False

[-ExcludeSwapFile <bool>]

If set to TRUE, the swap file will be excluded from backup.

False Named False False

[-SetResultsTo VmAttribute <bool>]

If set to TRUE, the job results will be written to custom attributes field of the VM.

False Named False False

[-VmAttributeName <string>]

Specifies the custom attributes field name. False Named False False

<CommonParameters>

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

Example This command edits advanced job settings to backup job named "Backup Job 01":

• The VMware quiescence is enabled,

• The changed block data is enabled,

• The CBT is forced to use despite the ESX host settings,

• The swap file is excluded form backup,

• The job results are written to the custom attributes field named "backup Results",

• The delta file is set to duplicate when reaching 500 Mb volume. The job object is obtained with Get-VBRJob cmdlet and piped down.

Get-VBRJob -Name "Backup Job 01" | Set-VBRJobAdvancedViOptions -VMToolsQuiesce True -EnableChangeTracking True -UseChangeTracking True -ExcludeSwapFile True -VmAttributeName "Backup Results" -SetResultsToVmAttribute True -EnableDoubleSnapshot True -DoubleSnapshotThresholdMb 500

293 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VBRJobObjectVssOptions Short Description Changes job VSS settings.

Applies to Version:

Platform: VMware

Syntax

Set-VBRJobObjectVssOptions [-Object] <CObjectInJob> [-Options] <CVssOptions> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Set-VBRJobObjectVssOptions [-Object] <CObjectInJob> -Credentials <CCredentials> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet allows you to change VSS settings for the specified job objects.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Object] <CObjectInJob>

Specifies the VMs and VM containers for which you wish to change VSS settings.

True 1

True (ByValue,

ByPropertyName)

False

[-Options] <CVssOptions>

Specifies the option that you want to change. True 2 False False

-Credentials <CCredentials>

Specifies the credentials you want to use for authenticating with the guest VM.

True Named False False

<CommonParameters>

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

294 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VBRJobOptions Short Description Applies custom job settings.

Applies to Version:

Platform: VMware

Syntax

Set-VBRJobOptions [-Job] <CBackupJob[]> [-Options] <CJobOptions> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet applies a set of customized settings to a selected job.

To apply the set of customized settings you need to first create a CJobOptions object which unifies all the options you want to apply to the job. The CJobOptions object is created with the help of New-VBRJobOptions cmdlet.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CBackupJob[]>

Specifies the job you want to edit. True 1

True (ByValue,

ByPropertyName)

False

[-Options] <CJobOptions>

Specifies the set of parameters you want to apply to the job.

True 2 False False

<CommonParameters>

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

Example This command applies custom settings to the backup job named "Backup Job 01". The job object is piped to the cmdlet. First the -Options object is got and assigned to the $options variable.

Get-VBRJob -Name "Backup Job 01" | Set-VBRJobOptions -Options $options

295 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VBRJobProxy Short Description Provides proxy server selection in a specified job.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Set-VBRJobProxy -Job <CBackupJob[]> -Proxy <IProxy[]> [-Target] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Set-VBRJobProxy -Job <CBackupJob[]> -AutoDetect [-Target] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet switches proxy selection mode in a specified job.

When you create a job, the proxy server is set automatically by default. With this cmdlet, you can assign a custom proxy to a job or set the automatic proxy selection back.

This cmdlet provides two scenarios for each case.

You can run this cmdlet with backup and replica jobs.

IMPORTANT! Please note that if you want to set a custom proxy you should make sure that the proxy server is added to Veeam Backup & Replication console, otherwise you will not be able to assign it to the job. The custom proxy server should be configured appropriately. Read more about proxy server settings in Veeam Backup & Replication user guide at http://www.veeam.com/vmware-backup/help-center.

Run Get-VBRJobProxy to get the list of proxies assigned to a specific job.

296 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to set proxy to.

You can assign multiple backup jobs to this object.

True Named

True (ByValue,

ByPropertyName)

False

-Proxy <IProxy[]>

Specifies the proxy server you want to assign to the job. True Named False False

[-Target]

If set, the command returns the list of target proxy servers. If omitted, the command returns the list of source proxy servers.

False Named False False

-AutoDetect

If set, the proxy server selection mode is set to automatic. If you do not set this parameter, you should specify the custom proxy server.

True Named False False

<CommonParameters>

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

297 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command assigns the custom source proxy server to the jobs named "Backup Job 01" and "Backup Job 02".

• The jobs to assign the proxy to are piped to the cmdlet,

• The $"SourceProxy" variable contains the proxy server to assign to the job. The proxy object is got beforehand with Get-VBRViProxy,

• The -Target parameter is not set to enable the source proxy allocation.

Get-VBRJob -Name "Backup Job 01", "Backup Job 02" | Set-VBRJobProxy -Proxy $"SourceProxy"

Example 2 This command assigns the custom target proxy server to the job.

• The $job variable contains the job to which the proxy will be assigned,

• The $proxy variable contains the proxy server to assign to the job.

• The job object and the proxy object are got beforehand,

• The -Target parameter is set to enable target proxy allocation.

Set-VBRJobProxy -Job $job -Proxy $proxy -Target

Example 3 This command sets the automatic source proxy selection mode to the jobs named "Backup Job 01" and "Backup Job 02". The jobs objects are piped to the cmdlet. The -Target parameter is not set to enable the source proxy allocation.

Get-VBRJob -Name "Backup Job 01", "Backup Job 02" | Set-VBRJobProxy -AutoDetect

298 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VBRJobSchedule Short Description Sets job schedule options.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Set-VBRJobSchedule -Job <CBackupJob[]> [-Daily] [-At <DateTime>] [-DailyKind <DailyOptions+DailyKinds>] [-Days <DayOfWeek[]>] [WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Set-VBRJobSchedule -Job <CBackupJob[]> [-At <DateTime>] [-Days <DayOfWeek[]>] [-Monthly] [-NumberInMonth <EDayNumberInMonth>] [-Months <EMonth[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>][<CommonParameters>]

-OR-

Set-VBRJobSchedule -Job <CBackupJob[]> [-Periodicaly] [-FullPeriod <Int32>] [-PeriodicallyKind <PeriodicallyOptions+PeriodicallyKinds>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Set-VBRJobSchedule -Job <CBackupJob[]> [-After] [-AfterJob <CBackupJob>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet sets custom schedule settings to the selected job.

You can schedule the job to run:

• Daily on specific time, on specific days of week,

• Monthly on specific time, on specific days of month, on specific months,

• Periodically within specified period of time or continuously,

• After a certain job you specify.

299 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Job <CBackupJob[]>

Specifies the job you want to set schedule to.

You can assign multiple jobs to this object.

True Named

True (ByValue,

ByPropertyName)

False

Daily:

[-Daily] Sets job schedule to daily run. False Named False False

[-At <DateTime>]

Specifies the job start time. If not set, the job will start at 10:00 by default.

False Named False False

[-DailyKind <DailyOptions+DailyKinds>]

Specifies the days to run the job:

Everyday: the job will run everyday, Weekdays: the job will run Monday through Friday, Selected days: the job will run on specific days (i.e. Saturdays). Use -Days parameter to set the specific days.

False Named False False

[-Days <DayOfWeek[]>]

Specifies the days of week to run the job. False Named False False

Monthly:

[-At <DateTime>]

Specifies the job start time. If not set, the job will start at 10:00 by default.

False Named False False

[-Days <DayOfWeek[]>]

Specifies the day of week to run the job. Use this parameter to set the day for -NumberInMonth parameter, i.e. to run the job on first Saturday every month.

False Named False False

[-NumberInMonth <EDayNumberInMonth>]

Specifies the period condition for the job run: First/Second/Third/Forth/Last.

Use this parameter to set the condition for -Days parameter, i.e. to run the job on first Saturday every month.

False Named False False

[-Monthly] Sets job schedule to monthly run. False Named False False

300 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

[-Months <EMonth[]>]

Specifies the months to run the job. False Named False False

Periodically:

[-Periodicaly] Sets job schedule to periodical run. False Named False False

[-FullPeriod <Int32>]

Sets the integer specifying value for the time period to run the job.

Use this parameter to set the value for -PeriodicallyKind parameter.

False Named False False

[-PeriodicallyKind <PeriodicallyOptions+PeriodicallyKinds>]

Specifies the measurement unit for the time period:

Hours: the job will run periodically in number of hours set in -FullPeriod parameter, Minutes: the job will run periodically in number of minutes set in -FullPeriod parameter, Continuously: the job will run continuously starting right after it has finished. Use this parameter to set the measure unit for the value set in -FullPeriod parameter.

False Named False False

After this job:

[-After] Sets job schedule to run after a specific job. False Named False False

[-AfterJob <CBackupJob>]

Specifies the job after which you want to run this job. False Named False False

<CommonParameters>

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

301 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command sets a new schedule to jobs Backup Job 01 and Backup Job 05:

• The jobs are piped to the cmdlet,

• The jobs are scheduled to run daily at 23:00 on weekdays.

Get-VBRJob -Name "Backup Job 01", "Backup Job 05" | Set-VBRJobSchedule -Daily -At "23:00" -DailyKind Weekdays

Example 2 This command schedules all replication jobs to monthly run:

• The replication jobs object is piped to the cmdlet,

• The jobs are scheduled to run every last Saturday at 12:00 in February, May, August and December.

Get-VBRJob -Name Replica* | Set-VBRJobSchedule -Monthly -At "12:00" -NumberInMonth Last -Days Saturday -Months February, May, August, December

Example 3 This command schedules the job represented by the $job variable to run every 12 hours. The job object is assigned to the $job variable beforehand.

Set-VBRJobSchedule -Job $job -Periodicaly -FullPeriod 12 -PeriodicallyKind Hours

Example 4 This command schedules the job represented by the $job variable to run after the SureBackup job named SureBackup Job 01. The SureBackup Job 01 is piped to cmdlet. The Backup job object is assigned to $job variable beforehand.

Get-VBRJob -Name "SureBackup Job 01" | Set-VBRJobSchedule -After -AfterJob $job

302 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VBRJobScheduleOptions Short Description Applies customized job scheduling settings to a selected backup, replication or copy job.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Set-VBRJobScheduleOptions [-Job] <CBackupJob[]> [-Options] <ScheduleOptions> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet applies customized scheduling options to a selected job.

To customize the scheduling options you need to first run the New-VBRJobScheduleOptions cmdlet. New-VBRJobScheduleOptions returns the ScheduleOptions object containing the set of default scheduling options. You can customize any of these options and apply further to any kind of jobs.

Run Set-VSBJobScheduleOptions to edit scheduling options of SureBackup job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CBackupJob[]>

Specifies the job for which you want to change the scheduling options.

You can assign multiple jobs to this object.

True 1

True (ByValue,

ByPropertyName)

False

[-Options] <ScheduleOptions>

Specifies the custom scheduling options.

Run New-VBRJobScheduleOptions to obtain the custom set of scheduling options.

True 2 False False

<CommonParameters>

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

303 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command applies the customized scheduling options to the jobs named "DC Backup" and "DC File Copy". The jobs are obtained with Get-VBRJob and piped down. The options to apply are set to the $"Schedule Options" variable beforehand by running New-VBRJobScheduleOptions.

Get-VBRJob -Name "DC Backup", "DC File Copy" | Set-VBRJobScheduleOptions -Options $"Schedule Options"

Example 2 This command applies the customized scheduling options to the job represented by the $job variable. The job is obtained with Get-VBRJob and assigned to the variable beforehand. The options to apply are set to the $"Schedule Options" variable beforehand by running New-VBRJobScheduleOptions.

Set-VBRJobScheduleOptions -Job $job -Options $"Schedule Options"

304 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VBRJobVssOptions Short Description Applies custom VSS job settings.

Applies to Version:

Platform: VMware, Hyper-V

Syntax

Set-VBRJobVssOptions [-Job] <CBackupJob[]> [-Options] <CVssOptions> -Credential <CCredentials> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet applies a set of customized VSS settings to a selected job.

VSS (Volume Shadow Services) is a Windows OS service allowing to copy files of running applications that can be modified at the moment of copying. The VSS-aware applications typically are Active Directory, Microsoft SQL, Microsoft Exchange, Sharepoint, etc. To create a transactionally consistent backup of a VM running VSS-aware applications without shutting them down, Veeam Backup & Replication uses application-aware image processing. It allows backup the data fully and consistently.

To apply the set of customized settings you need to first create a CVssOptions object which unifies all the VSS options you want to apply to the job. The CVssOptions object is created with the help of New-VBRJobVssOptions cmdlet. See the New-VBRJobVssOptions topic for detailed instructions.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CBackupJob[]>

Specifies the job you want to edit. True 1

True (ByValue,

ByPropertyName)

False

[-Options] <CVssOptions>

Specifies the set of parameters you want to apply to the job.

True 2 False False

-Credential <CCredentials>

Specifies the credentials you want to use for authenticating with the guest VM.

True Named False False

<CommonParameters>

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

305 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example This command applies custom settings to the backup job named "Backup Job 01". The job object is piped to the cmdlet. First the -Options object is got and assigned to the $options variable.

Get-VBRJob -Name "Backup Job 01" | Set-VBRJobVssOptions -Options $options

306 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VSBJobOptions Short Description Applies custom SureBackup job options.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Set-VSBJobOptions [-Job] <CSbJob> [-Options] <CDRJobOptions> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet applies customized job options to SureBackup jobs.

To customize the SureBackup job options you need to first run the New-VSBJobOptions cmdlet. New-VSBJobOptions returns the CDRJobOptions object containing the set of default SureBackup job options. You can customize any of these options and apply further to a SureBackup job.

Run Set-VBRJobOptions to edit job options of backup, replication or copy job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CSbJob>

Specifies the SureBackup job for which you want to customize the job options.

You can assign multiple jobs to this object.

True 1

True (ByValue,

ByPropertyName)

False

[-Options] <CDRJobOptions>

Specifies the custom SureBackup job options.

Run New-VSBJobOptions to obtain the custom set of SureBackup job options.

True 2 False False

<CommonParameters>

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

307 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command applies the customized options to the job named "SureBackup Job 01". The job object is obtained with Get-VSBJob and piped down. The options to apply are set to the $"Sure Options" variable beforehand by running New-VSBJobOptions.

Get-VBRJob -Name "SureBackup Job 01" | Set-VSBJobOptions -Options $"Sure Options"

Example 2 This command applies the customized job options to the job represented by the $SureJob variable. The job is obtained with Get-VSBJob and assigned to the variable beforehand. The options to apply are set to the $"Sure Options" variable beforehand by running New-VSBJobOptions.

Set-VBRJobScheduleOptions -Job $SureJob -Options $"Sure Options"

308 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VSBJobScheduleOptions Short Description Applies customized job scheduling settings to a specified SureBackup job.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Set-VSBJobScheduleOptions [-Job] <CSbJob> [-Options] <ScheduleOptions> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet applies customized scheduling options to a selected SureBackup job.

To customize the scheduling options you need to first run the New-VBRJobScheduleOptions cmdlet. New-VBRJobScheduleOptions returns the ScheduleOptions object containing the set of default scheduling options. You can customize any of these options and apply further to any kind of jobs.

Run Set-VBRJobScheduleOptions to edit scheduling options of backup, replication or copy job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CSbJob>

Specifies the SureBackup job for which you want to change the scheduling options.

You can assign multiple SureBackup jobs to this object.

True 1

True (ByValue,

ByPropertyName)

False

[-Options] <ScheduleOptions>

Specifies the custom scheduling options.

Run New-VBRJobScheduleOptions to obtain the custom set of scheduling options.

True 2 False False

<CommonParameters>

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

309 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command applies the customized scheduling options to the SureBackup jobs named "SharePoint SureJob" and "MailServer SureJob". The jobs are obtained with Get-VSBJob and piped down. The options to apply are set to the $"Schedule Options" variable beforehand by running New-VBRJobScheduleOptions.

Get-VSBJob -Name "SharePoint SureJob", "MailServer SureJob" | Set-VSBJobScheduleOptions -Options $"Schedule Options"

Example 2 This command applies the customized scheduling options to the SureBackup job represented by the $SureJob variable. The job object is obtained with Get-VSBJob and assigned to the variable beforehand. The options to apply are set to the $"Schedule Options" variable beforehand by running New-VBRJobScheduleOptions.

Set-VSBJobScheduleOptions -Job $SureJob -Options $"Schedule Options"

310 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Set-VSBJobSchedule Short Description Sets SureBackup job schedule options.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Set-VSBJobSchedule [-Job] <CSbJob> [-Daily] [-At <DateTime>] [-DailyKind <DailyOptions+DailyKinds>] [-Days <DayOfWeek[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Set-VSBJobSchedule [-Job] <CSbJob> [-At <DateTime>] [-Days <DayOfWeek[]>] [-Monthly] [-NumberInMonth <EDayNumberInMonth>] [-Months <EMonth[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Set-VSBJobSchedule [-Job] <CSbJob> [-After] [-AfterJob <CBackupJob>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet sets custom schedule settings to the selected SureBackup job.

You can schedule the job to run:

• Daily on specific time, on specific days of week,

• Monthly on specific time, on specific days of month, on specific months,

• After a certain job you specify.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-[-Job] <CSbJob>

Specifies the SureBackup job you want to set schedule to. You can include multiple jobs into this object.

True Named

True (ByValue,

ByPropertyName)

False

Daily:

[-Daily] Sets SureBackup job schedule to daily run. False Named False False

[-At <DateTime>]

Specifies the SureBackup job start time. If not set, the job

False Named False False

311 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

will start at 10:00 by default.

[-DailyKind <DailyOptions+DailyKinds>]

Specifies the days to run the SureBackup job:

Everyday: the job will run everyday, Weekdays: the job will run Monday through Friday, Selected days: the job will run on specific days (i.e. Saturdays). Use -Days parameter to set the specific days.

False Named False False

[-Days <DayOfWeek[]>]

Specifies the days of week to run the SureBackup job. False Named False False

Monthly:

[-At <DateTime>]

Specifies the SureBackup job start time. If not set, the job will start at 10:00 by default.

False Named False False

[-Days <DayOfWeek[]>]

Specifies the day of week to run the SureBackup job. Use this parameter to set the day for -NumberInMonth parameter, i.e. to run the job on first Saturday every month.

False Named False False

[-NumberInMonth <EDayNumberInMonth>]

Specifies the period condition for the SureBackup job run: First/Second/Third/Forth/Last.

Use this parameter to set the condition for -Days parameter, i.e. to run the job on first Saturday every month.

False Named False False

[-Monthly] Sets SureBackup job schedule to monthly run. False Named False False

[-Months <EMonth[]>]

Specifies the months to run the SureBackup job. False Named False False

After this job:

[-After] Sets SureBackup job schedule to run after a specific job. False Named False False

[-AfterJob <CBackupJob>]

Specifies the job after which you want to run the SureBackup job.

False Named False False

<CommonParameters>

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

312 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command sets a new schedule to jobs SureBackup Job 01 and SureBackup Job 05:

• The jobs are piped to the cmdlet,

• The jobs are scheduled to run daily at 23:00 on weekdays.

Get-VSBJob -Name "SureBackup Job 01", "SureBackup Job 05" | Set-VSBJobSchedule -Daily -At "23:00" -DailyKind Weekdays

Example 2 This command schedules all SureBackup jobs to monthly run:

• The jobs object is piped to the cmdlet,

• The SureBackup jobs are scheduled to run every last Saturday at 12:00 in February, May, August and December.

Get-VSBJob -Name Sure* | Set-VSBJobSchedule -Monthly -At "12:00" -NumberInMonth Last -Days Saturday -Months February, May, August, December

Example 3 This command schedules the job represented by the $job variable to run after the SureBackup job named SureBackup Job 01. The SureBackup Job 01 is piped to cmdlet. The Backup job object is assigned to $job variable beforehand.

Get-VBRJob -Name "SureBackup Job 01" | Set-VBRJobSchedule -After -AfterJob $job

313 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRInstantRecovery Short Description Starts instant VM recovery.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Start-VBRInstantRecovery [-RestorePoint] <COib> [-VMName <String>] [-Server] <CHost> [-ResourcePool] <CViResourcePoolItem> [-Datastore <CViDatastoreItem>] [-Folder <CViFolderItem>] [-PowerUp] [-NICsEnabled] [-Reason <String>] [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet starts VM instant recovery.

With instant recovery technology, Veeam Backup & Replication starts a VM directly from a backup, incremental or full, without copying it to production storage.

Please note that the instantly recovered VM runs from a backup and does not provide a wholly functioning service. You need to finalize the successful instant recovery by either permanently migrating the recovered VM to production or by stopping publishing the recovered VM. Run Start-VBRQuickMigration or Stop-VBRInstantRecovery respectively.

Run Restart-VBRInstantRecovery to restart a failed instant recovery job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-RestorePoint] <COib>

Specifies the restore point to which you want to recover the VM.

True 1

True (ByValue,

ByPropertyName)

False

[-VMName <String>]

Specifies the name you want to apply to the restored VM. By default, the original VM name is applied.

False Named False False

[-Server] <CHost>

Specifies the target host where you want to locate the restored VM.

True 2 False False

[-ResourcePool] <CViResource PoolItem>

Specifies the resource pool where you want to locate the restored VM.

False 3 False False

[-Datastore <CViDatastore

Specifies the datastore to which you want to connect

False Named False False

314 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Item>] the restored VM.

[-Folder <CViFolder Item>]

Specifies the folder where you want to locate the restored VM.

False Named False False

[-PowerUp]

If set, the restored VM will be powered up immediately after the restore. Otherwise, you will have to power up the VM manually.

False Named False False

[-NICsEnabled]

If set to True, the restored VM will be connected to the network. Otherwise the VM will have no network connections.

False Named False False

[-Reason <String>]

Specifies the reason for performing restore of the selected VM.

The information you provide will be saved in the session history so that you can reference it later.

False Named False False

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

315 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command starts the instant recovery of the VM named "MSExchange". The VM is restored to the original location and to the last restore point.

The backup and the restore point are obtained with Get-VBRBackup and Get-VBRRestorePoint respectively and piped down. The server to locate the restored VM is obtained with Get-VBRServer and assigned to the $server variable beforehand.

Get-VBRBackup -Name "MSExchange Backup" | Get-VBRRestorePoint | Select -Last 1 | Start-VBRInstantRecovery -Server $server

Example 2 This command restores the VM to another location and with different settings. The following parameters are set:

• The restore point is obtained with Get-VBRRestorePoint and assigned to the $restorepoint variable,

• The VM is restored with name "MSExchange_Restored",

• The server to locate the restored VM is obtained with Get-VBRServer and assigned to the $server variable,

• The resource pool is obtained with Find-VBRViResourcePool and assigned to the $pool variable,

• The datastore is obtained with Find-VBRViDatastore and assigned to the $store variable,

• The folder to locate the restored VM is C:\Restored,

• The -PowerUp parameter is set to TRUE to enable the auto power up of the restored VM,

• The -NICsEnabled parameter is set to TRUE to connect the restored VM to the host network,

• The restore reason is "Data recovery",

• The RunAsync parameter is set to bring the process to the background.

Start-VBRInstantRecovery -RestorePoint $restorepoint -VMName "MSExchange_Restored" -Server $server -ResourcePool $pool -Datastore $store -Folder "C:\Restored" -PowerUp TRUE -NICsEnabled TRUE -Reason "Data recovery" -RunAsync

316 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRHvInstantRecovery Short Description Starts a VM instant recovery.

Applies to Version: 7.0

Platform: Hyper-V

Syntax

Start-VBRHvInstantRecovery [-RestorePoint] <COib> [-Server] <CHost> [-Path] <String> [-VMName <String>][-PreserveVmID [<Boolean>]] [-PowerUp [<Boolean>]] [-NICsEnabled [<Boolean>]] [-PreserveMACs [<Boolean>]] [-Reason <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet allows to perform instant VM recovery.

When you run this cmdlet, Veeam Backup & Replication creates a copy of a VM in your Hyper-V environment and starts it immediately (if needed). The VM is started directly from a compressed and deduplicated backup file. To finalize recovery of a VM and transfer it to the production host, you can run the Start-VBRHvInstantRecoveryMigration cmdlet. To terminate work of the VM, you can run the Stop-VBRInstantRecovery cmdlet. In this case, the recovered VM will be deleted from the host.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-RestorePoint] <COib>

Specifies the VM restore point you want to restore the VM to. True 1

True (ByValue,

ByPropertyName)

False

[-Server] <CHost>

Specifies the server where you want to restore the VM. True 2 False False

[-Path] <String>

Specifies the path to the folder to store the redo logs. True 3 False False

[-VMName <String>]

Specifies the name of the VM you want to restore. If not set, the name of the backup will be used.

False Named False False

[-PowerUp [<Boolean>]]

If set to $True, the VM will be powered up right after it is restored. Otherwise, you will need to power up the VM manually.

False Named False False

[-NICsEnabled [<Boolean>]]

If set to $True, the restored VM will be connected to the

False Named False False

317 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

network. Otherwise the VM will have no network connections.

[-Reason <String>]

Specifies the reason for performing restore of the selected VM.

The information you provide will be saved in the session history so that you can reference it later.

False Named False False

<CommonParameters>

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

Example This command starts instant recovery of the VM.

• The $rpoint variable contains the VM and the restore point to which the VM should be restored,

• The $host variable contains the server where the VM will be restored,

• The path for redo logs is c:\Hyper-V\Virtual Hard Disks\Redo,

• The VM will be restored with name "New-Exch01",

• The -PowerUp parameter is set to $True to enable the VM power up automatically.

Start-VBRHvInstantRecovery -RestorePoint $rpoint -Server $host -Path "c:\Hyper-V\Virtual Hard Disks\Redo" -VMName New-Exch01 -PowerUp $True

318 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRHvInstantRecoveryMigration Short Description Performs VM migration to a Hyper-V host.

Applies to Version: 6.5

Platform: Hyper-V

Syntax

Start-VBRHvInstantRecoveryMigration [-InstantRecovery] <InstantRecovery[]> [-WarningAction <ActionPreference>][-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet finalizes the instant recovery session started by Start-VBRHvInstantRecovery.

You can terminate the migration process with Stop-VBRInstantRecovery.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-InstantRecovery <InstantRecovery[]>

Specifies the session(s) started with the Start-VBRHvInstantRecovery cmdlet to finalize migration of a recovered VM to a Hyper-V host.

You can assign multiple instant recovery sessions to this object.

True 1

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command starts a VM migration. Pipelline is used to get the instant recovery session and pass it to the cmdlet.

Get-VBRInstantRecovery | Start-VBRHvInstantRecoveryMigration

319 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRJob Short Description Starts backup, replication or copy job.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Start-VBRJob [-Job] <CBackupJob[]> [-FullBackup] [-RetryBackup] [-RunAsync]

Detailed Description This cmdlet allows you to start a created or stopped job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

Job Specifies the job you want to start. True 1

True (ByValue,

ByPropertyName)

False

FullBackup Specify this parameter if you want to perform a full backup. False Named False False

RetryBackup Specify this parameter if you want to retry the backup job in case it fails.

False Named False False

RunAsync Specify this parameter if you want to open the VM’s console before the VM actually starts.

False Named False False

<CommonParameters>

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

320 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRLinuxFileRestore Short Description Performs non-MS Windows OS files restore.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Start-VBRLinuxFileRestore -RestorePoint <COib> [-Reason <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet performs file-level recovery for any guest OS.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-RestorePoint <COib>

Specifies the particular restore point of the VM. True Named

True (ByValue,

ByPropertyName)

False

[-Reason <String>]

Specifies the reason for performing files restore.

The information you provide will be saved in the session history so that you can reference it later.

False Named False False

<CommonParameters>

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

321 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example This command starts guest OS file recovery.

• Get-VBRBackup cmdlet is used to get the backup job files containing the needed VM.

• The last restore point is selected with Get-VBRRestorePoint cmdlet.

• The selected restorepoint is piped to the cmdlet.

• The reason is "Data recovery".

Get-VBRBackup -Name "Backup Job 01" | Get-VBRRestorePoint | Select -First 1 | Start-VBRLinuxFileRestore -Reason "Data recovery"

322 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRQuickMigration Short Description Starts Quick Migration of a virtual machine.

Applies to Version: 7.0

Platform: VMware

Syntax

Start-VBRQuickMigration -Entity <CViVmItem[]> -Server <CHost> [-ResourcePool <CViResourcePoolItem>] [-Datastore <CViDatastoreItem>] [-Folder <CViFolderItem>] [-SourceProxy <CViProxy[]>] [-TargetProxy <CViProxy[]>] [-ForceVeeamQM] [-DeleteSorceVmFiles] [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>][<CommonParameters>]

Detailed Description This cmdlet starts Quick Migration for a selected virtual machine(s).

Quick Migration is a service allowing to promptly migrate a VM between ESX(i) hosts, datastores or both in any state with minimum disruption to business operations and end user access to services.

Parameters

Parameter Description Required

Position Accept

Pipeline Input

Accept Wildcard

Characters

-Entity <CViVmItem[]>

Specifies the virtual machine(s) you want to migrate. You can assign multiple VMs to this object.

True Named

True (ByValue,

ByPropertyName)

False

-Server <CHost> Specifies the destination server to where you want to migrate the VM.

True Named

True (ByValue,

ByPropertyName)

False

[-ResourcePool <CViResource PoolItem>]

Specifies the destination resource pool to where you want to migrate the VM.

False Named False False

[-Datastore <CViDatastore Item>]

Specifies the destination datastore to where you want to migrate the VM.

False Named False False

[-Folder <CViFolderItem>]

Specifies the destination folder to where you want to migrate the VM.

False Named False False

[-SourceProxy <CViProxy[]>]

Specifies the source backup proxy(ies).

If not specified, Veeam

False Named False False

323 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Backup & Replication provides automatic selection of the proxy (recommended). For best migration performance you should deploy at least one source backup proxy.

You can assign multiple proxies to this object.

[-TargetProxy <CViProxy[]>]

Specifies the target backup proxy(ies).

If not specified, Veeam Backup & Replication provides automatic selection of the proxy (recommended). For best migration performance you should deploy at least one target backup proxy.

You can assign multiple proxies to this object.

False Named False False

[-ForceVeeamQM]

Forces using Veeam Quick Migration.

If omitted, migration process will use VMware VMotion given that the migration scenario and VMware licensing allows it.

False Named False False

[-DeleteSorce VmFiles]

If set, the original VM will be deleted upon receiving the heartbeat from the VM on the target host.

False Named False False

[-RunAsync]

Indicates that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

Example The following command starts Quick Migration of the selected VM. All parameters requiring objects are first assigned to variables. Source and target proxies are not set enabling the Quick Migration mechanism to select them automatically. -ForceVeeamQM parameter is not set enabling use of VMware VMotion. -DeleteSourceVmFiles parameter is set to enable clear up of the original VM files upon successful migration. -RunAsync parameter is not set.

Start-VBRQuickMigration -Entity $vm -Server $s -ResourcePool $r -Datastore $d -Folder $f -DeleteSorceVmFiles

324 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRReplicaFailover Short Description Starts fail over a corrupted VM to its replica.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Start-VBRReplicaFailover [-RestorePoint] <COib> [-Reason <String>] [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet allows you fail over a corrupted VM to its successfully created replica.

Performing failover is switching to a VM replica in case the original VM is damaged. You can fail over to the latest state of a replica or to any of its good known restore points.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-RestorePoint] <COib>

Specifies the replica restore point to which you want to fail over.

True Named

True (ByValue,

ByPropertyName)

False

[-Reason <String>]

Specifies the reason for performing a failover. False Named False False

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

325 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRRestoreVM Short Description Starts restore of the entire VM.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Start-VBRRestoreVM [-RestorePoint] <COib> [-Server] <CHost> [[-ResourcePool] <CViResourcePoolItem>] [[-Datastore] <CViDatastoreItem>] [-Folder <CViFolderItem>] [-VMName <String>] [-DiskType <EDiskCreationMode>] [-PowerUp [<Boolean>]] [-Reason <String>] [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet starts the entire VM restore.

With this cmdlet, you can restore the VM to the original location or to another location, or with different settings.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-RestorePoint] <COib>

Specifies the VM restore point to which you want to restore.

True 1

True (ByValue,

ByPropertyName)

False

[-Server] <CHost> Specifies the host where you want to locate the restored VM.

True 2 False False

[[-ResourcePool] <CViResource PoolItem>]

Specifies the resource pool where you want to locate the restored VM.

False 3 False False

[[-Datastore] <CViDatastore Item>]

Specifies the datastore to which you want to connect the restored VM.

False 4 False False

[-Folder <CViFolderItem>]

Specifies the folder where you want to locate the restored VM.

False Named False False

[-VMName <String>]

Specifies the name you want to apply to the restored VM. By default, the original VM name is applied.

False Named False False

326 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

[-DiskType <EDiskCreation Mode>]

Specifies the disk type foryou want to apply to the restored VM: Thin, Thick or AsOriginal.

False Named False False

[-PowerUp [<Boolean>]]

If set, the restored VM will be powered up immediately after the restore. Otherwise, you will have to power up the VM manually.

False Named False False

[-Reason <String>]

Specifies the reason for performing restore of the selected VM.

The information you provide will be saved in the session history so that you can reference it later.

False Named False False

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

Example This example allows you to restore the VM from the restore point specified in the $point variable and start it on the host specified in the $host variable and resource pool specified in the $rpool variable, putting it on the datastore specified in the $dstore variable:

Start-VBRRestoreVM –RestorePoint $point –Server $host –ResourcePool $rpool –Datastore $dstore –PowerUp TRUE

327 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRRestoreVMFiles Short Description Restores files on VM running Windows.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Start-VBRRestoreVMFiles [-RestorePoint] <COib> [-Server] <CHost> [-Path] <String> [-Files <COIBFileInfo[]>] [-Reason <String>] [-RunAsync]

Detailed Description This cmdlet allows you to start the file-level restore process for VMs running Windows.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

RestorePoint Specifies the VM restore point to which you want to restore. True 1 True False

Server Specifies the host to which the VM guest files should be restored. True 2 False False

Path Specifies the string with the path to the folder where restored files should be saved

True 3 False False

Files Specifies the files you want to restore (by default, all files from the VM will be restored).

False Named True

(ByName)

False

Reason Specifies the string with the reason for performing the VM guest OS file restore.

False Named False False

RunAsync Specify this parameter if you want to open the VM’s console before the VM actually starts.

False Named False False

<CommonParameters>

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

328 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example This example allows you to restore all VM guest OS files from the restore point specified in the $point variable and save them on the host specified in the $host variable to the C:\BackupFiles folder:

Start-VBRRestoreVMFiles –RestorePoint $point –Server $host –Path “C:\BackupFiles”

329 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRTapeCatalog Short Description Launches indexing process for library or tape.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Start-VBRTapeCatalog -Library <TapeLibrary> [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Start-VBRTapeCatalog -Medium <TapeMedium[]> [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet starts indexing process for files stored on tapes.

You can catalog for a library or for a tape or a group of tapes. This cmdlet provides scenarios for both cases.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Library <TapeLibrary>

Specifies the tape library you want to catalog. True Named

True (ByValue,

ByPropertyName)

False

-Medium <TapeMedium[]>

Specifies the tape(s) you want to catalog. True Named

True (ByValue,

ByPropertyName)

False

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

330 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command starts indexing the library represented by $lib variable. The -Library object is assigned to the variable beforehand. The -RunAsync parameter is set to enable the background processing of the job.

Start-VBRTapeCatalog -Library $lib -RunAsync

Example 2 This command starts indexing the tapes with names starting with "001". The needed tapes are piped to the cmdlet. The -RunAsync parameter is set to enable the background processing of the job.

Get-VBRTapeMedium -Name 001* | Start-VBRTapeCatalog

331 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRTapeInventory Short Description Launches inventory process for library or tape.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Start-VBRTapeInventory -Library <TapeLibrary> [-RunAsync] [-WarningAction <ActionPreference>][-WarningVariable <String>] [<CommonParameters>]

-OR-

Start-VBRTapeInventory -Medium <TapeMedium[]> [-RunAsync] [-WarningAction <ActionPreference>][-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet launches an inventory session. You can run an inventory session either for a library or for a tape.

The cmdlet provides syntax for both scenarios.

When you launch the Tape library inventory job for a specific library, Veeam Backup & Replication gets updated information on the components (i.e. media pools, drives, and tapes) of the selected library.

When you launch the Tape library inventory job for a specific tape, Veeam Backup & Replication recognizes its contents. You can then move the tapes to appropriate media pools according to their contents.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Library <TapeLibrary>

Specifies the tape library you want to inventory. True Named

True (ByValue,

ByPropertyName)

False

-Medium <TapeMedium[]>

Specifies the tape you want to inventory.

True Named

True (ByValue,

ByPropertyName)

False

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False Named False False

332 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

<CommonParameters>

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

Example 1 This command starts the Tape library inventory job for the library represented by $lib variable. The -Library object is assigned to the variable beforehand. -RunAsync parameter is set to enable the background processing of the job.

Start-VBRTapeInventory -Library $lib -RunAsync

Example 2 This command starts the Tape library inventory job for the tape named "00110000". The needed tape is piped to the cmdlet. The -RunAsync parameter is set to enable the background processing of the job.

Get-VBRTapeMedium -Name 00110000 | Start-VBRTapeInventory

You get the following result of the inventory session:

Restore Type Job Name State Start Time End Time Description

------------ -------- ----- ---------- --------

TapeInven... Tape ... Stop... 6/26/2013 6/26/2013

333 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRTapeRestore Short Description Starts VM restore from tape.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Start-VBRTapeRestore -RestorePoint <COib[]> -Repository <CBackupRepository> [-Reason <string>] [-RunAsync][<CommonParameters>]

-OR-

Start-VBRTapeRestore -RestorePoint <COib[]> -Server <CHost> -Path <string> [-Reason <string>] [-RunAsync][<CommonParameters>]

Detailed Description This cmdlet starts restoring VMs from backup copied to tape.

You can restore VMs to a chosen backup repository or to a folder on the server you specify. Choose an appropriate syntax for each option.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-RestorePoint <COib[]>

Specifies the particular restore point(s) of the VM.

You can assign multiple restore points to this object.

True Named

True (ByValue,

ByPropertyName)

False

-Repository <CBackup Repository>

Specifies the backup repository where you want to restore the VM.

True Named False False

[-Reason <string>] Specifies the reason for restore. False Named False False

-Server <CHost> Specifies the server where you want to restore the VM.

True Named False False

-Path <string> Specifies the path to the folder where you want to restore the VM.

True Named False False

[-RunAsync] Indicate that the command returns immediately without waiting for the task to

False Named False False

334 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

complete.

<CommonParameters>

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

Example 1 This command starts restoring a VM named "VM01" to a specified backup repository.

• The VM01 restore point is piped to the cmdlet; the most recent restore point is selected,

• The $repository variable contains the repository to where the VM will be restored,

• The reason for restore is data recovery,

• The -RunAsync parameter is set to bring the process to the background.

Get-VBRRestorePoint -Backup $backup | where {$_.Name -eq "VM01"} | select -first 1 | Start-VBRTapeRestore -Repository $repository -Reason "Data recovery" -RunAsync

Example 2 This command starts restoring a VM to a specified backup repository.

• The $rpoint variable contains the restore point to which the VM wil be restored,

• The $host variable contains the server to where the VM will be restored,

• The path to the folder where the VM will be restored is c:\Restored,

• The -Reason parameter is not set,

• The -RunAsync parameter is set to bring the process to the background.

Start-VBRTapeRestore -RestorePoint $rpoint -Server $host -Path c:\Restored -RunAsync

335 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRTapeRestoreFiles Short Description Starts files restore from tape.

Applies to Version: 7.0

Platform: VMware, Hyper-V

Syntax

Start-VBRTapeRestoreFiles -Server <CHost> -Path <string> [-Files <CatalogueFile[]>] [-Version<CatalogueFileVersion[]>] [-PreserveHierarhy] [-Overwrite <RestoreOverwrite> {None | Newer | Always}] [-Security] [-RunAsync] [<CommonParameters>]

Detailed Description This cmdlet starts restoring files from backup copied to tape.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Server <CHost> Specifies the source server where the files to restore are located.

True Named False False

-Path <string> Specifies the path to the files to restore.

True Named False False

[-Files <CatalogueFile[]>]

Specifies the files to restore. False Named

True (ByValue,

ByPropertyName)

False

[-Version <CatalogueFile Version[]>]

Specifies the version of the files you want to restore.

False Named

True (ByValue,

ByPropertyName)

False

[-PreserveHierarhy]

If indicated, the files and folders will be restored in respect to the original folder hierarchy. Otherwise all files and folders are restored into a plain sequence.

False Named False False

[-Overwrite <RestoreOverwrite> {None | Newer | Always}]

Indicates the overwrite options in case the file exists:

• None - leave the original file, • Newer - overwrite the

False Named False False

336 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

file if the restore file in newer, • Always - overwrite the existing file.

[-Security]

If indicated, the files will be restored with with the original security settings. Otherwise the file/folder security settings will be inherited from parent item.

False Named

True (ByValue,

ByPropertyName)

False

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

Example This command starts a file restore session with the following parameters:

• The file name is "VM01 Backup Job 1.vbm",

• The file version to restore is found with the Find-VBRTapeCatalogue cmdlet sorted by "Versions",

• The $host variable contains the source server object,

• The file path is "C:\backup\Backup Job 1\VM01 Backup Job 1.vbm",

• The -PreserveHierarhy parameter is set to retain the original folder hierarchy,

• The -Overwrite parameter is set to Always to get all the files from backup.

Find-VBRTapeCatalogue -Name *vbm | Foreach {$_.Versions} | Select -Last 1 | Start-VBRTapeRestoreFiles -Server $host -Path C:\backup\Backup Job 1\VM01 Backup Job 1.vbm -PreserveHierarhy -Overwrite Always

337 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRvCloudInstantRecovery Short Description Starts a VM instant recovery.

Applies to Version: 7.0

Platform: VMware

Syntax

Start-VBRvCloudInstantRecovery [-RestorePoint] <COib> [-vApp <CVcdVappItem>] [-VmName <String>] [-Datastore <CVcdDatastoreRestoreInfo>] [-PowerOn] [-Reason <String>] [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet performs instant recovery of the selected VM. You can restore the VM to the original location or to another vApp.

To restore the VM to another vApp indicate the desired vApp object for the -vApp parameter. To perform restore to the original location, omit this parameter.

The VM that you want to restore and its parameters are derived from the specified restore point data.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-RestorePoint] <COib>

Specifies the restore point of the VM. True 1

True (ByValue, ByPropertyName)

False

[-vApp <CVcdVappItem>]

Specifies the vApp you want to restore the VM to. If omitted, the VM will be restored to the original vApp.

False Named False False

[-VmName <String>]

Specifies the name under which the VM should be restored and registered. By default, the original name of the VM is used. If you are restoring the VM to the same vApp where the original VM is registered and the original VM still resides there, it is recommended that you change the VM name to avoid conflicts.

False Named False False

[-Datastore <CVcdDatastore

Specifies the datastore you want to connect the restored VM to. If ommited, the VM will

False Named False False

338 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

RestoreInfo>] be connected to the original datastore.

Note: If you restore the VM to another vApp, make sure that the datastore is available in the Organization VCD hosting the vApp to which the VM is restored.

[-PowerOn]

If set, the VM will be powered up right after it is restored. Otherwise you will need to power up the VM manually.

False Named False False

[-Reason <String>]

Specifies the reason for performing restore of the selected VM.

The information you provide will be saved in the session history so that you can reference it later.

False Named False False

[-RunAsync]

Indicates that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

339 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command starts instant recovery for the VM. The VM is restored to the original location with all its settings unchanged.

The restore point object is got beforehand and assigned to the $rpoint variable.

Start-VBRvCloudInstantRecovery -RestorePoint $rpoint

Example 2 This command starts instant recovery for the VM named "VM01". The VM is restored to another vApp and is connected to another datastore.

• The VM restore point is piped to the cmdlet. The most resent restore point is selected,

• The new vApp the VM is restored to is represented by the $vapp variable,

• The -VmName parameter is omitted to restore the VM with its original name,

• The new datastore the VM will be connected to is represented by $datastore variable,

• The -PowerOn parameter is set to power up the VM automatically right after it is restored,

• The reason for restore is "Configuration test",

• The RunAcync parameter is set to bring the process to the background.

Get-VBRRestorePoint -Backup $backup | where {$_.Name -eq "VM01"} | Select -First 1 | Start-VBRvCloudInstantRecovery -vApp $vapp -Datastore $datastore -PowerOn -Reason "Configuration test" -RunAsync

340 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRvCloudRestoreVApp Short Description Starts a vApp restore.

Applies to Version: 7.0

Platform: VMware

Syntax

Start-VBRvCloudRestoreVApp [-RestoreParams] <CVcdVAppRestoreSettings> [-PowerUp][-Reason <string>][-RunAsync][<CommonParameters>]

-OR-

Start-VBRvCloudRestoreVApp [-RestorePoint] <COib> [-PowerUp] [-Reason <string>][-RunAsync][<CommonParameters>]

Detailed Description This cmdlet starts a restore session of a selected vApp.

With this cmdlet, you can restore the vApp to the original location or to another location, or with different settings.

To restore the vApp to the original location you only need to indicate the desired restore point. Be careful to specify the restore point of the vApp, not an individual VM which is not a valid value for this cmdlet. Veeam Backup & Raplication gets all the information needed for restore from the restore point data.

To run restore to another location or with different settings you need to first create a CVcdVAppRestoreSettings object which unifies all the settings options required for restore. The CVcdVAppRestoreSettings object is created with the help of the New-VBRvCloudVAppRestoreSettings cmdlet. See the New-VBRvCloudVAppRestoreSettings topic for detailed instructions for advanced setup options.

This cmdlet provides two scenarios for each case.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-RestoreParams] <CVcdVApp RestoreSettings>

Specifies the CVcdVAppRestoreSettings object containing all settings required for the vApp restore. You can get the CVcdVAppRestoreSettings object by running the New-VBRvCloudVAppRestoreSettings cmdlet. It is used for restoring vApp to another location or with different

True 1

True (ByValue,

ByPropertyName)

False

341 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

settings.

[-RestorePoint] <COib>

Specifies the restore point of the vApp. Used to restore vApp with all the same settings unchanged.

False Named False False

[-PowerUp]

If set, the vApp will be powered up right after it is restored. Otherwise you will need to power up the vApp manually.

False Named False False

[-Reason <string>]

Specifies the reason for performing restore of the selected vApp.

The information you provide will be saved in the session history so that you can reference it later.

False Named False False

[-RunAsync]

Indicates that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

342 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command starts a vApp restore. The vApp named "vApp_01" is restored to the original location and with all settings unchanged.

To start the vApp restore, you need to get first the corresponding restore point.

• The latest restore point is got from the backup represented by the $backup variable, the backup named "vApp_01" is selected from the list of available backups by name.

$restorepoint= $Backup | Get-VBRRestorePoint | Sort-Object $_.creationtime -Descending | select-object -First 1

Start-VBRvCloudRestoreVApp -RestorePoint $restorepoint

Example 2 This command restores a vApp to another location. The vApp named "vApp_01" is restored to organization named "Org_02" with all other settings remaining unchanged.

To start the vApp restore, you need to get the CVcdVAppRestoreSettings object that contains all settings required for restore. These settings are derived from the vApp restore point. First the CVcdVAppRestoreSettings object is got and assigned to the $restoreparams variable.

• The $restoreparams variable contains the CVcdVAppRestoreSettings object.

• The restore point is got from the backup represented by the $backup variable, the backup named "vApp_01" is selected from the list of available backups by name.

• In the $restoreparams the OrganizationVdc parameter is set to organization named "Org_02".

• The RunAcync parameter is set to bring the process to the background.

$restoreparams=Get-VBRRestorePoint -Backup $backup | where {$_.Name -eq "vApp_01"} | New-VBRvCloudVAppRestoreSettings

$restoreparams.OrgVdc=Find-VBRvCloudEntity -OrganizationVdc | where {$_.name -eq "Org_02"}

Start-VBRvCloudRestoreVApp -RestoreParams $restoreparams -RunAsync

343 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRvCloudRestoreVm Short Description Starts a vCloud VM restore.

Applies to Version: 7.0

Platform: VMware

Syntax

Start-VBRvCloudRestoreVm [-RestorePoint] <COib> [-vApp <CVcdVappItem>] [-StorageProfile <CVcdOrgVdcStorageProfile>] [-vCloudDatastore <CVcdDatastoreRestoreInfo>] [-VmTemplate <IVcdItem>] [-VMName <String>] [-PowerUp] [-Reason <String>] [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet starts a restore session of a selected vCloud VM.

With this cmdlet, you can restore the VM to the original location or to another location, or with different settings.

To restore a VM to the original location you only need to indicate the desired restore point. Be careful to specify the restore point of the VM, not the vApp which is not a valid value for this cmdlet. Veeam Backup & Raplication gets all the information needed for restore from the restore point data.

To run restore to another location or with different settings you need to set the new settings values with the parameters available in this cmdlet. These parameters are not obligatory, so you can type only those that you want to change.

You cannot restore multiple VM with one command, to restore several VMs you need to start a restore session for each one.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-RestorePoint] <COib>

Specifies the restore point of the VM. If you specify no other parameters of the VM, it will be restored with its initial settings, i.e. the datastore or VM template.

A multiple VMs object is not valid in this cmdlet.

True 1

True (ByValue,

ByPropertyName)

False

[-vApp <CVcdVappItem>]

Specifies the vApp where to you want to restore the VM.

False Named False False

[-StorageProfile <CVcdOrgVdc StorageProfile>]

Specifies the storage profile you want to apply to the restored VM.

False Named False False

344 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

[-vCloudDatastore <CVcdDatastore RestoreInfo>]

Specifies the datastore you want to use with the restored VM.

False Named False False

[-VmTemplate <IVcdItem>]

Specifies the template you want to apply to the restored VM.

False Named False False

[-VMName <String>]

Specifies the VM name you want to apply to the restored VM.

False Named False False

[-PowerUp]

If set, the VM will be powered up right after it is restored. Otherwise you will need to power up the VM manually.

False Named False False

[-Reason <String>]

Specifies the reason for performing restore of the selected VM.

The information you provide will be saved in the session history so that you can reference it later.

False Named False False

[-RunAsync]

Indicates that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

Example 1 This command starts a vCloud VM restore. The VM is restored to the original location and with all settings unchanged.

The restore point object contains all the information needed for restore. The -RestorePoint object is got beforehand and assigned to the $restorepoint variable.

Start-VBRvCloudRestoreVm -RestorePoint $restorepoint

Example 2 This command restores a VM to another vApp and with another storage profile.

• The $restorepoint variable contains the restore point object for the VM to restore,

• The $vapp variable contains the vApp object to where the VM will be restored,

• The $profile variable contains the storage profile object that will be applied to the restored VM.

Start-VBRvCloudRestoreVm -RestorePoint $restorepoint -vApp $vapp -StorageProfile $profile

345 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRZip Short Description Performs VeeamZIP on the selected VM.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Start-VBRZip [-BackupRepository <CBackupRepository>] -Entity <IItem[]> [-Compression <Int32>] [-DisableQuiesce] [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

-OR-

Start-VBRZip [-Folder <String>] -Entity <IItem[]> [-Compression <Int32>] [-DisableQuiesce] [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet performs VeeamZIP on the selected VM.

VeeamZIP is a quick backup procedure always producing a full backup.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-BackupRepository <CBackup Repository>]

Specifies the backup repository where you want to save the backup file. If none is specified, the default repository will be used.

False Named False False

-Entity <IItem[]> Specifies the VM for which you want to create a VeeamZIP file.

True Named

True (ByValue,

ByPropertyName)

False

[-Compression <Int32>]

Specifies then integer number corresponding to the desired compression level:

0 = None. Consider disabling compression to achieve better deduplication ratios on deduplicating storage appliances at the cost of reduced backup

False Named False False

346 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

performance.

4 = Dedupe-friendly. This is the recommended setting for using with deduplicating storage devices and caching WAN accelerators. This setting is used by default.

5 = Optimal (recommended). Optimal compression provides for the best compression to performance ratio, and lowest backup proxy CPU usage.

6 = High. High compression provides additional 10% compression ratio over Optimal, at the cost of 8x higher CPU usage.

9 = Extreme. Extreme compression provides additional 3% compression ratio over High, at the cost of 2x higher CPU usage.

[-DisableQuiesce]

If set to TRUE, the applications running on the target VM will be quiesced to provide transactionally consistent backup with use of VMware Tools. Otherwise the VMware tools quiescence will be disabled.

False Named False False

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False Named False False

[-Folder <String>]

Specifies the full path to the folder on the server where you want to store the created backup file. If omitted, the created backup file will be saved to the C:\backup folder on the Veeam Backup server.

False Named False False

<CommonParameters>

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

347 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VBRWindowsFileRestore Short Description Starts VM files (VMX, VMDK, etc) restore.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Start-VBRWindowsFileRestore [-RestorePoint] <COib> [-Reason <String>]

Detailed Description This cmdlet allows you to restore VM files (VMX, VMDK, etc).

Parameters

Parameter Description Required

Position Accept

Pipeline Input

Accept Wildcard

Characters

RestorePoint Specifies the VM restore point to which you want to restore. True 1

True (ByValue,

ByPropertyName)

False

Reason Specifies the string with the reason for performing the VM file restore.

False Named False False

<CommonParameters>

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

348 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Start-VSBJob Short Description Starts a created SureBackup job.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Start-VSBJob [-Job] <CSbJob[]> [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet allows you to start a created SureBackup job.

SureBackup is a Veeam recovery verification technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

Run Stop-VSBJob to stop a running SureBackup job.

Run Start-VBRJob to start a backup, replication or copy job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CSbJob[]>

Specifies the SureBackup job you want to run.

You can assign multiple jobs to this object.

True 1

True (ByValue,

ByPropertyName)

False

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

349 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command starts the SureBackup jobs named "SharePoint SureJob 01" and "SharePoint SureJob 02". The jobs are obtained with Get-VSBJob and piped down.

Get-VSBJob -Name "SharePoint SureJob 01", "SharePoint SureJob 02" | Start-VSBJob

Example 2 This command starts the SureBackup job represented by the $SureJob variable. The job object is obtained with Get-VSBJob and assigned to the variable beforehand.

Start-VSBJob -Job $SureJob

350 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Stop-VBRInstantRecovery Short Description Stops a running instant VM recovery process.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Stop-VBRInstantRecovery [-InstantRecovery] <InstantRecovery[]> [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet stops publishing a VM within an instant recovery process.

With instant recovery technology, Veeam Backup & Replication starts a VM directly from a backup, incremental or full, without copying it to production storage. You need to finalize the successful instant recovery by either migrating the recovered VM to production or by stopping publishing the recovered VM.

To migrate the VM, run Start-VBRQuickMigration.

To restart a failed instant recovery job, run Restart-VBRInstantRecovery.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-InstantRecovery] <InstantRecovery[]>

Specifies the running instant VM recovery process that you want to stop.

True 1

True (ByValue,

ByPropertyName)

False

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

351 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command stops the last instant recovery session. The needed session object is obtained with Get-VBRInstantRecovery, selected by order and piped down.

Get-VBRInstantRecovery | Select -Last 1 | Stop-VBRInstantRecovery

Example 2 This command storps the instant recovery session represented by the $"Recovery Session" variable. The needed session object is obtained with Get-VBRInstantRecovery and assigned to the variable beforehand.

Stop-VBRInstantRecovery -InstantRecovery $"Recovery Session"

352 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Stop-VBRJob Short Description Stops a selected running backup, replication or copy job.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Stop-VBRJob [-Job] <CBackupJob[]> [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet stops a running backup, replication or copy job. The job is stopped once, the scheduled job will start the next scheduled time.

Run Start-VBRJob to start the job manually.

Run Disable-VBRJob to disable a job from the scheduled run.

Run Stop-VSBJob to stop a SureBackup job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CBackupJob[]>

Specifies the job you want to stop.

You can assign multiple jobs to this object.

True 1

True (ByValue,

ByPropertyName)

False

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

353 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command stops the copy job named "SharePoint File Copy Job". The needed job object is obtained with Get-VBRJob and piped down.

Get-VBRJob -Name "SharePoint File Copy Job" | Stop-VBRJob

Example 2 This command stops the copy job represented by the $"SharePoint File Copy Job" variable. The needed session object is obtained with Get-VBRJob and assigned to the variable beforehand.

Stop-VBRJob -Job $"SharePoint File Copy Job"

354 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Stop-VBRReplicaFailover Short Description This cmdlet allows you to undo the replica failover.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Stop-VBRReplicaFailover [-RestorePoint] <COib> [-RunAsync] [-Force]

Detailed Description This cmdlet allows you to undo the replica failover.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

RestorePoint Specifies the restore point of a VM to recover to. True 1

True (ByValue,

ByPropertyName)

False

RunAsync Indicates that the command returns immediately without waiting for the task to complete.

False Named False False

Force Specify this parameter if you want to force the undo operation even if errors occur.

False Named False False

<CommonParameters>

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

355 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Stop-VBRWindowsFileRestore Short Description Stops guest OS file recovery process for VMs running Windows.

Applies to Version: 7.0 and earlier

Platform: VMware

Syntax

Stop-VBRWindowsFileRestore [[-FileRestore] <FileRestore>] [-Drive <String>]

Detailed Description This cmdlet allows you to stop the initiated guest OS file recovery process for VMs running Windows.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

FileRestore Specifies the running file-level restore process you want to stop. True 1 False False

Drive

Specifies the string with the designation of the drive mounted on the system at file-level restore you want to disconnect.

False Named False False

<CommonParameters>

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

356 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Stop-VSBJob Short Description Stops a selected running SureBackup job.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Stop-VSBJob [-Job] <CSbJob[]> [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description This cmdlet stops a running SureBackup job. The job is stopped once, the scheduled SureBackup job will start the next scheduled time.

SureBackup is a Veeam recovery verification technology providing verification of virtual machines that need other virtual machines or services running, i.e. a domain controller, a DSN server or SQL database. To test such machines for recoverability, you need to create a SureBackup job and provide the copy of the production architecture running in a fenced-off environment that is performed by creating a virtual lab and an application group.

Run Start-VSBJob to start the job manually.

Run Stop-VBRJob to stop a backup, replication or copy job.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Job] <CSbJob[]>

Specifies the SureBackup job you want to stop.

You can assign multiple jobs to this object.

True 1

True (ByValue,

ByPropertyName)

False

[-RunAsync]

Indicates that the command returns immediately without waiting for the task to complete.

False Named False False

<CommonParameters>

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

357 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Example 1 This command stops the SureBackup job named "AD SureJob". The needed job object is obtained with Get-VSBJob and piped down.

Get-VSBJob -Name "AD SureJob" | Stop-VSBJob

Example 2 This command stops the SureBackup job represented by the $"AD SureJob" variable. The needed job object is obtained with Get-VSBJob and assigned to the variable beforehand.

Stop-VSBJob -Job $"AD SureJob"

358 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Sync-HP3Storage Short Description Rescans a SAN storage.

Applies to Version: 7.0

Platform: VMware

HP SAN storage system: HP 3PAR StoreServ

Syntax

Sync-HP3Storage [-Storage <CHp3PARHost>] [<CommonParameters>]

Detailed Description This cmdlet rescans the selected SAN storage to synchronize its infrastructure with Veeam Backup & Replication.

Rescanning discovers new or checks for deleted volumes and snapshots.

Veeam Backup & Replication runs rescan automatically every 3 minutes. You can perform rescan manually if you want to display the newly added or deleted volumes or snapshots.

Run Sync-HP3Volume to rescan the selected volumes only.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

[-Storage <CHp3PARHost>]

Specifies the storage you want to rescan. False Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command synchronizes the storage named "HP Store 01".

The storage object is obtained with Get-HP3Storage and piped down.

Get-HP3Storage -Name "HP Store 01" | Sync-HP3Storage

359 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Sync-HP3Volume Short Description Rescans a SAN volume.

Applies to Version: 7.0

Platform: VMware

HP SAN storage system: HP 3PAR StoreServ

Syntax

Sync-HP3Volume -Volume <CSanVolume[]> [<CommonParameters>]

Detailed Description This cmdlet rescans the selected SAN volume(s) to synchronize the storage system infrastructure with Veeam Backup & Replication.

Rescanning discovers new or checks for deleted snapshots.

Veeam Backup & Replication runs rescan automatically every 3 minutes. You can perform rescan manually if you want to display the newly added or deleted snapshots.

Run Sync-HP3Storage to rescan the SAN storage.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Volume <CSanVolume[]>

Specifies the volume(s) you want to synchronize.

You can assign multiple volumes to this object.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example 1 This command synchronizes the volume named "HP Vol 01".

The storage object is obtained with Get-HP3Volume and piped down.

Get-HP3Volume -Name "HP Vol 01" | Sync-HP3Volume

360 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Sync-HP4Storage Short Description Rescans a SAN storage.

Applies to Version: 7.0

Platform: VMware

HP SAN storage systems: HP LeftHand P4000, HP StoreVirtual VSA

Syntax

Sync-HP4Storage -Storage <CHpP4Group> [<CommonParameters>]

Detailed Description This cmdlet rescans the selected SAN storage to synchronize its infrastructure with Veeam Backup & Replication.

Rescanning discovers new or checks for deleted volumes and snapshots.

Veeam Backup & Replication runs rescan automatically every 3 minutes. You can perform rescan manually if you want to display the newly added or deleted volumes or snapshots.

Run Sync-HP4Volume to rescan the selected volumes only.

Alias Sync-VBRHPStorage

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Storage <CHpP4Group>

Specifies the storage you want to synchronize. True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command synchronizes the storage named "HP Store 01".

The storage object is obtained with Get-HP4Storage and piped down.

Get-HP4Storage -Name "HP Store 01" | Sync-HP4Storage

361 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Sync-HP4Volume Short Description Rescans a SAN volume.

Applies to Version: 7.0

Platform: VMware

HP SAN storage systems: HP LeftHand P4000, HP StoreVirtual VSA

Syntax

Sync-HP4Volume -Volume <CSanVolume[]> [<CommonParameters>]

Detailed Description This cmdlet rescans the selected SAN volume(s) to synchronize the storage system infrastructure with Veeam Backup & Replication.

Rescanning discovers new or checks for deleted snapshots.

Veeam Backup & Replication runs rescan automatically every 3 minutes. You can perform rescan manually if you want to display the newly added or deleted snapshots.

Run Sync-HP4Storage to rescan the SAN storage.

Alias Sync-VBRHPVolume

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Volume <CSanVolume[]>

Specifies the volume(s) you want to synchronize.

You can assign multiple volumes to this object.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example This command synchronizes the volume named "HP Vol 01".

The storage object is obtained with Get-HP4Volume and piped down.

Get-HP4Volume -Name "HP Vol 01" | Sync-HP4Volume

362 | Veeam Backup & Replication | POWERSHELL REFERENCE | REV 1

Sync-VBRBackupRepository Short Description Rescans a selected backup repository.

Applies to Version: 7.0 and earlier

Platform: VMware, Hyper-V

Syntax

Sync-VBRBackupRepository -Repository <CBackupRepository[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description This cmdlet allows you to rescan a specified backup repository for details about backups stored on it.

You can perform the repository rescan i.e. in case you have imported or copied backups.

Parameters

Parameter Description Required Position Accept

Pipeline Input

Accept Wildcard

Characters

-Repository <CBackupRepository[]>

Specifies backup repository you want to rescan.

True Named

True (ByValue,

ByPropertyName)

False

<CommonParameters>

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

Example 1 This command rescans the repository named "Local Repository 01". The needed repository object is obtained with Get-VBRBackupRepository and piped down.

Get-VBRBackupRepository -Name "Local Repository 01" | Sync-VBRBackupRepository

Example 2 This command rescans the repository represented by the $repository variable. The needed repository object is obtained with Get-VBRBackupRepository and assigned to the variable beforehand.

Stop-VSBJob -Job $repository