Veeam Backup & Replication PowerShell

Veeam Backup & Replication PowerShell Version 7.0 Reference August, 2013 © 2013 Veeam Software. All rights reserved. All trademarks are the property...
16 downloads 5 Views 4MB Size
Veeam Backup & Replication PowerShell Version 7.0 Reference August, 2013

© 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.

2 | 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

3 | 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

4 | 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

5 | 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

6 | 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

7 | 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

8 | 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.

9 | 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:

10 | 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 Administrator

Hyper-V Backup

Stopped

Success

Created by

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 Administrator

Hyper-V Backup

Stopped

Success

Created by

You can get detailed information about the object: PS C:\Administrator> $j | gm TypeName: Veeam.Backup.Core.CBackupJob Name

MemberType

Definition

----

----------

----------

CanRunByScheduler

Method

bool ISchedulableJob..

Delete

Method

void Delete()

DisableScheduler

Method

void DisableScheduler(

EnableScheduler

Method

void EnableScheduler()

Equals

Method

bool Equals(System...

FindInitialRepository

Method

Veeam.Backup.Core...

FindLastSession

Method

Veeam.Backup.Core...

FindSourceWanAccelerator

Method

Veeam.Backup.Core...

FindTargetRepository

Method

Veeam.Backup.Core...

FindTargetWanAccelerator

Method

Veeam.Backup.Core...

GetHashCode

Method

int GetHashCode()

GetHvOijs

Method

Veeam.Backup.Core...

GetInitialRepository

Method

Veeam.Backup.Core...

GetLastResult

Method

Veeam.Backup.Model...

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

GetLastState

Method

Veeam.Backup.Model...

GetObjectsInJob

Method

Veeam.Backup.Core...

GetOptions

Method

Veeam.Backup.Model...

GetProxy

Method

System.Collections...

GetScheduleOptions

Method

Veeam.Backup.Model...

GetSourceOffHostHvProxies

Method

Veeam.Backup.Core...

GetSourceViProxies

Method

Veeam.Backup.Core...

GetSourceWanAccelerator

Method

Veeam.Backup.Core...

GetTargetHost

Method

Veeam.Backup.Core...

GetTargetOffhostHvProxies

Method

Veeam.Backup.Core...

GetTargetProxies

Method

System.Collections...

GetTargetRepository

Method

Veeam.Backup.Core...

GetTargetViProxies

Method

Veeam.Backup.Core...

GetTargetWanAccelerator

Method

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.

12 | 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" | GetVBRRestorePoint 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

13 | 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):

14 | 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:

15 | 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 5:01:18 AM

WinXPx86

Stopped

8/6/2013 4:58:34 AM

8/6/2013

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

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

17 | 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-powershellquickstart.aspx



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

18 | 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

Add-VBRBackupJob

VeeamPSSnapIn

Cmdlet

Add-VBRBackupRepository

VeeamPSSnapIn

Cmdlet

Add-VBRCopyJob

VeeamPSSnapIn

Cmdlet

Add-VBRCredentials

VeeamPSSnapIn

Cmdlet

Add-VBRESX

VeeamPSSnapIn

Cmdlet

Add-VBRESXi

VeeamPSSnapIn

Cmdlet

Add-VBRHvBackupCopyJob

VeeamPSSnapIn

Cmdlet

Add-VBRHvBackupJob

VeeamPSSnapIn

Cmdlet

Add-VBRHvCluster

VeeamPSSnapIn

Cmdlet

Add-VBRHvHost

VeeamPSSnapIn

Cmdlet

Add-VBRHvJobObject

VeeamPSSnapIn

Cmdlet

Add-VBRHvProxy

VeeamPSSnapIn

Cmdlet

Add-VBRHvReplicaJob

VeeamPSSnapIn

Cmdlet

Add-VBRHvScvmm

VeeamPSSnapIn

Cmdlet

Add-VBRJobObject

VeeamPSSnapIn

Cmdlet

Add-VBRLinux

VeeamPSSnapIn

Cmdlet

Add-VBRReplicaJob

VeeamPSSnapIn

Cmdlet

Add-VBRSmbV3Cluster

VeeamPSSnapIn

Cmdlet

Add-VBRSmbV3Host

VeeamPSSnapIn

Cmdlet

Add-VBRTapeFilesJob

VeeamPSSnapIn

Cmdlet

Add-VBRTapeMediaPool

VeeamPSSnapIn

Cmdlet

Add-VBRTapeVMJob

VeeamPSSnapIn

Cmdlet

Add-VBRvCenter

VeeamPSSnapIn

Cmdlet

Add-VBRvCloud

VeeamPSSnapIn

Cmdlet

Add-VBRvCloudBackupCopyJob

VeeamPSSnapIn

Cmdlet

Add-VBRvCloudJob

VeeamPSSnapIn

Cmdlet

Add-VBRvCloudVC

VeeamPSSnapIn

Cmdlet

Add-VBRViBackupCopyJob

VeeamPSSnapIn

Cmdlet

Add-VBRViBackupJob

VeeamPSSnapIn

Cmdlet

Add-VBRViJobObject

VeeamPSSnapIn

Cmdlet

Add-VBRViProxy

VeeamPSSnapIn

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

Get-Help 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] [-Name ] [-WarningAction ] [-WarningVariable ] [] 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".

20 | 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 [-Name ] [-Description ] []

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

False

-Volume

Specifies the SAN volume you want to take snapshot of.

True

Named

True (ByValue, ByProperty Name)

[-Name ]

Specifies the name you want to assign to the snapshot.

False

Named

False

False

False

Named

False

False

[-Description ]

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

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

21 | 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"

22 | 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 -Password [-Name ] [-Description ] [-Url ] [] -ORAdd-HP3Storage -Credentials [-Name ] [-Description ] [-Url ][]

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

-UserName

-Password

-Credentials

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

False

Named

False

False

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

False

Named

False

False

Specifies credentials you want to

True

Named

False

False

Description 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. Specifies the password you want to use for authenticating with the SAN storage.

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



use for authenticating with the SAN storage. If you use the Credentials scenario, the -User and Password parameters must be omitted.

[-Name ]

[-Description ]

Specifies the SAN storage IP address or DNS name.

False

Named

False

False

False

Named

False

False

False

Named

False

False

Specifies the description of the SAN storage. If not set, Veeam Backup & Replication will enter date and time of creation by default. Specifies the HP 3PAR Web Services API URL.

[-Url ]

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

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

24 | 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 [-Name ] [-Description ][-ApplicationManagedShapshot] []

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

False

-Volume

Specifies the SAN volume you want to take snapshot of.

True

Named

True (ByValue, ByProper tyName)

[-Name ]

Specifies the name you want to assign to the snapshot.

False

Named

False

False

False

Named

False

False

False

Named

False

False

[-Description ]

[-Application Managed Shapshot]

Specifies the description of the snapshot. If not set, Veeam Backup & Replication will enter date and time of creation by default. 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 pointin-time snapshot.

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

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

26 | 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 -UserName -Password [-Name ] [-Description ] [] -ORAdd-HP4Storage -DnsOrIpAddress -Credentials [-Name ] [-Description ] []

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

-DnsOrIpAddress

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

-UserName

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

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True (ByValue, ByProperty Name)

False

False

Named

False

False

Required

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

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

parameter must be omitted.

-Password

[-Name ]

-Credentials

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. Specifies the name of the management group the storage belongs to. 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.

False

Named

False

False

False

Named

False

False

True

Named

False

False

False

Named

False

False

Specifies the description of the SAN storage. [-Description ]

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

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

28 | 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 AddVBRHvBackupJob 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] [-Type] [-Server] [-Folder] [-FileName ] -Objects

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

[-Name]

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

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

False

False

False

2

False

False

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

• [-Type]





VDDK – Virtual Disk Development Kit (VMware vStorage API) VCB – VMware Consolidated Backup (legacy mode) NET – Network backup (legacy mode).

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

[-Server]

Specifies the host where the created backup should be stored.

True

3

False

False

[-Folder]

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

False

4

False

False

[-FileName ]

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

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

Named

True (ByValue, ByProperty Name)

False

True

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

30 | 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 ] [-Server ] [-MountServer ] -Folder -Type [-ImportIndex] [ImportBackup] [-Description ] [-MaxConcurrentJobs ] [-DataRateLimit ] [-AlignDataBlocks] [DecompressDataBlocks] [-WarningAction ] [WarningVariable ] [] -ORAdd-VBRBackupRepository [-Name ] [-Server ] [-MountServer ] -Folder -Type [-ImportIndex] [-ImportBackup] [-Description ] [-UserName ] [-Password ] [-MaxConcurrentJobs ] [-DataRateLimit ] [-AlignDataBlocks] [-DecompressDataBlocks] [-WarningAction ] [-WarningVariable ] [] -ORAdd-VBRBackupRepository [-Name ] [-Server ] [-MountServer ] -Folder -Type [-ImportIndex] [ImportBackup] [-Description ] [-Credentials ] [-MaxConcurrentJobs ] [-DataRateLimit ] [-AlignDataBlocks] [-DecompressDataBlocks] [-WarningAction ] [-WarningVariable ] []

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.

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

Parameters Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

[-Name ]

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

False

Named

False

False

[-Server ]

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

False

Named

False

False

[-MountServer ]

Specifies the host where the NFS service should be installed.

False

Named

False

False

-Folder

Specifies the full path to the folder where you want to store the backups.

True

Named

False

False

True

Named

False

False

Parameter

-Type

Specifies the type you want to assign to the repository: •

CifsShare



LinuxLocal



WinLocal

[-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

False

Named

False

False

False

Named

False

False

False

Named

False

False

Specifies the description of the backup repository. [-Description ]

[-UserName ]

[-Password

If not set, Veeam Backup & Replication will enter date and time of creation by default. 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. Specifies the password you want to use for

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

]

authenticating with the backup repository host. If you use the Username/Password scenario, the -Credentials parameter must be omitted.

[-Credentials ]

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 ]

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

False

Named

False

False

[-DataRateLimit ]

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

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

33 | 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] [-Type] -Server -Folder [-FileName ] -Objects [-Description ] [-WarningAction ] [-WarningVariable ] [] -ORAdd-VBRCopyJob [-Name] [-Type] [-FileName ] -Objects [-Description ] -Repository [-WarningAction ] [-WarningVariable ] []

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 [-Name]

Description Specifies the name you want to assign to the new copy job.

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

False

False

True

2

False

False

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



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



VCB – VMware

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



Consolidated Backup (legacy mode), NET – Network copy (legacy mode).

[-Server]

Specifies the host where the created copy should be stored.

True

Named

False

False

[-Folder]

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

True

Named

False

False

[-FileName ]

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

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

Named

True (ByValue, ByProperty Name)

False

True

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

35 | 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 -Password [-Description ] [-WarningAction ] [-WarningVariable ] [] -ORAdd-VBRCredentials [-Description ] [-Credential ] [-WarningAction ] [-WarningVariable ] []

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 Required

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

False

False

-Password

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

True

Named

False

False

-Description

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

False

Named

False

False

Parameter

-User

Description 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.

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

credential records easily identified.

[-Credential ]

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

False

Named

False

False

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"

37 | 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] [-User] [-Password] [-Port ] [-SSHUser ] [-SSHPassword ] [-SSHPort ] [-SSHEnable] [-Description ] [-WarningAction ] [-WarningVariable ] [] -ORAdd-VBRESX [-Name] [-Port ] [-SSHUser ] [-SSHPassword ] [-SSHPort ] [-SSHEnable] [-Description ] -Credentials [-WarningAction ] [-WarningVariable ] []

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

[-Name]

[-User]

Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

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

True

1

False

False

True

2

False

False

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

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

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

[-Password]

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

True

3

False

False

[-Port ]

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 ]

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

False

Named

False

False

[-SSHPassword ]

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

False

Named

False

False

[-SSHPort ]

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

False

Named

False

False

True

Named

False

False

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

Specifies the description of the ESX server. [-Description ]

-Credentials

If not set, Veeam Backup & Replication will enter date and time of creation by default. 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.

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

39 | 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

40 | 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] [-User] [-Password] [-Port ] [-Description ] [-WarningAction ] [-WarningVariable ] [] -ORAdd-VBRESXi [-Name] [-Port ] [-Description ] -Credentials [-WarningAction ] [-WarningVariable ] []

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

[-Name]

[-User]

Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

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

True

1

False

False

True

2

False

False

Specifies the user name you want to use for authenticating with the ESX host. If you use the Username/Password scenario, the -Credentials

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

parameter must be omitted.

[-Password]

[-Port ]

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. Sets the integer specifying the number of the Web service port used to connect to the ESX host. By default, port 443 is used.

True

3

False

False

False

Named

False

False

False

Named

False

False

True

Named

False

False

Specifies the description of the ESX server. [-Description ]

-Credentials

If not set, Veeam Backup & Replication will enter date and time of creation by default. 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.

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

42 | 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 -TargetAccelerator [-Name ] [-Entity ][-Backup ] [-BackupJob ] [-Repository ] [-Description ][]

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 userdefined 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.

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

Parameters Parameter

Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

False

False

True

Named

False

False

True

Named

False

False

Named

True (ByValue, ByProperty Name)

False

Named

True (ByValue, ByProperty Name)

False

Named

True (ByValue, ByProperty Name)

False

Named

True (ByValue, ByProperty Name)

False

Specifies the WAN accelerator on the source side. -SourceAccelerator

If you select the mode using WAN accelerators, the -DirectOperation parameter should be omitted. Specifies the WAN accelerator on the target side.

-TargetAccelerator

-DirectOperation

If you select the mode using WAN accelerators, the -DirectOperation parameter should be omitted. 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.

[-Name ]

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

False

You can input string up to 255 symbols.

[-Entity ]

[-Backup ]

Specifies the VM(s) you want to copy. You can assign multiple VMs to this object. Specifies the existing backup(s) from where the VMs to copy are derived.

False

False

You can assign multiple backups to this object.

[-BackupJob ]

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

False

You can assign multiple

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

backup jobs to this object.

[-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

False

Named

False

False

Specifies the description of the backup copy job. [-Description ]

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

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 GetVBRBackupRepository 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 GetVBRBackup 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"

45 | 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 ] [-BackupRepository ] -Entity [-Description ] [-WarningAction ] [-WarningVariable ] []

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 [-Name ] [-Backup Repository ]

-Entity

[-Description ]

Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

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

False

Named

False

False

False

Named

False

False

True

Named

True (ByValue, ByProperty Name)

False

False

Named

False

False

Specifies the backup repository where the created backup should be stored. If not set, Veeam Backup & Replication will use the default backup repository. Specifies the VM(s) you want to back up. You can assign multiple VMs to this object. Specifies the description of the backup job. If not set, Veeam Backup & Replication will enter date and time of creation by default.

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

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"

47 | 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 -User -Password [-Description ] [-WarningAction ] [-WarningVariable ] [] -ORAdd-VBRHvCluster -Name [-Description ] -Credentials [-WarningAction ] [-WarningVariable ] []

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

-Name

Description Specifies the string with the DNS name of the added Hyper-V cluster.

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

False

False

True

Named

False

False

True

Named

False

False

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

-Password

If you use the Username/Password scenario, the -Credentials parameter must be omitted. Specifies the password you want to use for authenticating with the Hyper-V cluster. If you use the Username/Password

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

scenario, the -Credentials parameter must be omitted. Specifies the description of the Hyper-V cluster. [-Description ]

-Credentials

If not set, Veeam Backup & Replication will enter date and time of creation by default. 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.

False

Named

False

False

True

Named

False

False

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

49 | 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 -User -Password [-Description ] [-WarningAction ] [-WarningVariable ] [] -ORAdd-VBRHvHost -Name [-Description ] -Credentials [-WarningAction ] [-WarningVariable ] []

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

-Name

Description Specifies the string with the DNS name of the added Hyper-V cluster.

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

False

False

True

Named

False

False

True

Named

False

False

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

-Password

If you use the Username/Password scenario, the -Credentials parameter must be omitted. Specifies the password you want to use for authenticating with the Hyper-V cluster.

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

If you use the Username/Password scenario, the -Credentials parameter must be omitted. Specifies the description of the Hyper-V cluster. [-Description ]

-Credentials

If not set, Veeam Backup & Replication will enter date and time of creation by default. 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.

False

Named

False

False

True

Named

False

False

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

51 | 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 -Entities [-WarningAction ] [-WarningVariable ] []

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

-Job

-Entities

Description Specifies the job(s) you want to add the VM(s) to. You can assign multiple backup jobs to this object. Specifies the VM(s) you want to add to the job. You can assign multiple VMs to this object.

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

False

False

Named

True (ByValue, ByProperty Name)

False

True

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

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

53 | 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 [-Description ] [-MaxTasks ] [-WarningAction ] [-WarningVariable ] []

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

-Server

Description

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

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True (ByValue, By Property Name)

False

False

Named

False

False

False

Named

False

False

Required

Specifies the description of the Hyper-V proxy. [-Description ]

[-MaxTasks ]

If not set, Veeam Backup & Replication will enter date and time of creation by default. Sets the integer specifying the number of concurrent tasks that can be assigned to the proxy simultaneously.

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

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

55 | 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 ] -Server -Entity [-Suffix ] [-Description ] [-WarningAction ] [-WarningVariable ] [] -ORAdd-VBRHvReplicaJob [-Name ] -Path -Entity [-Suffix ] [-Description ] [-WarningAction ] [-WarningVariable ] []

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 Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

[-Name ]

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

False

Named

False

False

-Server

Specifies the server where the created replica should be stored.

True

Named

False

False

-Path

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

True

Named

False

False

-Entity

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

True

Named

True (ByValue, By

False

Parameter

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

You can assign multiple VMs to this object.

[-Suffix ]

[-Description ]

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.

Property Name)

False

Named

False

False

False

Named

False

False

Specifies the description of the replication job. If not set, Veeam Backup & Replication will enter date and time of creation by default.

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 GetVBRServer 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"

57 | 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 -User -Password [-Description ] [-WarningAction ] [-WarningVariable ] [] -ORAdd-VBRHvScvmm -Name [-Description ] -Credentials [-WarningAction ] [-WarningVariable ] []

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

-Name

Description Specifies the string with the DNS name of the added SCVMM server.

Require d

Positi on

Accept Pipeline Input

Accept Wildcard Characters

True

Name d

False

False

True

Name d

False

False

True

Name d

False

False

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

-Password

If you use the Username/Password scenario, the -Credentials parameter must be omitted. 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.

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

-Credentials

-Description ]

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

Name d

False

False

False

Name d

False

False

Specifies the description of the SCVMM server. If not set, Veeam Backup & Replication will enter date and time of creation by default.

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 GetVBRCredentials and assigned to the $"SCVMM Administrator" variable beforehand. Add-VBRHvScvmm -Description "SCVMM Server" -Credentials $"SCVMM Administrator"

59 | 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 AddVBRHvJobObject 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] [-Server] [-Objects] [-WarningAction ] [-WarningVariable ] [] -ORAdd-VBRJobObject [-Job] [-Server] [-Entities] [-WarningAction ] [-WarningVariable ] []

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]

Specifies the job you want to add VMs to.

True

1

False

False

[-Server]

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

True

2

False

False

3

True (ByValue, ByProperty Name)

False

3

True (ByValue, ByProperty Name)

False

[-Objects]

[-Entities]

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

True

You can assign multiple VMs to this object. Specifies the VM(s) or VM container(s) you want to add to the job.

True

You can assign multiple VMs to this object.

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

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

61 | 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] [-SSHUser] [-SSHPassword] [-SSHPort ]

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]

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

True

1

False

False

[-SSHUser]

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

True

2

False

False

[-SSHPassword]

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

True

3

False

False

[-SSHPort ]

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

62 | 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 AddVBRHvReplicaJob 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] [[-Type] ] [-Server] [-Datastore] -Objects [-Suffix ] [-Description ] [-WarningAction ] [-WarningVariable ] []

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 Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

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

True

1

False

False

False

2

False

False

Parameter

[-Name]

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



VDDK – Virtual Disk Development Kit (VMware vStorage API)



VCB – VMware Consolidated Backup

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



(legacy mode) NET – Network replication (legacy mode)

[-Server]

Specifies the host where the created replica should be stored.

True

3

False

False

[-Datastore]

Specifies the datastore where the created replica should reside.

True

4

False

False

True

Named

True (ByValue, ByProperty Name)

False

False

Named

False

False

False

Named

False

False

-Objects

[-Suffix ]

[Description ]

Specifies the string with the name(s) of VM(s) that you want to replicate. You can assign multiple VMs to this object. 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. Specifies the description of the replica job. If not set, Veeam Backup & Replication will enter date and time of creation by default.

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

64 | 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 ] -Server -Path -MediaPool [-MediaPoolIncremental ] [-Description ] [-Credentials ] [-Masks ] [-IgnoreCase] [-WarningAction ] [-WarningVariable ] []

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

-Server

-Path

Description Specifies the source server object where the files you need are located. Specifies the path to the folder(s) you need to copy. Use -Masks and -IgnoreCase parameters to select particular files.

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

False

False

True

Named

True (ByValue, ByProperty Name)

False

True

Named

False

False

False

Named

False

False

You can specify multiple names separated by commas. -MediaPool

[-Name ]

Specifies the target media pool object that will be used for full backups. Specifies the name you want to assign to the new files to tape copy job. You can input string up to 255 symbols.

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

[-MediaPool Incremental ]

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

False

Named

False

False

[Description ]

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

False

Named

False

False

[-Credentials ]

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

False

Named

False

False

False

Named

False

False

False

Named

False

False

[-Masks ]

[-IgnoreCase]

Used to specify search conditions for -Path paramater. Specifies masks to select files in folders. Used to specify search conditions for -Path paramater. If set, the search by name will be non case sensitive.

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

66 | 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 ] [-Medium ] [-Library ] [-MoveFromFree] [-Description ] [-WarningAction ] [-WarningVariable ] []

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 ]

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

Named

True (ByValue, ByProperty Name)

False

False

[-Medium ]

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

False

You can assign multiple tapes to this object.

[-Library ]

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

False

Named

True (ByValue, ByProperty Name)

[-MoveFromFree]

If set, the media pool will be refilled with tapes from Free pool automatically.

False

Named

False

False

[-Description ]

Specifies the description for the created media pool.

False

Named

False

False

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

67 | 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"

68 | 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 ] [-Repository ] [-BackupJob ] -MediaPool [-MediaPoolIncremental ] [-DisableIncremental] [-HardwareCompression] [-Description ] [-WarningAction ] [-WarningVariable ] []

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

-MediaPool

[-Name ]

[-Repository ]

[-BackupJob ]

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

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

False

False

False

Named

False

False

Named

True (ByValue, ByProperty Name)

False

Named

True (ByValue, ByProperty Name)

False

You can input string up to 255 symbols. Specifies the name you want to assign to the VM to tape copy job. Specifies the source backup repository(ies) where the backups to copy are located. You can assign multiple backup repositories to this object. Specifies the backup job where the backups to copy can be derived from.

False

False

You can assign multiple

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

backup jobs to this object. [-MediaPool Incremental ]

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

False

Named

False

False

False

Named

False

False

Enables hardware compression option. [-Hardware Compression]

[-Description ]

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. Specifies the description of the new VM to tape copy job.

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"

70 | 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] [-User] [-Password] [-Port ]

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]

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

True

1

False

False

[-User]

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]

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

True

3

False

False

[-Port ]

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

71 | 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] [-User] [-Password] [-Url ] [-Description ][] -ORAdd-VBRvCloud [-Name] -Credentials [-Url ] [-Description ][]

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]

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

True

1

False

False

True

2

False

False

[-User]

[-Password]

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. 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.

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

-Credentials

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 ]

Specifies the URL you want to connect to the vCloud Director Web API with.

False

Named

False

False

[-Description ]

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

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

73 | 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 ] [-Entity ] [-Backup ] [-BackupJob ] [-Repository ] -SourceAccelerator -TargetAccelerator [-Description ] [-WarningAction ] [-WarningVariable ] [] -ORAdd-VBRvCloudBackupCopyJob [-Name ] [-Entity ] [-Backup ] [-BackupJob ] [-Repository ] -DirectOperation [-Description ] [-WarningAction ] [-WarningVariable ] []

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 userdefined 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.

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

Parameters Parameter

[-Name ]

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

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

False

Named

False

False

Named

True (ByValue, ByProperty Name)

False

Named

True (ByValue, ByProperty Name)

False

False

Named

True (ByValue, ByProperty Name)

False

False

Named

False

False

True

Named

False

False

True

Named

False

False

False

Named

False

False

You can input string up to 255 symbols.

[-Entity ]

[-Backup ]

[-BackupJob ]

Specifies the VM(s) you want to copy. You can assign multiple VMs to this object. Specifies the existing backup from where the VMs to copy are derived.

False

False

You can assign multiple backups to this object. Specifies the existing backup job from where the VMs to copy are derived. You can assign multiple backup jobs to this object.

[-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. Specifies the WAN accelerator on the source side.

-SourceAccelerator

If you select the mode using WAN accelerators, the -DirectOperation parameter should be omitted. Specifies the WAN accelerator on the target side.

-TargetAccelerator

[-Description ]

If you select the mode using WAN accelerators, the -DirectOperation parameter should be omitted. Specifies the description of the backup copy job. If not set, Veeam Backup & Replication will enter date and time of creation by

75 | 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

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 GetVBRBackupRepository 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 GetVBRBackup 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"

76 | 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 [-Name ] [-BackupRepository ] [-Description ] []

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

-Entity

Description Specifies the VM(s) you want to backup. You can assign multiple VMs to this object.

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True

False

[-Name ]

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

False

Named

False

False

[-Backup 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 ]

Specifies the description of the new backup job.

False

Named

False

False

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

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"

78 | 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] [-VCInfo] [-User] [-Password] [-Name ] [-Port ] [-Description ] [] -ORAdd-VBRvCloudVC [-vCloudServer] [-VCInfo] -Credentials [-Name ] [-Port ] [-Description ] []

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

False

[-vCloudServer]

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

True

0

True (ByValue, ByProperty Name)

[-VCInfo]

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

True

1

False

False

True

2

False

False

True

3

False

False

[-User]

[-Password]

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. Specifies the password you want to use for authenticating with the vCenter server. If you use the

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

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

-Credentials

[-Name ]

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. Specifies the DNS name or IP address of the vCenter server you want to connect.

True

Named

False

False

False

Named

False

False

False

Named

False

False

False

Named

False

False

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

[-Description ]

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. 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.

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

80 | 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

81 | 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 -TargetAccelerator [-Name ] [-Entity ] [-Backup ] [-BackupJob ] [-Repository ] [-Description ][] -ORAdd-VBRViBackupCopyJob -DirectOperation [-Name ] [-Entity ] [-Backup ] [-BackupJob ] [-Repository ] [-Description ] []

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 userdefined 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.

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

Parameters Parameter

Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

False

False

True

Named

False

False

True

Named

False

False

Named

True (ByValue, ByProperty Name)

False

Named

True (ByValue, ByProperty Name)

False

Named

True (ByValue, ByProperty Name)

False

False

Named

True (ByValue, ByProperty Name)

False

False

Named

False

False

Specifies the WAN accelerator on the source side. -SourceAccelerator

If you select the mode using WAN accelerators, the -DirectOperation parameter should be omitted. Specifies the WAN accelerator on the target side.

-TargetAccelerator

-DirectOperation

[-Name ]

If you select the mode using WAN accelerators, the -DirectOperation parameter should be omitted. 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. Specifies the name you want to assign to the backup copy job.

False

You can input string up to 255 symbols.

[-Entity ]

[-Backup ]

[-BackupJob ]

[-Repository

Specifies the VM you want to copy. You can assign multiple VMs to this object. Specifies the existing backup(s) to set the VMs you want to copy.

False

False

You can assign multiple backups to this object. Specifies the existing backup job(s) to set the VMs you want to copy. You can assign multiple backup jobs to this object. Specifies the backup

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

]

repository to where you want to copy the VM data. If not set, Veeam Backup & Replication will use the default backup repository. Specifies the description of the backup copy job.

[-Description ]

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

False

Named

False

False

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 GetVBRBackupRepository 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 GetVBRBackup 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"

84 | 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 ] [-BackupRepository ] -Entity

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 ]

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

False

Named

False

False

[-Backup Repository ]

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

False

Named

False

False

Named

True (ByValue, ByProperty Name)

False

-Entity

Specifies the VM(s) that you want to back up. You can assign multiple VMs to this object.

True

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"

85 | 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 -Entities [-WarningAction ] [-WarningVariable ] []

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

-Job

-Entities

Description Specifies the job you want to add the VM(s) to. You can assign multiple backup jobs to this object. Specifies the vM(s) you want to add to the job. You can assign multiple VMs to this object.

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

False

False

Named

True (ByValue, ByProperty Name)

False

True

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

86 | 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

87 | 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 [-Description ] [-MaxTasks ] [-WarningAction ] [-WarningVariable ] []

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

-Server

Description

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

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True (ByValue, By Property Name)

False

False

Named

False

False

False

Named

False

False

Required

Specifies the description of the VMware proxy. [-Description ]

[-MaxTasks ]

If not set, Veeam Backup & Replication will enter date and time of creation by default. Sets the integer specifying the number of concurrent tasks that can be assigned to the proxy simultaneously.

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

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

89 | 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 ] -Server -Entity [-Datastore ] [-ResourcePool ] [-Folder ] [-Suffix ] [-BackupRepository ]

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 Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

[-Name ]

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

False

Named

False

False

-Server

Specifies the host where the created replica should be stored.

True

Named

False

False

True

Named

True

False

Parameter

-Entity

Specifies the VM(s) that you want to replicate. You can assign multiple VMs to this object.

-Datastore ]

Specifies the datastore to which you want to replicate.

False

Named

False

False

[-Resource Pool ] [-Folder ]

Specifies the folder to which you want to replicate.

False

Named

False

False

[-Suffix ]

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 ]

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)

91 | 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 [-Description ] [-CachePath ] [-CacheSize ] [-CacheSizeUnit ] [-WarningAction ] [-WarningVariable ] []

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

False

-Server

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, ByProperty Name)

[-Description ]

Specifies the description of the WAN accelerator.

False

Named

False

False

[-CachePath ]

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

False

Named

False

False

[-CacheSize ]

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

False

Named

False

False

[-CacheSizeUnit ]

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

False

Named

False

False

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

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

93 | 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 -User -Password

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

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

True

Named

False

False

-User

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

True

Named

False

False

-Password

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

True

Named

False

False

94 | 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 AddVSBHvApplicationGroup 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] [-Vm] -ORAdd-VSBApplicationGroup [-Name] [-RestorePoint]

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

[-Name]

[-Vm]

Description Specifies the string with the name you want to assign to the application group. Specifies the VM(s) you want to include into the application group.

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

False

False

2

True (ByValue, ByProperty Name)

False

2

True (ByValue, ByProperty Name)

False

True

You can assign multiple VMs to this object.

[-RestorePoint]

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

True

You can assign multiple restore points to this object.

95 | 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

96 | 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 ] [-VmFromBackup ] [-RestorePoint ] [-WarningAction ] [-WarningVariable ] []>]

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

-Name

[-VmFromBackup ]

[-RestorePoint]

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

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

False

Named

False

False

Named

True (ByValue, ByProperty Name)

False

Named

True (ByValue, ByProperty Name)

False

True

You can assign multiple VMs to this object. Specifies the restore points of the VMs you want to add to the application group.

True

You can assign multiple restore points to this object.

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

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

98 | 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 ] -VirtualLab [-AppGroup ] [-LinkedJob ] [-Description ] [-WarningAction ] [-WarningVariable ] []

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 Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

[-Name ]

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

False

Named

False

False

-VirtualLab

Specifies the virtual lab you want to use for verification.

Named

True (ByValue, ByProperty Name)

False

-AppGroup

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

Named

True (ByValue, ByProperty Name)

False

Parameter

True

False

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

sure that the -LinkedJob parameter is set. Specifies the backup job from where the VM(s) you want to verify can be derived. [-LinkedJob]

[-Name ]



BackupServer



ESX



ESXi



HvCluster



HvServer



Linux



Local



SanHost



Scvmm



SmbCluster



SmbServer



VC



VcdSystem



Windows

Specifies the name of the server you want to get, or search conditions.

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

You can specify multiple names separated by commas.

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

190 | 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 ] [-WarningAction ] [-WarningVariable ] []

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

[-Name ]

Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

False

Named

False

True

Specifies the name(s) of the backup or search conditions. You can specify multiple names separated by commas.

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*

191 | 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 ] [-Name ] [WarningAction ] [-WarningVariable ] []

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

[-Library ]

[-Name ]

Description

Specifies the tape medium library that the tape drive belongs to. Specifies the tape drive name(s), or search conditions. You can specify multiple names separated by commas.

Position

Accept Pipeline Input

Accept Wildcard Characters

False

Named

True (ByValue, ByProperty Name)

False

False

Named

False

True

Required

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"

192 | 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 ] [-WarningAction ] [-WarningVariable ] []

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

[-Name ]

Description Specifies the name(s) of the tape job, or search conditions. You can specify multiple names separated by commas.

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

False

Named

False

True

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"

193 | 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 ] [-WarningAction ] [-WarningVariable ] []

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

[-Name ]

Description Specifies the name of the tape media library, or search conditions. You can specify multiple names separated by commas.

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

False

Named

False

True

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*

194 | 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 ] [-Name ] [-WarningAction ] [-WarningVariable ] []

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

[-Library ]

[-Name ]

Description

Specifies the library that the media pool belongs to. Specifies the name(s) of the tape media library the media pool belongs to.

Position

Accept Pipeline Input

Accept Wildcard Characters

False

Named

True (ByValue, ByProperty Name)

False

False

Named

False

True

Required

You can specify multiple names separated by commas.

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

195 | 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'

196 | 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 ] [-WarningAction ] [-WarningVariable ] [] Get-VBRTapeMedium [-Free] [-Name ] [-WarningAction ] [-WarningVariable ] [] Get-VBRTapeMedium [-Unrecognized] [-Name ] [WarningAction ] [-WarningVariable ] [] Get-VBRTapeMedium [-Offline] [-Name ] [-WarningAction ] [-WarningVariable ] [] Get-VBRTapeMedium [-Online] [-Name ] [-WarningAction ] [-WarningVariable ] [] Get-VBRTapeMedium -Backup [-Name ] [WarningAction ] [-WarningVariable ] [] Get-VBRTapeMedium -MediaPool [-Name ] [WarningAction ] [-WarningVariable ] [] Get-VBRTapeMedium -Library [-Name ] [WarningAction ] [-WarningVariable ] []

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.

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

Parameters Parameter

[-Name ]

Description Specifies the name of tape you want to get. You can specify multiple names separated by commas.

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

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

Specifies the backup you want to get. You will get a tape or a list of tapes where the backup data is stored.

Named

True (ByValue, ByProperty Name)

False

-MediaPool

Specifies the media pool within which you want to look for the tapes.

Named

True (ByValue, ByProperty Name)

False

-Library

Specifies the tape library within which you want to look for the tapes.

Named

True (ByValue, ByProperty Name)

False

True

True

True

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

198 | 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" | GetVBRTapeMedium

199 | 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] [-Name ] [-WarningAction ] [-WarningVariable ] []

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

[-Session]

[-Name ]

Description

Specifies the session you want to get. Specifies the name of the session you want to get, or search conditions. You can specify multiple names separated by commas.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

False

Named

False

True

Required

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

200 | 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 ] [-WarningAction ] [-WarningVariable ] []

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 Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

Specifies the name of the VMware proxy you want to get, or search conditions.

False

Named

False

True

Parameter

[-Name ]

You can specify multiple names separated by commas.

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"

201 | 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.

202 | 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 ] [-WarningAction ] [-WarningVariable ] []

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

[-Name ]

Description Specifies the name(s) of the WAN accelerator, or search conditions. You can specify multiple names separated by commas.

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

False

Named

False

True

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

203 | 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*

204 | 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 ] [-WarningAction ] [-WarningVariable ] []

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 Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

Specifies the name of the application group you want to get, or search conditions.

False

Named

False

True

Parameter

[-Name ]

You can specify multiple names separated by commas.

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

205 | 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"

206 | 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 ] [-WarningAction ] [-WarningVariable ] []

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

[-Name ]

Description Specifies the name(s) of the virtual lab, or search conditions. You can specify multiple names separated by commas.

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

False

1

False

True

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

207 | 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*

208 | 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 ] [-WarningAction ] [-WarningVariable ] []

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 Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

Specifies the name of the SureBackup job you want to get, or search conditions.

False

Named

False

True

Parameter

[-Name ]

You can specify multiple names separated by commas.

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

209 | 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"

210 | 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] [-WarningAction ] [-WarningVariable ] []

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

[-Job]

Description

Specifies the SureBackup job you want to get the settings of.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

1

True (ByValue, ByProperty Name)

False

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

211 | 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] [-WarningAction ] [-WarningVariable ] []

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

[-Job]

Description

Specifies the SureBackup job you want to get the scheduling settings of.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

1

True (ByValue, ByProperty Name)

False

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

212 | 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 ] [-WarningAction ] [-WarningVariable ] []

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

False

Named

False

True

Specifies the name of the SureBackup session you want to get, or search conditions. [-Name ]

The name of the SureBackup session is a name of the SureBackup job. You can specify multiple names separated by commas.

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".

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

Get-VSBSession -Name *Winserver SureJob*

214 | 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] [-Name ] [WarningAction ] [-WarningVariable ] []

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

[-Session]

[-Name ]

Description

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

False

Named

False

True

Required

Specifies the SureBackup session you want to get. Run Get-VSBSession to get the SureBackup session object you need. Specifies the name of the SureBackup session you want to get, or search conditions. You can specify multiple names separated by commas.

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

215 | 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

216 | 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 ] [-WarningAction ] [-WarningVariable ] []

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 Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

Specifies the name of the VMware virtual lab you want to get, or search conditions.

False

Named

False

True

Parameter

[-Name ]

You can specify multiple names separated by commas.

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

217 | 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"

218 | 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] [-FileName] [WarningAction ] [-WarningVariable ] []

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

False

False

[-Server]

Specifies the target server where you want to store the imported backups.

True

1

True (ByValue, ByProperty Name)

[-FileName]

Specifies the path to the backup file you want to import.

True

2

False

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"

219 | 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 ] [-WarningVariable ] [] -ORImport-VBRTapeMedium [-Library ] [-RunAsync] [WarningAction ] [-WarningVariable ] []

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

False

False

[-Library ]

Specifies the library you want to move the tapes to.

False

Named

True (ByValue, ByProperty Name)

[-RunAsync]

Indicates that the command returns immediately without waiting for the task to complete.

False

Named

False

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

220 | 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

221 | 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 -MediaPool []

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

-Medium

-MediaPool

Description Specifies the tape(s) you want to move. You can assign multiple tapes to this object. Specifies the target media pool where you want to move the tape(s) to.

Required

True

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

Named

True (ByValue, ByProperty Name)

False

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

222 | 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 GetVBRTapeMediaPool 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

223 | 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 ] [WarningVariable ] [] -ORNew-VBRJobOptions [-ForBackupJob] [-WarningAction ] [-WarningVariable ] [] -ORNew-VBRJobOptions [-ForReplicaJob] [-WarningAction ] [-WarningVariable ] []

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 SetVBRJobOptions. 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

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

224 | 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 ] [WarningVariable ] []

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.

225 | 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 ] [-WarningVariable ] [] -ORNew-VBRJobVssOptions [-ForObject] [-WarningAction ] [-WarningVariable ] [] -ORNew-VBRJobVssOptions [-ForReplicaJob] [-WarningAction ] [-WarningVariable ] []

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 SetVBRJobVSSOptions 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

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

VSS settings for replication job.

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

227 | 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] [vAppName ] [-OrgVdc ] [-PowerUp] [-Reason ] [-WarningAction ] [-WarningVariable ] []

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.

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

Parameters Parameter

Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

False

[-RestorePoint]

Specifies the restore point of the vApp you want to restore the vApp to.

True

1

True (ByValue, ByProperty Name)

[-vAppName ]

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 ]

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 []

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

False

Named

False

False

[-Reason ]

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.

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

229 | 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 StartVBRvCloudRestoreVApp.

230 | 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 ] [WarningVariable ] []

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. 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

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

LinkWithJobs

: False

RunningVmsNumber

: 6

Validation

: False

SkipValidationForAppGroup

: True

232 | 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 []

Detailed Description This cmdlet permanently removes the selected SAN snapshot from your storage system. Run Add-HP3Snapshot to add a SAN snapshot.

Parameters Parameter

-Snapshot

Description Specifies the snapshot(s) you want to remove. You can assign multiple snapshots to this object.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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

233 | 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 []

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

-Storage

Description

Specifies the storage you want to remove.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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

234 | 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 []

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

-Snapshot

Description Specifies the snapshot(s) you want to remove. You can assign multiple snapshots to this object.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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

235 | 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 []

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

-Storage

Description

Specifies the storage you want to remove.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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

236 | 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] [-FromDisk] [WarningAction ] [-WarningVariable ] [WhatIf] [-Confirm] []

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

[-Backup]

[-FromDisk]

Description Specifies the backup you want to remove. You can assign multiple backups to this object. If indicated, the backup file will be permanently removed from disk. Otherwise, only the information about the backup is deleted from database.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

False

Named

False

False

Required

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

237 | 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" | RemoveVBRBackup

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

238 | 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 [WarningAction ] [-WarningVariable ] [WhatIf] [-Confirm] []

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

-Repository

Description

Specifies the backup repository you want to remove.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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" | RemoveVBRBackupRepository

239 | 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

240 | 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] [WarningAction ] [-WarningVariable ] [WhatIf] [-Confirm] []

Detailed Description This cmdlet removes specified backup session(s) from Veeam Backup & Replication.

Parameters Parameter

-[-Session]

Description Specifies the backup session you want to remove.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

1

True (ByValue, ByProperty Name)

False

You can assign multiple sessions to this object.

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" | RemoveVBRBackupSession

241 | 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 []

Detailed Description This cmdlet permanently removes the selected credentials record from the database.

Parameters Parameter

-Credential

Description

Specifies the credentials you want to remove.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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

242 | 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 [-WarningAction ] [-WarningVariable ] [-WhatIf] [Confirm] []

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

-Proxy

Description

Specifies the Hyper-V backup proxy you want to remove.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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

243 | 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 GetVBRHvProxy and assigned to the variable beforehand. Remove-VBRHvProxy -Proxy $proxy

244 | 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] [-WarningAction ] [-WarningVariable ] [-WhatIf] [Confirm] []

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

[-Job]

Specifies the job you want to remove.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

1

True (ByValue, ByProperty Name)

False

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

245 | 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]

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

Parameters Parameter

Description

[-Objects]

Specifies objects (VMs and VM containers) you want to remove.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

2

True (ByValue, ByProperty Name)

False

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

246 | 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] [-FromDisk] [WarningAction ] [-WarningVariable ] [WhatIf] [-Confirm] []

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

[-Backup]

[-FromDisk]

Description Specifies the replica you want to remove. You can assign multiple replicas to this object. If indicated, the replicated VM will be permanently removed from disk. Otherwise, only the information about the replication job is deleted from database.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

False

Named

False

False

Required

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

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" | RemoveVBRReplica

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

248 | 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] [-Name ] [WarningAction ] [-WarningVariable ] [WhatIf] [-Confirm] []

Detailed Description This cmdlet allows you to remove restore points from Veeam Backup & Replication.

Parameters Parameter

[-Oib]

[-Name ]

Description Specifies the restore point(s) you want to remove. You can assign multiple restore point to this object. Specifies the name of the VM the restore points of which you want to remove, or search conditions.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

False

Named

False

Truse

Required

You can specify multiple names separated by commas.

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

249 | 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

250 | 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] [WarningAction ] [-WarningVariable ] [WhatIf] [-Confirm] []

Detailed Description This cmdlet allows you to remove the specified restore session from Veeam Backup & Replication.

Parameters Parameter

[-Session]

Description

Specifies the restore session you want to remove.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

1

True (ByValue, ByProperty Name)

False

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

251 | 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] [-WarningAction ] [-WarningVariable ] [-WhatIf] [Confirm] []

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

[-Server]

Description Specifies the server you want to remove. You can assign multiple servers to this object.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

1

True (ByValue, ByProperty Name)

False

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

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

Example 1 This command removes a Virtual Center named "vCenter01". The server is obtained with GetVBRRestoreSession, 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

253 | 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 []

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

-MediaPool

Specifies the media pool(s) you want to remove.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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

254 | 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 [-WarningAction ] [-WarningVariable ] [-WhatIf] [Confirm] []

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

-Proxy

Specifies the proxy you want to remove.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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

255 | 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 GetVBRViProxy and assigned to the variable beforehand. Remove-VBRViProxy -Proxy $proxy

256 | 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 []

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

-Accelerator

Description Specifies the WAN accelerator you want to remove.

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

False

False

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

257 | 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" | RemoveVBRWANAccelerator

Example 2 The following command removes WAN accelerator. First the accelerator object is got and assigned to $a variable. Remove-VBRWANAccelerator -Accelerator $a

258 | 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] [WarningAction ] [-WarningVariable ] [WhatIf] [-Confirm] []

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

[-AppGroup]

Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

1

True (ByValue, ByProperty Name)

False

Specifies the application group you want to remove. You can assign multiple application groups to this object.

True

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

259 | 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

260 | 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] [WarningAction ][-WarningVariable ] [WhatIf][-Confirm][]

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

[-VirtualLab]

Specifies the virtual lab object you want to remove from your Veeam Backup & Replication console.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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

261 | 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" | RemoveVSBHvVirtualLab

262 | 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] [-WarningAction ] [-WarningVariable ] [-WhatIf] [Confirm] []

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

[-Job]

Description Specifies the SureBackup job you want to remove. You can assign multiple jobs to this object.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

1

True (ByValue, ByProperty Name)

False

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

263 | 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

264 | 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] [-WarningAction ] [-WarningVariable ] [-WhatIf] [Confirm] []

Detailed Description This cmdlet removes a specified SureBackup job session from Veeam Backup & Replication.

Parameters Parameter

[-Sessions]

Description Specifies the SureBackup job session you want to remove. You can assign multiple sessions to this object.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

1

True (ByValue, ByProperty Name)

False

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

265 | 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] [WarningAction ] [-WarningVariable ] [WhatIf] [-Confirm] []

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

[-VirtualLab]

Description Specifies the virtual lab you want to remove. You can assign multiple virtual labs to this object.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

1

True (ByValue, ByProperty Name)

False

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

266 | 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

267 | 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] [-VMName ] [WarningAction ] [-WarningVariable ] [] -ORReset-HvVmChangeTracking [-Server] [-VhdPath ] [WarningAction ] [-WarningVariable ] []

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 Required

Position

Accept Pipeline Input

Accept Wildcard Characters

[-Server]

Specifies the server hosting the VM for which you want to reset change tracking data.

True

2

False

False

[-VMName ]

Specifies the VM for which you want to reset change tracking data.

False

Named

False

False

[-VhdPath ]

Specifies the virtual disk (VHD) for which you want to reset change tracking data.

False

Named

False

False

Parameter

Description

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

268 | 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"

269 | 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 [-WarningAction ] [-WarningVariable ] []

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 noncustomized 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

-Job

Specifies the job you want to edit.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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.

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

Get-VBRJob -Name "Backup Job 8" | Reset-VBRJobOptions

271 | 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 [-WarningAction ] [-WarningVariable ] []

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

-Job

Description

Specifies job you want to edit.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

True

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

272 | 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 [-WarningAction ] [-WarningVariable ] []

Detailed Description This cmdlet clears the custom settings of the specified job and restores their default values.

Parameters Parameter

-Job

Description

Specifies the SureBackup job you want to edit.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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

273 | 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] [-WarningAction ] [-WarningVariable ] []

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 StartVBRQuickMigration or Stop-VBRInstantRecovery respectively.

Parameters Parameter

Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

1

True (ByValue, ByProperty Name)

False

Specifies the instant recovery session you want to restart. [-Instant Recovery]

Run GetVBRInstantRecovery to get the needed session object.

True

You can assign multiple instant recovery sessions to this object.

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

274 | 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 | RestartVBRInstantRecovery

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"

275 | 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 -Password [] -ORSet-VBRCredentials -Credential -Description []

Detailed Description This cmdlet allows editing password or description of a selected credentials record. Select the appropriate syntax for each case.

Parameters Parameter

Description

-Credential

Specifies credentials you want to edit.

-Password

Specifies the new password for the selected credentials.

-Description

Specifies the new description for the selected credentials.

Required

True

True

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

Named

True (ByValue, ByProperty Name)

False

Named

True (ByValue, ByProperty Name)

False

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

276 | 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"

277 | 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 [-Algorithm {ReverseIncremental | Incremental }] [TransformFullToSyntethic ] [-TransformIncrementsToSyntethic ] [-TransformToSyntethicDays {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] [EnableFullBackup ] [-FullBackupDays {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] [FullBackupScheduleKind {Daily | Monthly}] [-Months {January | February | March | April | May | June | July | August | September | October | November | December}] [-DayNumberInMonth {First | Second | Third | Fourth | Last | OnDay}] [-DayOfWeek {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] []

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

-Job

Description Specifies the job you want to edit. You can assign multiple jobs to this object.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True (ByValue, ByProperty Name)

False

False

Named

False

False

Required

Specifies backup method: [-Algorithm {Reverse Incremental | Incremental }]



ReverseIncremental: every backup job run creates a full backup file by merging a previous full backup with recent changes.

278 | 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.

Used with incremental backup method. [-TransformFullTo Syntethic ]

If set to TRUE, the full synthetic backup will be enabled. Otherwise, you will have to perform full backups manually.

False

Named

False

False

False

Named

False

False

Used with incremental backup method. [-Transform IncrementsTo Syntethic ]

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.

[-TransformTo SyntethicDays {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}]

Specifies days to perform synthetic fulls.

False

Named

False

False

[-EnableFullBackup ]

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

False

Named

False

False

[-FullBackupDays {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}]

Sets backup schedule. Specifies days to perform the full backup.

[-FullBackup ScheduleKind {Daily | Monthly}]

Sets backup schedule.

[-Months {January | February

Sets backup schedule.

Sets weekly or monthly period to schedule the full backup.

False

Named

False

False

False

Named

False

False

Specifies months to

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

| March | April | May | June | July | August | September | October | November | December}]

perform the full backup.

Sets backup schedule. [-DayNumber InMonth {First | Second | Third | Fourth | Last | OnDay}]

[-DayOfWeek {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}]

Specifies the period condition for the monthly backup job run: First/Second/Third/Forth /Last.

False

Named

False

False

False

Named

False

False

Use this parameter to set the condition for DayOfWeek parameter, i.e. to run the job on first Saturday every month. 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.

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

280 | 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

281 | 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 [SnmpNotification ] [-EmailNotificationAddresses ] [-EmailNotification ] []

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 Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True (ByValue, ByProperty Name)

False

[-SnmpNotification ]

If set to TRUE, the SNMP notification will be sent. You need to have the SNMP notification preconfigured.

False

Named

False

False

[-EmailNotification ]

If set to TRUE, the notifications will be sent to email address(es).

False

Named

False

False

[-EmailNotification Addresses ]

Specifies the email address(es) to send the email notification. You can specify multiple addresses separated by semicolon.

False

Named

False

False

Parameter

-Job

Description Specifies the job you want to edit. You can assign multiple jobs to this object.

Required

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

282 | 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" | SetVBRJobAdvancedNotificationOptions -SnmpNotification True EmailNotification True -EmailNotificationAddresses [email protected]

283 | 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 [-Periodicity {Cycles | Days}] [-Frequency ] [Enabled ] [-Days {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] [-CommandLine ] [-EnableIntegrityChecks ] [-RetainDays ] []

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

-Job

[-EnableIntegrity Checks ]

Description Specifies the job you want to edit. You can assign multiple jobs to this object. 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

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True (ByValue, ByProperty Name)

False

False

Named

False

False

Required

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

in not performed.

[-RetainDays ]

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 ]

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 ]

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

False

Named

False

False

False

Named

False

False

False

Named

False

False

Used to set command run schedule. Specifies the command run schedule type: [-Periodicity {Cycles | Days}]

• 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. Used to set command run schedule to Cycle.

[-Frequency ]

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.

[-Days

Used to set command run schedule to Days.

285 | 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.

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

286 | 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 [CanDoCrashConsistent ] [-EnableHvQuiescence ] [UseChangeTracking ] [-ExcludeSwapFile ] []

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 Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True (ByValue, ByProperty Name)

False

[-CanDoCrash Consistent ]

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 ]

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 ]

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

Parameter

-Job

Description Specifies the job you want to edit. You can assign multiple jobs to this object.

Required

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

]

backup.

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

288 | 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 [EnableDeduplication []] [-CompressionLevel ] [StorageBlockSize ] [-WarningAction ] [-WarningVariable ][]

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

-Job

[-Enable Deduplication []]

Description Specifies the job you want to edit. You can assign multiple jobs to this object. If set to TRUE, the data will be deduplicated during the backup job run (recommended). Otherwise, no data will be checked for duplication.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True (ByValue, ByProperty Name)

False

False

Named

False

False

False

Named

False

False

Required

Specifies the compression level for the created backup: [-Compression Level ]



AUTO_COMPRESSION _LEVEL = -1,



NONE_COMPRESSION _LEVEL = 0,



DEDUPE_COMPRESSI ON _LEVEL = 4,

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



OPTIMAL_COMPRESSI ON _LEVEL = 5,



HIGH_COMPRESSION _LEVEL = 6,



EXTREME_COMPRESS ION _LEVEL = 9

Specifies the size of data blocks. Larger sized blocks provide faster procession but lower deduplication level.

[-StorageBlockSize ]



KbBlockSize256 = 0,



KbBlockSize512 = 1,



KbBlockSize1024 = 3,



KbBlockSize2048 = 4,



KbBlockSize4096 = 5,



KbBlockSize8192 = 6,



Automatic = 7

False

Named

False

False

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" | SetVBRJobAdvancedStorageOptions -EnableDeduplication $TRUE CompressionLevel 0 -StorageBlockSize 7

290 | 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 [-ExcludeSwapFile ] [-VmAttributeName ] [-SetResultsToVmAttribute ] [-DoubleSnapshotThresholdMb ] [EnableDoubleSnapshot ] [-EnableChangeTracking ] [UseChangeTracking ] [-VMToolsQuiesce ] []

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 Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True (ByValue, ByProperty Name)

False

[-VMToolsQuiesce ]

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 ]

If set to TRUE, the changed block tracking will be enabled.

False

Named

False

False

[-UseChange Tracking ]

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 ]

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

Parameter

-Job

Description Specifies the job you want to edit. You can asign multiple jobs to this object.

Required

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

threshold value set in DoubleSnapshotThreshol dMb parameter. [-DoubleSnapshot ThresholdMb ]

Specifies threshold limit value for the delta file in Mb.

False

Named

False

False

[-ExcludeSwapFile ]

If set to TRUE, the swap file will be excluded from backup.

False

Named

False

False

[-SetResultsTo VmAttribute ]

If set to TRUE, the job results will be written to custom attributes field of the VM.

False

Named

False

False

[VmAttributeName ]

Specifies the custom attributes field name.

False

Named

False

False

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

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

Set-VBRJobObjectVssOptions Short Description Changes job VSS settings.

Applies to Version: Platform: VMware

Syntax Set-VBRJobObjectVssOptions [-Object] [-Options] [-WarningAction ] [WarningVariable ] [] -ORSet-VBRJobObjectVssOptions [-Object] -Credentials [-WarningAction ] [WarningVariable ] []

Detailed Description This cmdlet allows you to change VSS settings for the specified job objects.

Parameters Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

Specifies the option that you want to change.

True

2

False

False

Specifies the credentials you want to use for authenticating with the guest VM.

True

Named

False

False

Parameter

Description

[-Object]

Specifies the VMs and VM containers for which you wish to change VSS settings.

[-Options] -Credentials

Required

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

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

Set-VBRJobOptions Short Description Applies custom job settings.

Applies to Version: Platform: VMware

Syntax Set-VBRJobOptions [-Job] [-Options] [-WarningAction ] [-WarningVariable ] []

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 NewVBRJobOptions cmdlet.

Parameters Parameter

Description

[-Job]

Specifies the job you want to edit.

[-Options]

Specifies the set of parameters you want to apply to the job.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

True

2

False

False

Required

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

294 | 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 -Proxy [-Target] [-WarningAction ] [-WarningVariable ] [] -ORSet-VBRJobProxy -Job -AutoDetect [-Target] [WarningAction ] [-WarningVariable ] []

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.

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

Parameters Parameter

-Job

Description Specifies the job you want to set proxy to. You can assign multiple backup jobs to this object.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True (ByValue, ByProperty Name)

False

Required

-Proxy

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

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

296 | 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" | SetVBRJobProxy -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" | SetVBRJobProxy -AutoDetect

297 | 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 [-Daily] [-At ] [-DailyKind ] [-Days ] [WarningAction ] [-WarningVariable ] [] -ORSet-VBRJobSchedule -Job [-At ] [-Days ] [-Monthly] [-NumberInMonth ] [Months ] [-WarningAction ] [WarningVariable ][] -ORSet-VBRJobSchedule -Job [-Periodicaly] [FullPeriod ] [-PeriodicallyKind ] [-WarningAction ] [-WarningVariable ] [] -ORSet-VBRJobSchedule -Job [-After] [-AfterJob ] [-WarningAction ] [WarningVariable ] []

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.

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

Parameters Parameter

-Job

Description

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True (ByValue, ByProperty Name)

False

Required

Specifies the job you want to set schedule to. You can assign multiple jobs to this object. Daily:

[-Daily]

Sets job schedule to daily run.

False

Named

False

False

[-At ]

Specifies the job start time. If not set, the job will start at 10:00 by default.

False

Named

False

False

False

Named

False

False

False

Named

False

False

Specifies the days to run the job:

[-DailyKind ]

[-Days ]

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.

Specifies the days of week to run the job.

Monthly: [-At ]

Specifies the job start time. If not set, the job will start at 10:00 by default.

False

Named

False

False

[-Days ]

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

False

Named

False

False

False

Named

False

False

[NumberInMonth ]

[-Monthly]

Specifies the period condition for the job run: First/Second/Third/Forth/La st. Use this parameter to set the condition for -Days parameter, i.e. to run the job on first Saturday every month. Sets job schedule to monthly run.

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

[-Months ]

Specifies the months to run the job.

False

Named

False

False

False

Named

False

False

False

Named

False

False

False

Named

False

False

Periodically: [-Periodicaly]

[-FullPeriod ]

Sets job schedule to periodical run. Sets the integer specifying value for the time period to run the job. Use this parameter to set the value for -PeriodicallyKind parameter. Specifies the measurement unit for the time period:

[PeriodicallyKind ]

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.

After this job: [-After]

Sets job schedule to run after a specific job.

False

Named

False

False

[-AfterJob ]

Specifies the job after which you want to run this job.

False

Named

False

False

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

300 | 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" | SetVBRJobSchedule -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

301 | 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] [-Options] [-WarningAction ] [WarningVariable ] []

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

[-Job]

Description Specifies the job for which you want to change the scheduling options.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

True

2

False

False

Required

You can assign multiple jobs to this object. Specifies the custom scheduling options.

[-Options]

Run NewVBRJobScheduleOptions to obtain the custom set of scheduling options.

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

302 | 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" | SetVBRJobScheduleOptions -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"

303 | 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] [-Options] -Credential [-WarningAction ] [-WarningVariable ] []

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 Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

Specifies the set of parameters you want to apply to the job.

True

2

False

False

Specifies the credentials you want to use for authenticating with the guest VM.

True

Named

False

False

Parameter

Description

[-Job]

Specifies the job you want to edit.

[-Options]

-Credential

Required

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

304 | 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

305 | 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] [-Options] [WarningAction ] [-WarningVariable ] []

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. NewVSBJobOptions 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

[-Job]

Description Specifies the SureBackup job for which you want to customize the job options.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

True

2

False

False

Required

You can assign multiple jobs to this object.

[-Options]

Specifies the custom SureBackup job options. Run New-VSBJobOptions to obtain the custom set of SureBackup job options.

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

306 | 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"

307 | 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] [-Options] [-WarningAction ] [WarningVariable ] []

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

[-Job]

Description Specifies the SureBackup job for which you want to change the scheduling options.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

True

2

False

False

Required

You can assign multiple SureBackup jobs to this object. Specifies the custom scheduling options. [-Options]

Run NewVBRJobScheduleOptions to obtain the custom set of scheduling options.

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

308 | 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 NewVBRJobScheduleOptions. 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"

309 | 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] [-Daily] [-At ] [DailyKind ] [-Days ] [WarningAction ] [-WarningVariable ] [] -ORSet-VSBJobSchedule [-Job] [-At ] [-Days ] [-Monthly] [-NumberInMonth ] [Months ] [-WarningAction ] [WarningVariable ] [] -ORSet-VSBJobSchedule [-Job] [-After] [-AfterJob ] [-WarningAction ] [WarningVariable ] []

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

-[-Job]

Specifies the SureBackup job you want to set schedule to. You can include multiple jobs into this object.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True (ByValue, ByProperty Name)

False

Required

Daily: [-Daily]

Sets SureBackup job schedule to daily run.

False

Named

False

False

[-At ]

Specifies the SureBackup job start time. If not set, the job

False

Named

False

False

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

will start at 10:00 by default.

Specifies the days to run the SureBackup job:

[-DailyKind ]

[-Days ]

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.

Specifies the days of week to run the SureBackup job.

False

Named

False

False

False

Named

False

False

Monthly: [-At ]

Specifies the SureBackup job start time. If not set, the job will start at 10:00 by default.

False

Named

False

False

[-Days ]

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

False

Named

False

False

[NumberInMonth ]

Specifies the period condition for the SureBackup job run: First/Second/Third/Forth/La st. Use this parameter to set the condition for -Days parameter, i.e. to run the job on first Saturday every month.

[-Monthly]

Sets SureBackup job schedule to monthly run.

False

Named

False

False

[-Months ]

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 ]

Specifies the job after which you want to run the SureBackup job.

False

Named

False

False

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

311 | 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" | SetVSBJobSchedule -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

312 | 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] [-VMName ] [-Server] [-ResourcePool] [-Datastore ] [-Folder ] [PowerUp] [-NICsEnabled] [-Reason ] [-RunAsync] [WarningAction ] [-WarningVariable ] []

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 StartVBRQuickMigration 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

False

[-RestorePoint]

Specifies the restore point to which you want to recover the VM.

True

1

True (ByValue, ByProperty Name)

[-VMName ]

Specifies the name you want to apply to the restored VM. By default, the original VM name is applied.

False

Named

False

False

[-Server]

Specifies the target host where you want to locate the restored VM.

True

2

False

False

[-ResourcePool]

Specifies the resource pool where you want to locate the restored VM.

False

3

False

False

[-Datastore ]

the restored VM.

[-Folder ]

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

False

Named

False

False

False

Named

False

False

[-Reason ]

[-RunAsync]

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. Indicate that the command returns immediately without waiting for the task to complete.

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

314 | 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

315 | 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] [-Server] [-Path] [-VMName ][-PreserveVmID []] [-PowerUp []] [-NICsEnabled []] [PreserveMACs []] [-Reason ] [-WarningAction ] [-WarningVariable ] []

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

False

[-RestorePoint]

Specifies the VM restore point you want to restore the VM to.

True

1

True (ByValue, ByProperty Name)

[-Server]

Specifies the server where you want to restore the VM.

True

2

False

False

[-Path]

Specifies the path to the folder to store the redo logs.

True

3

False

False

[-VMName ]

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 []]

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 []]

If set to $True, the restored VM will be connected to the

False

Named

False

False

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

network. Otherwise the VM will have no network connections.

[-Reason ]

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

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

317 | 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] [-WarningAction ][WarningVariable ] []

Detailed Description This cmdlet finalizes the instant recovery session started by Start-VBRHvInstantRecovery. You can terminate the migration process with Stop-VBRInstantRecovery.

Parameters Parameter

-InstantRecovery

Description Specifies the session(s) started with the StartVBRHvInstantRecovery cmdlet to finalize migration of a recovered VM to a Hyper-V host.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

1

True (ByValue, ByProperty Name)

False

You can assign multiple instant recovery sessions to this object.

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

318 | 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] [-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

False

Job

Specifies the job you want to start.

True

1

True (ByValue, ByProperty Name)

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

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

319 | 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 [-Reason ] [-WarningAction ] [-WarningVariable ] []

Detailed Description This cmdlet performs file-level recovery for any guest OS.

Parameters Parameter

-RestorePoint

Description

Specifies the particular restore point of the VM.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True (ByValue, ByProperty Name)

False

False

Named

False

False

Required

Specifies the reason for performing files restore. [-Reason ]

The information you provide will be saved in the session history so that you can reference it later.

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

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"

321 | 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 -Server [ResourcePool ] [-Datastore ] [-Folder ] [-SourceProxy ] [-TargetProxy ] [-ForceVeeamQM] [DeleteSorceVmFiles] [-RunAsync] [-WarningAction ] [-WarningVariable ][]

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

Require d

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

False

-Entity

Specifies the virtual machine(s) you want to migrate. You can assign multiple VMs to this object.

-Server

Specifies the destination server to where you want to migrate the VM.

True

Named

True (ByValue, ByProperty Name)

[-ResourcePool ]

Specifies the destination resource pool to where you want to migrate the VM.

False

Named

False

False

[-Datastore ]

Specifies the destination datastore to where you want to migrate the VM.

False

Named

False

False

[-Folder ]

Specifies the destination folder to where you want to migrate the VM.

False

Named

False

False

False

Named

False

False

[-SourceProxy ]

Specifies the source backup proxy(ies).

True

If not specified, Veeam

322 | 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. Specifies the target backup proxy(ies).

[-TargetProxy ]

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.

False

Named

False

False

False

Named

False

False

You can assign multiple proxies to this object. Forces using Veeam Quick Migration. [-ForceVeeamQM]

If omitted, migration process will use VMware VMotion given that the migration scenario and VMware licensing allows it.

[-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

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

323 | 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] [-Reason ] [-RunAsync] [-WarningAction ] [WarningVariable ] [-WhatIf] [-Confirm] []

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

False

[-RestorePoint]

Specifies the replica restore point to which you want to fail over.

True

Named

True (ByValue, ByProperty Name)

[-Reason ]

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

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

324 | 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] [-Server] [[ResourcePool] ] [[-Datastore] ] [-Folder ] [-VMName ] [-DiskType ] [-PowerUp []] [-Reason ] [-RunAsync] [-WarningAction ] [WarningVariable ] []

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

False

[-RestorePoint]

Specifies the VM restore point to which you want to restore.

True

1

True (ByValue, ByProperty Name)

[-Server]

Specifies the host where you want to locate the restored VM.

True

2

False

False

[[-ResourcePool] ]

Specifies the resource pool where you want to locate the restored VM.

False

3

False

False

[[-Datastore] ]

Specifies the datastore to which you want to connect the restored VM.

False

4

False

False

[-Folder ]

Specifies the folder where you want to locate the restored VM.

False

Named

False

False

[-VMName ]

Specifies the name you want to apply to the restored VM. By default, the original VM name is applied.

False

Named

False

False

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

[-DiskType ]

Specifies the disk type foryou want to apply to the restored VM: Thin, Thick or AsOriginal.

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

False

Named

False

False

False

Named

False

False

Specifies the reason for performing restore of the selected VM. [-Reason ]

[-RunAsync]

The information you provide will be saved in the session history so that you can reference it later. Indicate that the command returns immediately without waiting for the task to complete.

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

326 | 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] [-Server] [-Path] [-Files ] [-Reason ] [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

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

327 | 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”

328 | 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 [-RunAsync] [WarningAction ] [-WarningVariable ] [] -ORStart-VBRTapeCatalog -Medium [-RunAsync] [WarningAction ] [-WarningVariable ] []

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

Named

True (ByValue, ByProperty Name)

False

False

False

-Library

Specifies the tape library you want to catalog.

-Medium

Specifies the tape(s) you want to catalog.

True

Named

True (ByValue, ByProperty Name)

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False

Named

False

True

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

329 | 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

330 | 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 [-RunAsync] [WarningAction ][-WarningVariable ] [] -ORStart-VBRTapeInventory -Medium [-RunAsync] [WarningAction ][-WarningVariable ] []

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

Named

True (ByValue, ByProperty Name)

False

False

False

-Library

Specifies the tape library you want to inventory.

-Medium

Specifies the tape you want to inventory.

True

Named

True (ByValue, ByProperty Name)

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False

Named

False

True

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

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

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

--------

-----

----------

--------

TapeInven...

Tape ...

Stop... 6/26/2013

6/26/2013

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

Description

Start-VBRTapeRestore Short Description Starts VM restore from tape.

Applies to Version: 7.0 Platform: VMware, Hyper-V

Syntax Start-VBRTapeRestore -RestorePoint -Repository [-Reason ] [RunAsync][] -ORStart-VBRTapeRestore -RestorePoint -Server -Path [-Reason ] [-RunAsync][]

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

-RestorePoint

Description

Position

Accept Pipeline Input

Accept Wildcard Characters

True

Named

True (ByValue, ByProperty Name)

False

Required

Specifies the particular restore point(s) of the VM. You can assign multiple restore points to this object.

-Repository

Specifies the backup repository where you want to restore the VM.

True

Named

False

False

[-Reason ]

Specifies the reason for restore.

False

Named

False

False

-Server

Specifies the server where you want to restore the VM.

True

Named

False

False

-Path

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

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

complete.

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

334 | 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 -Path [-Files ] [-Version] [PreserveHierarhy] [-Overwrite {None | Newer | Always}] [-Security] [-RunAsync] []

Detailed Description This cmdlet starts restoring files from backup copied to tape.

Parameters Parameter

Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

-Server

Specifies the source server where the files to restore are located.

True

Named

False

False

-Path

Specifies the path to the files to restore.

True

Named

False

False

[-Files ]

Specifies the files to restore.

Named

True (ByValue, ByProperty Name)

False

[-Version ]

Specifies the version of the files you want to restore.

False

Named

True (ByValue, ByProperty Name)

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

False

Named

False

False

[-Overwrite {None | Newer | Always}]

Indicates the overwrite options in case the file exists: • None - leave the original file, •

False

Newer - overwrite the

335 | 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

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False

Named

True (ByValue, ByProperty Name)

False

Named

False

False

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

336 | 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] [-vApp ] [-VmName ] [-Datastore ] [-PowerOn] [-Reason ] [RunAsync] [-WarningAction ] [-WarningVariable ] []

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

False

[-RestorePoint]

Specifies the restore point of the VM.

True

1

True (ByValue, ByProper tyName)

[-vApp ]

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 ]

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 ]

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

False

Named

False

False

False

Named

False

False

Specifies the reason for performing restore of the selected VM. [-Reason ]

[-RunAsync]

The information you provide will be saved in the session history so that you can reference it later. Indicates that the command returns immediately without waiting for the task to complete.

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

338 | 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

339 | 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] [-PowerUp][-Reason ][RunAsync][] -ORStart-VBRvCloudRestoreVApp [-RestorePoint] [-PowerUp] [Reason ][-RunAsync][]

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 NewVBRvCloudVAppRestoreSettings cmdlet. See the New-VBRvCloudVAppRestoreSettings topic for detailed instructions for advanced setup options. This cmdlet provides two scenarios for each case.

Parameters Parameter

[-RestoreParams]

Description Specifies the CVcdVAppRestoreSettings object containing all settings required for the vApp restore. You can get the CVcdVAppRestoreSettings object by running the NewVBRvCloudVAppRestoreSett ings cmdlet. It is used for restoring vApp to another location or with different

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

1

True (ByValue, ByProperty Name)

False

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

settings. [-RestorePoint]

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

False

Named

False

False

False

Named

False

False

Specifies the reason for performing restore of the selected vApp. [-Reason ]

[-RunAsync]

The information you provide will be saved in the session history so that you can reference it later. Indicates that the command returns immediately without waiting for the task to complete.

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

341 | 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

342 | 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] [-vApp ] [-StorageProfile ] [vCloudDatastore ] [-VmTemplate ] [-VMName ] [-PowerUp] [-Reason ] [RunAsync] [-WarningAction ] [-WarningVariable ] []

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

[-RestorePoint]

Description 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.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

Required

A multiple VMs object is not valid in this cmdlet. [-vApp ]

Specifies the vApp where to you want to restore the VM.

False

Named

False

False

[-StorageProfile ]

Specifies the storage profile you want to apply to the restored VM.

False

Named

False

False

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

[-vCloudDatastore ]

Specifies the datastore you want to use with the restored VM.

False

Named

False

False

[-VmTemplate ]

Specifies the template you want to apply to the restored VM.

False

Named

False

False

[-VMName ]

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

False

Named

False

False

False

Named

False

False

Specifies the reason for performing restore of the selected VM. [-Reason ]

[-RunAsync]

The information you provide will be saved in the session history so that you can reference it later. Indicates that the command returns immediately without waiting for the task to complete.

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

344 | 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 ] -Entity [-Compression ] [-DisableQuiesce] [-RunAsync] [WarningAction ] [-WarningVariable ] [] -ORStart-VBRZip [-Folder ] -Entity [-Compression ] [-DisableQuiesce] [-RunAsync] [-WarningAction ] [-WarningVariable ] []

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 ]

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

Specifies the VM for which you want to create a VeeamZIP file.

True

Named

True (ByValue, ByProperty Name)

False

False

Named

False

False

Specifies then integer number corresponding to the desired compression level: [-Compression ]

0 = None. Consider disabling compression to achieve better deduplication ratios on deduplicating storage appliances at the cost of reduced backup

345 | 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 ]

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

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

346 | 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] [-Reason ]

Detailed Description This cmdlet allows you to restore VM files (VMX, VMDK, etc).

Parameters Parameter

Description

Require d

Position

Accept Pipeline Input

Accept Wildcard Characters

False

False

RestorePoint

Specifies the VM restore point to which you want to restore.

True

1

True (ByValue, ByProperty Name)

Reason

Specifies the string with the reason for performing the VM file restore.

False

Named

False

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-VSBJob Short Description Starts a created SureBackup job.

Applies to Version: 7.0 and earlier Platform: VMware, Hyper-V

Syntax Start-VSBJob [-Job] [-RunAsync] [-WarningAction ] [-WarningVariable ] []

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

[-Job]

[-RunAsync]

Description Specifies the SureBackup job you want to run. You can assign multiple jobs to this object. Indicate that the command returns immediately without waiting for the task to complete.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

False

Named

False

False

Required

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

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

349 | 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] [RunAsync] [-WarningAction ] [-WarningVariable ] []

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

False

False

[-InstantRecovery]

Specifies the running instant VM recovery process that you want to stop.

True

1

True (ByValue, ByProperty Name)

[-RunAsync]

Indicate that the command returns immediately without waiting for the task to complete.

False

Named

False

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

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

Example 1 This command stops the last instant recovery session. The needed session object is obtained with GetVBRInstantRecovery, 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"

351 | 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] [-RunAsync] [-WarningAction ] [-WarningVariable ] [-WhatIf] [Confirm] []

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

[-Job]

[-RunAsync]

Description Specifies the job you want to stop. You can assign multiple jobs to this object. Indicate that the command returns immediately without waiting for the task to complete.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

False

Named

False

False

Required

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

352 | 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"

353 | 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] [-RunAsync] [Force]

Detailed Description This cmdlet allows you to undo the replica failover.

Parameters Parameter

Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

False

RestorePoint

Specifies the restore point of a VM to recover to.

True

1

True (ByValue, ByProperty Name)

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

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

354 | 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] ] [-Drive ]

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

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-VSBJob Short Description Stops a selected running SureBackup job.

Applies to Version: 7.0 and earlier Platform: VMware, Hyper-V

Syntax Stop-VSBJob [-Job] [-RunAsync] [-WarningAction ] [-WarningVariable ] [-WhatIf] [Confirm] []

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

[-Job]

[-RunAsync]

Description Specifies the SureBackup job you want to stop. You can assign multiple jobs to this object. Indicates that the command returns immediately without waiting for the task to complete.

Position

Accept Pipeline Input

Accept Wildcard Characters

True

1

True (ByValue, ByProperty Name)

False

False

Named

False

False

Required

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

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"

357 | 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 ] []

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

[-Storage ]

Description

Specifies the storage you want to rescan.

Required

False

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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

358 | 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 []

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

-Volume

Description Specifies the volume(s) you want to synchronize. You can assign multiple volumes to this object.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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

359 | 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 []

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

-Storage

Description

Specifies the storage you want to synchronize.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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

360 | 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 []

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

-Volume

Description Specifies the volume(s) you want to synchronize. You can assign multiple volumes to this object.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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

361 | 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 [WarningAction ] [-WarningVariable ] []

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

-Repository

Description

Specifies backup repository you want to rescan.

Required

True

Position

Accept Pipeline Input

Accept Wildcard Characters

Named

True (ByValue, ByProperty Name)

False

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" | SyncVBRBackupRepository

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

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