Veeam Backup
PowerShell
Version 8.0
Reference
April, 2015
© 2015 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 (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 PowerShell |REFERENCE| REV 2
CONTENTS
CONTENTS............................................................................................................................................ 3
CONTACTING VEEAM SOFTWARE..................................................................................................... 11
ABOUT THIS GUIDE............................................................................................................................ 12
GETTING STARTED............................................................................................................................. 13
EXAMPLES OF USE .................................................................................................................................................................16
POWERSHELL REMOTING ......................................................................................................................................................21
INTERACTIVE POWERSHELL HELP .........................................................................................................................................22
VEEAM POWERSHELL REFERENCE .................................................................................................... 24
BACKUP INFRASTRUCTURE UNITS.........................................................................................................................................25
Add-VBRBackupRepository ........................................................................................................................28
Add-VBRESX .....................................................................................................................................................34
Add-VBRESXi ....................................................................................................................................................37
Add-VBRHvCluster .........................................................................................................................................40
Add-VBRHvHost ..............................................................................................................................................43
Add-VBRHvProxy ............................................................................................................................................45
Add-VBRHvScvmm ........................................................................................................................................47
Add-VBRLinux ..................................................................................................................................................49
Add-VBRSmbV3Cluster ................................................................................................................................52
Add-VBRSmbV3Host .....................................................................................................................................54
Add-VBRvCenter .............................................................................................................................................56
Add-VBRViProxy ..............................................................................................................................................58
Add-VBRWinServer ........................................................................................................................................60
Disable-VBRHvProxy .....................................................................................................................................62
Disable-VBRViProxy .......................................................................................................................................64
Enable-VBRHvProxy .......................................................................................................................................66
Enable-VBRViProxy ........................................................................................................................................68
Find-VBRHvEntity ...........................................................................................................................................70
Find-VBRViDatastore .....................................................................................................................................72
Find-VBRViEntity .............................................................................................................................................74
Find-VBRViFolder............................................................................................................................................77
Find-VBRViResourcePool .............................................................................................................................79
Find-VBRViStoragePolicy .............................................................................................................................81
Get-VBRBackupRepository .........................................................................................................................83
Get-VBRHvProxy .............................................................................................................................................84
Get-VBRJobProxy............................................................................................................................................86
Get-VBRLocalhost ...........................................................................................................................................88
Get-VBRServer .................................................................................................................................................89
Get-VBRViProxy ...............................................................................................................................................91
Remove-VBRBackupRepository ................................................................................................................92
Remove-VBRHvProxy ....................................................................................................................................94
Remove-VBRServer ........................................................................................................................................96
Remove-VBRViProxy......................................................................................................................................98
Rescan-VBREntity ........................................................................................................................................ 100
3 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRBackupRepository ....................................................................................................................... 102
Set-VBRJobProxy ......................................................................................................................................... 107
Sync-VBRBackupRepository .................................................................................................................... 109
VBRViStoragePolicy .................................................................................................................................... 110
BACKUP AND REPLICATION TASKS .................................................................................................................................... 111
Creating VMware Backup Job ................................................................................................................ 115
Creating Hyper-V Backup Job................................................................................................................. 116
Creating VMware Replica Job ................................................................................................................. 117
Creating Hyper-V Replica Job ................................................................................................................. 119
Add-VBRHvBackupJob .............................................................................................................................. 121
Add-VBRHvJobObject................................................................................................................................ 123
Add-VBRHvReplicaJob .............................................................................................................................. 125
Add-VBRViBackupJob ................................................................................................................................ 128
Add-VBRViJobObject ................................................................................................................................. 130
Add-VBRViReplicaJob ................................................................................................................................ 132
Copy-VBRJob ................................................................................................................................................. 137
Disable-VBRJob ............................................................................................................................................ 139
Disable-VBRJobGuestFSIndexing.......................................................................................................... 141
Disable-VBRJobSchedule ......................................................................................................................... 143
Disable-VBRJobVSSIntegration .............................................................................................................. 145
Enable-VBRJob ............................................................................................................................................. 147
Enable-VBRJobGuestFSIndexing ........................................................................................................... 149
Enable-VBRJobSchedule........................................................................................................................... 151
Enable-VBRJobVSSIntegration ............................................................................................................... 153
Get-VBRHvServerNetworkInfo ............................................................................................................... 155
Get-VBRJob .................................................................................................................................................... 157
Get-VBRJobObject ...................................................................................................................................... 159
Get-VBRJobObjectVssOptions................................................................................................................ 161
Get-VBRJobOptions .................................................................................................................................... 163
Get-VBRJobScheduleOptions ................................................................................................................. 164
Get-VBRJobVSSOptions ............................................................................................................................ 165
Get-VBRReplica............................................................................................................................................. 166
Get-VBRViReplicaReIpRule ....................................................................................................................... 167
Get-VBRViServerNetworkInfo ................................................................................................................. 169
New-VBRJobOptions .................................................................................................................................. 171
New-VBRJobScheduleOptions ............................................................................................................... 173
New-VBRJobVssOptions ........................................................................................................................... 174
New-VBRViReplicaReIpRule..................................................................................................................... 176
Remove-VBRJob........................................................................................................................................... 179
Remove-VBRJobObject ............................................................................................................................. 181
Remove-VBRReplica ................................................................................................................................... 182
Reset-HvVmChangeTracking .................................................................................................................. 184
Reset-VBRJobOptions ................................................................................................................................ 186
Reset-VBRJobScheduleOptions ............................................................................................................. 188
Reset-VBRJobVssOptions ......................................................................................................................... 189
Set-VBRJobAdvancedBackupOptions ................................................................................................. 191
4 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRJobAdvancedHvOptions .......................................................................................................... 195
Set-VBRJobAdvancedNotificationOptions ........................................................................................ 197
Set-VBRJobAdvancedOptions ................................................................................................................ 199
Set-VBRJobAdvancedStorageOptions ................................................................................................ 203
Set-VBRJobAdvancedViOptions ............................................................................................................ 206
Set-VBRJobObjectVssOptions ................................................................................................................ 208
Set-VBRJobOptions..................................................................................................................................... 210
Set-VBRJobSchedule .................................................................................................................................. 212
Set-VBRJobScheduleOptions .................................................................................................................. 216
Set-VBRJobVssOptions .............................................................................................................................. 218
Set-VBRViReplicaJob .................................................................................................................................. 220
Start-VBRJob .................................................................................................................................................. 224
Stop-VBRJob .................................................................................................................................................. 226
FAILOVER AND FAILBACK ................................................................................................................................................... 228
Start-VBRHvReplicaFailback .................................................................................................................... 229
Start-VBRHvReplicaFailover .................................................................................................................... 231
Start-VBRViReplicaFailback ...................................................................................................................... 233
Start-VBRViReplicaFailover ...................................................................................................................... 235
Stop-VBRReplicaFailover .......................................................................................................................... 238
Stop-VBRViReplicaFailback ...................................................................................................................... 240
FAILOVER PLANS ................................................................................................................................................................. 242
Performing Failover by Failover Plan................................................................................................... 243
Add-VBRFailoverPlan ................................................................................................................................. 245
Get-VBRFailoverPlan .................................................................................................................................. 247
New-VBRFailoverPlanObject ................................................................................................................... 249
Remove-VBRFailoverPlan ......................................................................................................................... 251
Set-VBRFailoverPlan ................................................................................................................................... 253
Set-VBRFailoverPlanObject ..................................................................................................................... 256
Start-VBRFailoverPlan ................................................................................................................................ 258
Undo-VBRFailoverPlan .............................................................................................................................. 260
VBRFailoverPlan ........................................................................................................................................... 262
VBRFailoverPlanObject ............................................................................................................................. 263
BACKUP COPY ..................................................................................................................................................................... 264
Add-VBRHvBackupCopyJob.................................................................................................................... 265
Add-VBRViBackupCopyJob ..................................................................................................................... 269
Sync-VBRBackupCopyJob ........................................................................................................................ 273
Add-VBRvCloudBackupCopyJob........................................................................................................... 275
Add-VBREPBackupCopyJob .................................................................................................................... 278
VM COPY ............................................................................................................................................................................ 282
Add-VBRCopyJob ........................................................................................................................................ 283
VEEAMZIP ........................................................................................................................................................................... 285
Start-VBRZip .................................................................................................................................................. 286
QUICK BACKUP ................................................................................................................................................................... 289
Start-VBRQuickBackup .............................................................................................................................. 290
QUICK MIGRATION ............................................................................................................................................................. 291
Start-VBRQuickMigration ......................................................................................................................... 292
5 | Veeam Backup PowerShell |REFERENCE| REV 2
DATA RECOVERY ................................................................................................................................................................. 295
Get-VBRRestoreSession............................................................................................................................. 296
Remove-VBRRestoreSession ................................................................................................................... 297
Start-VBRHvRestoreVM ............................................................................................................................. 299
Start-VBRLinuxFileRestore ....................................................................................................................... 302
Start-VBRRestoreVM ................................................................................................................................... 306
Start-VBRRestoreVMFiles .......................................................................................................................... 310
Start-VBRWindowsFileRestore ............................................................................................................... 312
Stop-VBRLinuxFileRestore ....................................................................................................................... 315
Stop-VBRWindowsFileRestore ............................................................................................................... 316
INSTANT VM RECOVERY..................................................................................................................................................... 318
Performing Instant Recovery of a VMware VM ................................................................................ 319
Performing Instant Recovery of a Hyper-V VM ................................................................................ 321
Get-VBRInstantRecovery .......................................................................................................................... 322
Restart-VBRInstantRecovery ................................................................................................................... 323
Start-VBRHvInstantRecovery................................................................................................................... 325
Start-VBRHvInstantRecoveryMigration............................................................................................... 329
Start-VBRInstantRecovery ........................................................................................................................ 331
Stop-VBRInstantRecovery ........................................................................................................................ 334
SUREBACKUP RECOVERY VERIFICATION ........................................................................................................................... 336
Virtual Lab ...................................................................................................................................................... 337
Application Group....................................................................................................................................... 358
SureBackup Job............................................................................................................................................ 369
TAPES DEVICE SUPPORT..................................................................................................................................................... 369
Add-VBRBackupToTapeJob..................................................................................................................... 408
Add-VBRFileToTapeJob ............................................................................................................................ 412
Add-VBRTapeMediaPool .......................................................................................................................... 416
Add-VBRTapeServer ................................................................................................................................... 420
Add-VBRTapeVault ..................................................................................................................................... 422
Disable-VBRTapeDrive............................................................................................................................... 424
Disable-VBRTapeProtection .................................................................................................................... 426
Eject-VBRTapeMedium.............................................................................................................................. 427
Enable-VBRTapeDrive ................................................................................................................................ 429
Enable-VBRTapeProtection ..................................................................................................................... 431
Erase-VBRTapeMedium ............................................................................................................................. 433
Export-VBRTapeMedium .......................................................................................................................... 435
Get-VBRTapeDrive ...................................................................................................................................... 437
Get-VBRTapeJob .......................................................................................................................................... 439
Get-VBRTapeLibrary ................................................................................................................................... 440
Get-VBRTapeMediaPool ........................................................................................................................... 443
Get-VBRTapeMedium ................................................................................................................................ 445
Get-VBRTapeServer .................................................................................................................................... 448
Get-VBRTapeVault ....................................................................................................................................... 450
Import-VBRTapeMedium ......................................................................................................................... 452
Move-VBRTapeMedium ............................................................................................................................ 454
New-VBRBackupToTapeScheduleOptions ........................................................................................ 457
6 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRBackupWindowOptions ......................................................................................................... 459
New-VBRDailyOptions ............................................................................................................................... 461
New-VBRFileToTapeBackupPolicy ........................................................................................................ 463
New-VBRFileToTapeObject ..................................................................................................................... 465
New-VBRFullBackupToTapePolicy........................................................................................................ 467
New-VBRMonthlyOptions ........................................................................................................................ 469
New-VBRTapeMediaPoolRetentionPolicy ......................................................................................... 471
New-VBRTapeMediaSetCreationPolicy............................................................................................... 474
Remove-VBRTapeLibrary .......................................................................................................................... 476
Remove-VBRTapeMediaPool .................................................................................................................. 478
Remove-VBRTapeServer ........................................................................................................................... 480
Remove-VBRTapeVault ............................................................................................................................. 482
Set-VBRBackupToTapeJob....................................................................................................................... 484
Set-VBRBackupWindowOptions ............................................................................................................ 489
Set-VBRFileToTapeJob .............................................................................................................................. 491
Set-VBRTapeLibrary .................................................................................................................................... 496
Set-VBRTapeMediaPool ............................................................................................................................ 498
Set-VBRTapeMedium ................................................................................................................................. 502
Set-VBRTapeServer ..................................................................................................................................... 504
Set-VBRTapeVault ....................................................................................................................................... 506
Start-VBRTapeCatalog ............................................................................................................................... 508
Start-VBRTapeInventory ........................................................................................................................... 510
VBRBackupToTapeJob............................................................................................................................... 512
VBRBackupToTapeScheduleOptions ................................................................................................... 514
VBRFileToTapeBackupPolicy ................................................................................................................... 515
VBRFileToTapeJob ...................................................................................................................................... 516
VBRFileToTapeObject ................................................................................................................................ 518
VBRFullBackupToTapePolicy .................................................................................................................. 519
VBRTapeDrive ............................................................................................................................................... 520
VBRTapeLibrary ............................................................................................................................................ 521
VBRTapeMediaPool .................................................................................................................................... 522
VBRTapeMediaPoolRetentionPolicy .................................................................................................... 524
VBRTapeMediaSetCreationPolicy ......................................................................................................... 525
VBRTapeMedium ......................................................................................................................................... 526
VBRTapeServer ............................................................................................................................................. 528
VBRTapeVault ............................................................................................................................................... 529
VCLOUD DIRECTOR............................................................................................................................................................. 530
Add-VBRvCloud............................................................................................................................................ 531
Add-VBRvCloudBackupCopyJob........................................................................................................... 533
Add-VBRvCloudJob .................................................................................................................................... 536
Add-VBRvCloudVC ...................................................................................................................................... 538
Find-VBRvCloudEntity ............................................................................................................................... 541
New-VBRvCloudVAppRestoreSettings ............................................................................................... 544
Start-VBRvCloudInstantRecovery.......................................................................................................... 547
Start-VBRvCloudRestoreVApp ................................................................................................................ 550
Start-VBRvCloudRestoreVm .................................................................................................................... 553
7 | Veeam Backup PowerShell |REFERENCE| REV 2
VEEAM CLOUD CONNECT .................................................................................................................................................. 556
Configuring Cloud Connect Infrastructure as a Service Provider ............................................. 558
Configuring Cloud Connect Infrastructure as a User .................................................................... 559
Add-VBRCloudGateway ............................................................................................................................ 560
Add-VBRCloudProvider ............................................................................................................................. 563
Add-VBRCloudTenant................................................................................................................................ 566
Disable-VBRCloudGateway ..................................................................................................................... 569
Disable-VBRCloudTenant ......................................................................................................................... 571
Enable-VBRCloudGateway ....................................................................................................................... 573
Enable-VBRCloudTenant .......................................................................................................................... 575
Get-VBRCloudGateway ............................................................................................................................. 577
Get-VBRCloudProvider .............................................................................................................................. 579
Get-VBRCloudTenant ................................................................................................................................. 581
New-VBRCloudTenantResource ............................................................................................................ 583
Remove-VBRCloudGateway .................................................................................................................... 585
Remove-VBRCloudProvider..................................................................................................................... 587
Remove-VBRCloudTenant ....................................................................................................................... 589
Reset-VBRCloudTenant ............................................................................................................................. 591
Set-VBRCloudGateway .............................................................................................................................. 593
Set-VBRCloudProvider ............................................................................................................................... 596
Set-VBRCloudTenant.................................................................................................................................. 599
Set-VBRCloudTenantResource ............................................................................................................... 603
VBRCloudGateway ...................................................................................................................................... 605
VBRCloudProvider ....................................................................................................................................... 606
VBRCloudProviderResource .................................................................................................................... 607
VBRCloudTenant.......................................................................................................................................... 608
VBRCloudTenantResource ....................................................................................................................... 609
CREDENTIALS ...................................................................................................................................................................... 610
Add-VBRCredentials ................................................................................................................................... 611
Get-VBRCredentials .................................................................................................................................... 614
Remove-VBRCredentials ........................................................................................................................... 615
Set-VBRCredentials ..................................................................................................................................... 616
ENCRYPTION........................................................................................................................................................................ 619
Add-VBREncryptionKey ............................................................................................................................ 620
Get-VBREncryptionKey .............................................................................................................................. 622
Remove-VBREncryptionKey .................................................................................................................... 624
Set-VBREncryptionKey .............................................................................................................................. 626
PSCryptoKey .................................................................................................................................................. 628
WAN ACCELERATION ........................................................................................................................................................ 629
Add-VBRWANAccelerator ........................................................................................................................ 630
Clear-VBRWANCache ................................................................................................................................. 632
Get-VBRWANAccelerator .......................................................................................................................... 633
Remove-VBRWANAccelerator ................................................................................................................ 634
BACKUPS ............................................................................................................................................................................. 635
Import-VBRBackup...................................................................................................................................... 636
Export-VBRBackup ...................................................................................................................................... 638
8 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRBackup ............................................................................................................................................ 640
Remove-VBRBackup ................................................................................................................................... 642
RESTORE POINTS ................................................................................................................................................................. 644
Get-VBRFilesInRestorePoint .................................................................................................................... 645
Get-VBRRestorePoint ................................................................................................................................. 647
Remove-VBRRestorePoint ........................................................................................................................ 649
SESSIONS ............................................................................................................................................................................. 651
Get-VBRBackupSession ............................................................................................................................. 652
Get-VBRSession ............................................................................................................................................ 654
Get-VBRTaskSession ................................................................................................................................... 656
VBRBackupSession ...................................................................................................................................... 658
VBRSession ..................................................................................................................................................... 659
VBRLogItem ................................................................................................................................................... 660
LOGS EXPORT...................................................................................................................................................................... 661
Export-VBRLogs............................................................................................................................................ 662
CONFIGURATION BACKUP .................................................................................................................................................. 665
Export-VBRConfiguration ......................................................................................................................... 666
NETAPP STORAGE SYSTEMS .............................................................................................................................................. 667
Add-NetAppHost ......................................................................................................................................... 668
Add-NetAppSnapshot ............................................................................................................................... 670
Get-NetAppHost .......................................................................................................................................... 671
Get-NetAppSnapshot ................................................................................................................................ 672
Get-NetAppVolume .................................................................................................................................... 674
Remove-NetAppHost................................................................................................................................. 675
Remove-NetAppSnapshot ....................................................................................................................... 676
Set-NetAppHost ........................................................................................................................................... 677
Sync-NetAppHost ........................................................................................................................................ 679
Sync-NetAppVolume ................................................................................................................................. 680
HP 3PAR STORESERV STORAGE SYSTEMS ...................................................................................................................... 681
Add-HP3Snapshot ...................................................................................................................................... 682
Add-HP3Storage .......................................................................................................................................... 684
Get-HP3Snapshot ........................................................................................................................................ 686
Get-HP3Storage ........................................................................................................................................... 688
Get-HP3Volume ........................................................................................................................................... 689
Remove-HP3Snapshot .............................................................................................................................. 691
Remove-HP3Storage .................................................................................................................................. 692
Sync-HP3Storage ......................................................................................................................................... 694
Sync-HP3Volume ......................................................................................................................................... 696
HP STOREVIRTUAL STORAGE SYSTEMS ............................................................................................................................ 698
Add-HP4Snapshot ...................................................................................................................................... 699
Add-HP4Storage .......................................................................................................................................... 701
Get-HP4Cluster ............................................................................................................................................. 703
Get-HP4Snapshot ........................................................................................................................................ 705
Get-HP4Storage ........................................................................................................................................... 707
Get-HP4Volume ........................................................................................................................................... 708
Remove-HP4Snapshot .............................................................................................................................. 710
9 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-HP4Storage .................................................................................................................................. 712
Sync-HP4Storage ......................................................................................................................................... 714
Sync-HP4Volume ......................................................................................................................................... 716
VEEAM ENDPOINT BACKUP................................................................................................................................................ 718
Add-VBREPBackupCopyJob .................................................................................................................... 719
Disable-VBREPJob ....................................................................................................................................... 723
Enable-VBREPJob ........................................................................................................................................ 725
Get-VBREPJob ............................................................................................................................................... 727
Get-VBREPPermission ................................................................................................................................ 729
Get-VBREPSession ....................................................................................................................................... 731
Set-VBREPPermission ................................................................................................................................. 732
Start-VBRRestoreVirtualDisks .................................................................................................................. 736
VBREPJob ........................................................................................................................................................ 739
VBREPPermission ......................................................................................................................................... 740
VEEAM POWERSHELL HELP ............................................................................................................................................... 741
Get-VBRToolkitDocumentation ............................................................................................................. 742
10 | Veeam Backup PowerShell |REFERENCE| REV 2
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/backup-replication-resources.html
Community forum at forums.veeam.com
11 | Veeam Backup PowerShell |REFERENCE| REV 2
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.
Conventions
In order to help you get the most out of this guide, we have used the following formatting
conventions, terms and abbreviations in the document:
Style Description
Boldface User interface elements (names of dialog windows, buttons and so on).
Italics Titles, special terms and general emphasis, file paths, names of files and folders.
Hyperlink Cross reference links and external hyperlinks
Additionally, important information, notes and tips are provided in the following format:
Note This type of formatting is used for tips, notes and important information the user should pay
attention to.
Document Revision History
Revision # Date Change Summary
Initial version of the document for the Veeam Backup PowerShell
Revision 1 06/11/2014
Reference 8.0.
Revision 2 29.04.2015 Updated with added possibilities of Update 2.
12 | Veeam Backup PowerShell |REFERENCE| REV 2
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.
Working 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.
The 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:
13 | Veeam Backup PowerShell |REFERENCE| REV 2
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:\PS> Get-VBRJob | Where {$_.Name -eq "Backup Job 3"}
Job Name Type State Last Result Description
Backup Job 3 Hyper-V Backup Stopped Success Created by...
The result of filtering and sorting can be saved to a variable:
PS C:\PS> $job = Get-VBRJob | Where {$_.Name -eq "Backup Job 3"}
PS C:\PS> $job
Job Name Type State Last Result Description
Backup Job 3 Hyper-V Backup Stopped Success Created by...
You can get detailed information about the object:
PS C:\PS> $job | 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...
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...
14 | Veeam Backup PowerShell |REFERENCE| REV 2
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.
See Next:
Examples of Use
PowerShell Remoting
Interactive PowerShell Help
15 | Veeam Backup PowerShell |REFERENCE| REV 2
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:\PS> 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:
16 | Veeam Backup PowerShell |REFERENCE| REV 2
Then, we get a list of available restore points, select the last restore point and save it into a variable:
PS C:\PS> Get-VBRBackup -Name "Backup Job 7" | Get-
VBRRestorePoint
VM Name Creation Time Type Failoved
Backup Job 1 7/23/2013 3:15:43 AM Full
Backup Job 2 7/30/2013 3:10:15 AM Increment
Backup Job 7 8/6/2013 3:45:52 AM Increment
PS C:\PS> $restorepoint = Get-VBRBackup -Name "Backup Job 7"
| Get-VBRRestorePoint | Select -Last 1
PS C:\PS> $restorepoint
VM Name Creation Time Type Failoved
Backup Job 7 8/6/2013 3:45:52 AM Increment
A similar action is performed by the Restore wizard in Veeam Backup & Replication:
17 | Veeam Backup PowerShell |REFERENCE| REV 2
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:\PS> $server = Get-VBRServer -Name "esx18.veeam.local"
PS C:\PS> $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):
PS C:\PS> $pool = Get-VBRServer -Name "esx18.veeam.local" |
Find-VBRViResourcePool -Name "fileservers"
PS C:\PS> $pool
ConnHost : Veeam.Backup.Core.CHost
Type : ResourcePool
Reference: resgroup-14867
Id : ebaf51b0-c972-4080-95de-b590aa6cf73b_resgroup-14867
Name : fileservers
Path : fileservers
18 | Veeam Backup PowerShell |REFERENCE| REV 2
Similar actions are performed in the steps of the Restore wizard in Veeam Backup & Replication:
Selecting the host:
And then selecting the resource pool:
19 | Veeam Backup PowerShell |REFERENCE| REV 2
Now, let's perform restore of the VM:
PS C:\PS> Start-VBRRestoreVM -RestorePoint $restorepoint
-Server $server -ResourcePool $pool
Restore session
Restore started
Job 'WinXPx86' is working...
Restore Type VM Name State End Time
RestoreVm WinXPx86 Stopped 8/6/2013 5:01:18 AM
You can also view the restore job result in the Veeam Backup & Replication UI:
20 | Veeam Backup PowerShell |REFERENCE| REV 2
PowerShell Remoting
Veeam PowerShell supports remote execution of cmdlets and scripts. That is, you can run cmdlets and
scripts directly on the Veeam Backup & Replication, or against remote computers. A remote session
can be started on one remote computer, or a number of remote computers at a time.
To enable PowerShell remoting:
1. Install the WinRM Service.
2. Enable PowerShell remoting. Start Windows PowerShell 2.0 as an administrator and type in
Enable-PSRemoting
To learn more about PowerShell remoting and its configuration, see:
http://blogs.msdn.com/b/powershell/archive/2008/05/10/remoting-with-powershell-
quickstart.aspx
http://www.computerperformance.co.uk/powershell/powershell_remote.htm
21 | Veeam Backup PowerShell |REFERENCE| REV 2
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:\PS> 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
22 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-Help <cmdletname> displays a full description of the specified cmdlet along with its syntax and
full parameter description.
PS C:\PS> Get-Help Get-VBRTaskSession
NAME
Get-VBRTaskSession
SYNOPSIS
Returns list of tasks performed during a specified session.
SYNTAX
Get-VBRTaskSession [-Session] <CBackupSession> [-Name
<String[]>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
DESCRIPTION
This cmdlet returns a list of all tasks performed during the
specified session. You can get the tasks for backup,
replication and backup copy sessions.
Run Get-VSBTaskSession to get the tasks for SureBackup
session.
RELATED LINKS
REMARKS
To see the examples, type: "get-help Get-VBRTaskSession -
examples".
For more information, type: "get-help Get-VBRTaskSession -
detailed".
For technical information, type: "get-help Get-VBRTaskSession
-full".
23 | Veeam Backup PowerShell |REFERENCE| REV 2
VEEAM POWERSHELL REFERENCE
Veeam PowerShell allows you to perform almost all operations that are available with the Veeam
Backup & Replication UI.
See the topics below to get help with performing backup and restore tasks with your command line.
These topics contain instructions on carrying out tasks with PowerShell and reference for relevant
cmdlets.
Backup Infrastructure Units
Backup and Replication Tasks
Failover and Failback
Failover Plans
Backup Copy
VM Copy
VeeamZIP
Quick Backup
Quick Migration
Data Recovery
Instant VM Recovery
SureBackup Recovery Verification
Tapes Device Support
vCloud Director
Veeam Cloud Connect
Credentials
Encryption
WAN Acceleration
Backups
Restore Points
Sessions
Logs Export
Configuration Backup
NetApp Storage Systems
HP 3PAR StoreServ Storage Systems
HP StoreVirtual Storage Systems
Veeam PowerShell Help
Veeam Endpoint Backup
See also:
Alphabetic List of Veeam Backup & Replication Cmdlets
Veeam PowerShell Objects List
24 | Veeam Backup PowerShell |REFERENCE| REV 2
Backup Infrastructure Units
Veeam Backup & Replication PowerShell allows you to set up and manage your backup infrastructure.
The section contains information on cmdlets that you will need to manage the core components of
the backup infrastructure:
Hosts and clusters
Backup proxies
Backup repositories
To configure optional components, see the following topics of this reference:
WAN Acceleration
Credentials
Encryption
Managing hosts
Add hosts and clusters to your Veeam Backup & Replication management console and administrate
them.
Operation VMware Hyper-V
Add various type hosts and clusters to Veeam Backup & Replication console:
Adds a Linux server Add-VBRLinux Add-VBRLinux
Adds a Windows server Add-VBRWinServer Add-VBRWinServer
Adds a vCenterServer Add-VBRvCenter —
Adds an ESX host Add-VBRESX —
Adds an ESXi host Add-VBRESXi —
Adds a Hyper-V host — Add-VBRHvHost
Adds a Hyper-V cluster — Add-VBRHvCluster
Adds a Microsoft System
Center Virtual Machine — Add-VBRHvScvmm
Manager server (SCVMM)
Adds an SMB3 cluster — Add-VBRSmbV3Cluster
Adds an SMB3 host — Add-VBRSmbV3Host
Get and remove hosts from your console:
Looks for hosts you manage Get-VBRServer Get-VBRServer
Gets the host you are
Get-VBRLocalhost Get-VBRLocalhost
working on
Removes a host Remove-VBRServer Remove-VBRServer
Look for components of your virtual infrastructure:
Looks for all kinds of virtual
Find-VBRViEntity Find-VBRHvEntity
objects
Looks for datastores Find-VBRViDatastore —
25 | Veeam Backup PowerShell |REFERENCE| REV 2
Operation VMware Hyper-V
Looks for folders Find-VBRViFolder —
Looks for resource pools Find-VBRViResourcePool —
Update information on your virtual infrastructure objects
Rescans virtual objects Rescan-VBREntity Rescan-VBREntity
Look for storage policy profiles
Returns VMware storage
Find-VBRViStoragePolicy —
policy profiles
Managing proxy servers
Create virtual proxy servers in your Veeam Backup & Replication console and administrate them.
Operation VMware Hyper-V
Manage proxies:
Creates a new virtual proxy Add-VBRViProxy Add-VBRHvProxy
Enables a disabled proxy Enable-VBRViProxy Enable-VBRHvProxy
Disables a proxy Disable-VBRViProxy Disable-VBRHvProxy
Looks for proxies you
Get-VBRViProxy Get-VBRHvProxy
manage
Removes a proxy Remove-VBRViProxy Remove-VBRHvProxy
Manage proxy selection for particular jobs:
Looks for proxies assigned for
Get-VBRJobProxy Get-VBRJobProxy
a selected job
Sets a specific proxy for a job
or enables automatic proxy Set-VBRJobProxy Set-VBRJobProxy
selection
26 | Veeam Backup PowerShell |REFERENCE| REV 2
Managing backup repositories
Add backup repositories in your Veeam Backup & Replication console and administrate them.
With Veeam PowerShell, you can administrate the following types of backup repositories in the
backup infrastructure:
• Microsoft Windows server with a local or directly attached storage
• Linux server with local, directly attached or mounted NFS storage
• Shared CIFS (SMB) folder
• Deduplicating storage appliance: EMC Data Domain, ExaGrid and HP StoreOnce
Operation VMware Hyper-V
Adds a new backup
Add-VBRBackupRepository Add-VBRBackupRepository
repository
Looks for connected backup
Get-VBRBackupRepository Get-VBRBackupRepository
repositories
Modifies a backup repository Set-VBRBackupRepository Set-VBRBackupRepository
Removes a backup repository Remove-VBRBackupRepository Remove-VBRBackupRepository
Rescans a backup repository Sync-VBRBackupRepository Sync-VBRBackupRepository
27 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRBackupRepository
Short Description
Adds a new backup repository server.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRBackupRepository [-Name <String>] [-Description <String>]
[-Server <CHost>] [-MountServer <CHost>] -Folder <String> -Type
<CBackupRepositoryInfo+EType> [-ImportIndex] [-ImportBackup] [-
RotatedDrive] [-VPowerNFSFolder <String>] [-UseFc] [-DDServerName
<String>] [-LimitConcurrentJobs] [-MaxConcurrentJobs <Int32>] [-
LimitDatarate] [-DataRateLimit <Int32>] [-AlignDataBlocks] [-
DecompressDataBlocks] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Add-VBRBackupRepository [-Name <String>] [-Description <String>]
[-Server <CHost>] [-MountServer <CHost>] -Folder <String> -Type
<CBackupRepositoryInfo+EType> [-ImportIndex] [-ImportBackup] [-
RotatedDrive] [-VPowerNFSFolder <String>] [-UseFc] [-DDServerName
<String>] [-UserName <String>] [-Password <String>] [-
LimitConcurrentJobs] [-MaxConcurrentJobs <Int32>] [-
LimitDatarate] [-DataRateLimit <Int32>] [AlignDataBlocks] [-
DecompressDataBlocks] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Add-VBRBackupRepository [-Name <String>] [-Description <String>]
[-Server <CHost>] [-MountServer <CHost>] -Folder <String> -Type
<CBackupRepositoryInfo+EType> [-ImportIndex] [-ImportBackup] [-
RotatedDrive] [-VPowerNFSFolder <String>] [-UseFc] [-DDServerName
<String>] [-Credentials <CCredentials>] [-LimitConcurrentJobs] [-
MaxConcurrentJobs <Int32>] [-LimitDatarate] [-DataRateLimit
<Int32>] [-AlignDataBlocks] [-DecompressDataBlocks] [-
WarningAction <ActionPreference>] [-WarningVariable
<String>][<CommonParameters>]
Related Commands
Get-VBRServer
Get-VBRCredentials
28 | Veeam Backup PowerShell |REFERENCE| REV 2
Detailed Description
This cmdlet adds a new backup repository server to Veeam Backup & Replication.
Veeam Backup & Replication supports the following types of backup repositories:
• Microsoft Windows server with a local or directly attached storage
• Linux server with local, directly attached or mounted NFS storage
• Repositories using rotated drives (removable media)
• Shared CIFS (SMB) folder
• Deduplicating storage appliance: EMC Data Domain, ExaGrid and HP StoreOnce
When adding a backup repository, you may need to provide username/password or credentials to
authenticate with the source server. This cmdlet provides three scenarios for each case including no
authentication.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the the name you want
Name to assign to the new backup False Named False False
repository.
Specifies the description of the
backup repository.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Specifies the type you want to
assign to the repository:
• CifsShare
Type • DataDomain True Named False False
• ExaGrid
• HPStoreOnce
• LinuxLocal
• WinLocal
Specifies the host where the
backup repository you want to
add is located.
Use this parameter to explicitly
set the host for the following
repository types:
For the WinLocal type:
indicate the Windows
Server based server where you False Named False False
want to create the
backup repository or to
which you want to
connect the rotated
drives.
For the LinuxLocal type:
indicate the Linux
based server where you
want to create the
29 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
backup repository or to
which you want to
connect the rotated
drives.
For the CifsShare,
DataDomain or
HPStoreOnce types:
indicate a Windows
based server that to
which the storage
appliance is connected
and which will be used
as a gateway server.
Default: This server.
Used to enable the vPower NFS.
Specifies the host where the NFS
service must be installed.
Mount By default, the vPower NFS folder
False Named False False
Server is created on the mounted host. If
you want to locate the vPower
NFS folder elsewhere, use the
VPowerNFSFolder parameter to
set the path.
Specifies the full path to the
Folder folder where you want to store True Named False False
the backups.
If indicated, the guest OS file
Import
system index will be imported False Named False False
Index
automatically.
If indicated, the existing backups
located on the repository you are
Import adding will be imported
False Named False False
Backup automatically. Otherwise, you will
need to import the backups
manually.
Indicates if the repository you
Rotated
want to add is a rotated drive False Named False False
Drive
(removable media).
Specifies the path to the vPower
NFS root folder.
VPower
To enable the vPower NFS, the False Named False False
NFSFolder
MountServer parameter must be
set.
Specifies the Data Domain server
name according to the
connection mode:
DDServer
If EMC Data Domain works False Named False False
Name
over TCP, enter a full
DNS name or IP address
of the EMC Data
Domain server.
30 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
If EMC Data Domain works
over Fibre Channel,
enter a name of the
Data Domain server
starting with a 'DFC-'
prefix, for example,
"DFC-DataDomain690".
Indicates if the number of
concurrent jobs using this
Limit repository must be limited.
Concurrent False Named False False
Jobs Use the MaxConcurrentJobs
parameter to set the maximum
value.
Used for setting maximum value
for the LimitConcurrentJobs
parameter.
Max Specifies the maximum allowed
Concurrent number of concurrent tasks for False Named False False
Jobs the backup repository.
Accepts int type.
Permitted values: 1 to 99.
Indicates that the total speed of
writing data to the backup
Limit repository disk must be restricted. False Named False False
Datarate
Use the DataRateLimit parameter
to set the maximum value.
Used for setting combined data
ingestion rate for the
LimitDatarate parameter.
Data Specifies the combined data
Rate ingestion rate for the repository. False Named False False
Limit
Accepts int32 type.
Permitted value: 1 to 1024
(MByte/s).
If set, the backup blocks size will
be aligned by a 4Kb block
Align
boundary. Data alignment
Data False Named False False
provides better deduplication on
Blocks
storage systems with fixed block
size.
If set, backup data blocks will be
decompressed before storing the
Decompress
backup to the repository. False Named False False
DataBlocks
Decompression helps to achieve
a better deduplication ratio.
Specifies the user name you want
to use for authenticating with the
UserName False Named False False
backup repository host.
If you use the
31 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Username/Password scenario, the
-Credentials parameter must be
omitted.
Specifies the password you want
to use for authenticating with the
backup repository host.
Password If you use the False Named False False
Username/Password scenario, the
-Credentials parameter must be
omitted.
Specifies credentials you want to
use for authenticating with the
backup repository host.
Credentials False Named False False
If you use the Credentials
scenario, the -User and -Password
parameters must be omitted.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds a Windows server as a new backup repository named "Win2012Repo". No
authentication is used. All repository settings are used as set default.
• 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".
Add-VBRBackupRepository -Name "Win2012Repo" -Server $server -
Folder "c:\Backup Repository" -Type WinLocal
32 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 2
This command adds a Windows server as a new backup repository named "Backups Vol 01". The
authentication with the server is provided with the credentials record.
• 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 authenticate 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
Example 3
This command adds an EMC DataDomain storage appliance as a backup repository. The DataDomain
storage is connected over the TCP. The storage appliance is connected to an explicitly set gateway
server.
• The folder path is set to "DataDomain://10.0.0.80:storage/".
• The DataDomain appliance is set with the IP address. The "DFC-" prefix is not set to enable the
connection over TCP.
• The server type is set to "DataDomain".
• The host that will be used as the gateway server is obtained with Get-VBRServer and assigned
to the $server variable beforehand.
• The Username/Password is used to get access to the appliance.
Add-VBRBackupRepository -Folder DataDomain://10.0.0.80:storage/ -
Type DataDomain -DDServerName 10.0.0.80 -Server $server -UserName
sysadmin -Password Pa55word
Example 4
This command adds backup repository on a rotated drive connected to a Windows server.
• The server type is set to "WinLocal".
• The "Rotated Drive" switch parameter is used to enable the rotated drive repository
technology.
• The host to which the rotated drive is connected is obtained with Get-VBRServer and
assigned to the $server variable beforehand.
• The folder path is "F:\Repo".
Add-VBRBackupRepository -Name RDX -Type WinLocal -RotatedDrive -
Description "Rotated drive" -Server $server -Folder F:\Repo
33 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRESX
Short Description
Adds an ESX host to Veeam Backup & Replication.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRESX [-Name] <String> [-User] <String> [-Password] <String>
[-Port <Int32>] [-SSHUser <String>] [-SSHPassword <String>] [-
SSHPort <Int32>] [-SSHEnable] [-Description <String>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Add-VBRESX [-Name] <String> [-Port <Int32>] [-SSHUser <String>]
[-SSHPassword <String>] [-SSHPort <Int32>] [-SSHEnable] [-
Description <String>] -Credentials <CCredentials> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRCredentials
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 credentials.
This cmdlet provides syntax for both scenarios accordingly.
34 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the string with a full
Name DNS name or IP address of the True 1 False False
ESX host.
Specifies the user name you
want to use for authenticating
with the ESX host.
User If you use the True 2 False False
Username/Password scenario,
the -Credentials parameter must
be omitted.
Specifies the password you
want to use for authenticating
with the ESX host.
Password If you use the True 3 False False
Username/Password scenario,
the -Credentials parameter must
be omitted.
Sets the integer specifying the
number of the Web service port
Port False Named False False
used to connect to the ESX host.
By default, port 443 is used.
Specifies the string with the user
name of the account used for
SSHUser False Named False False
service console connection to
the host (recommended).
Specifies the string with the
password of the account used
SSHPassword False Named False False
for service console connection
to the host (recommended).
Sets the integer specifying the
SSHPort number of the service console False Named False False
port (recommended).
Set this parameter to TRUE if
you want to use service console
SSHEnable False Named False False
connection for the added ESX
host (recommended).
Specifies the description of the
ESX server.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Specifies the credentials you
want to use for authenticating
with the ESX server.
Credentials True Named False False
If you use the Credentials
scenario, the -User and -
Password parameters must be
35 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
omitted.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds the 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
beforehand.
Add-VBRESX –Name 172.16.11.188 -Credentials $Administrator
36 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRESXi
Short Description
Adds an ESXi host to Veeam Backup & Replication.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRESXi [-Name] <String> [-User] <String> [-Password]
<String> [-Port <Int32>] [-Description <String>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Add-VBRESXi [-Name] <String> [-Port <Int32>] [-Description
<String>] -Credentials <CCredentials> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRCredentials
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
credentials. This cmdlet provides syntax for both scenarios accordingly.
37 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the string with a full DNS
Name name or IP address of the ESX True 1 False False
host.
Specifies the user name you want
to use for authenticating with the
ESX host.
User True 2 False False
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Specifies the password you want
to use for authenticating with the
ESX host.
Password True 3 False False
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Sets the integer specifying the
number of the Web service port
Port False Named False False
used to connect to the ESX host.
By default, port 443 is used.
Specifies the description of the
ESX server.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Specifies the credentials you want
to use for authenticating with the
ESX server.
Credentials True Named False False
If you use the Credentials scenario,
the -User and -Password
parameters must be omitted.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
38 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
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
beforehand.
Add-VBRESXi –Name 172.16.11.188 -Credentials $Administrator
39 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRHvCluster
Short Description
Adds a Hyper-V cluster to Veeam Backup & Replication.
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRHvCluster -Name <String> -User <String> -Password <String>
[-Description <String>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Add-VBRHvCluster -Name <String> [-Description <String>] -
Credentials <CCredentials> [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRCredentials
Detailed Description
This cmdlet adds Hyper-V clusters to the Veeam Backup & Replication managing console.
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 you add a cluster, you start managing the VMs that are part of the cluster automatically.
When you remove a Hyper-V cluster from Veeam Backup & Replication managing console, the VMs
that are part of the cluster are removed too. If you want to manage individual VMs with Veeam Backup
& Replication, you need to add them as standalone Hyper-V hosts.
Run Add-VBRHvHost to add a standalone Hyper-V host to Veeam Backup & Replication.
When adding a new Hyper-V cluster, you will need to provide either username and password or
credentials. This cmdlet provides parameter sets for both scenarios accordingly. When you provide
authentication with the Hyper-V cluster, you get equal rights for all clustered VMs.
40 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the string with the DNS
Name name of the added Hyper-V True Named False False
cluster.
Specifies the user name you want
to use for authenticating with the
Hyper-V cluster.
User True Named False False
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.
Password True Named False False
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Specifies the description of the
Hyper-V cluster.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Specifies the credentials you want
to use for authenticating with the
Hyper-V cluster.
Credentials True Named False False
If you use the Credentials scenario,
the -User and -Password
parameters must be omitted.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
41 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command adds a new Hyper-V cluster named "HYPCLUSTER01" using username and password.
The user name is "Administrator", and the password is "Password". The description is "Hyper-V Cluster
01".
Add-VBRHvCluster -Name "HYPCLUSTER01" -User Administrator -
Password Password -Description "Hyper-V Cluster 01"
Example 2
This command adds a new Hyper-V cluster named "HYPCLUSTER01" using credentials. The credentials
object is obtained with Get-VBRCredentials and assigned to the $Administrator variable beforehand.
The description is "Hyper-V Cluster 01".
Add-VBRHvCluster -Name "HYPCLUSTER01" -Description "Hyper-V
Cluster 01" -Credentials $Administrator
42 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRHvHost
Short Description
Adds a Hyper-V host to Veeam Backup & Replication.
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRHvHost -Name <String> -User <String> -Password <String> [-
Description <String>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Add-VBRHvHost -Name <String> [-Description <String>] -Credentials
<CCredentials> [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRCredentials
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.
Run Add-VBRHvCluster to add a Hyper-V cluster.
When adding a new Hyper-V host, you will need to provide either username and password or
credentials. This cmdlet provides parameter sets for both scenarios accordingly.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the string with the DNS
Name name of the added Hyper-V True Named False False
cluster.
Specifies the user name you want
to use for authenticating with the
Hyper-V cluster.
User True Named False False
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Specifies the password you want
Password to use for authenticating with the True Named False False
Hyper-V cluster.
43 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Specifies the description of the
Hyper-V cluster.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Specifies the credentials you want
to use for authenticating with the
Hyper-V cluster.
Credentials True Named False False
If you use the Credentials scenario,
the -User and -Password
parameters must be omitted.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds a new Hyper-V server named "HyperVExchange" using username and password.
The user name is "Administrator", and the password is "Password". The description is "Hyper-V
Exchange host".
Add-VBRHvHost -Name "HyperVExchange" -User Administrator -
Password Password -Description "Hyper-V Exchange host"
Example 2
This command adds a new Hyper-V host named "HyperVExchange" using credentials. The credentials
object is obtained with Get-VBRCredentials and assigned to the $Administrator variable beforehand.
The description is "Hyper-V Exchange host".
Add-VBRHvHost -Name "HyperVExchange" -Credentials $Administrator
-Description "Hyper-V Exchange host"
44 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRHvProxy
Short Description
Adds a Hyper-V backup proxy to Veeam Backup & Replication.
Applies to
Platform: Hyper-V
For VMware, run Add-VBRViProxy.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRHvProxy -Server <CHost> [-Description <String>] [-MaxTasks
<Int32>] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
Get-VBRServer
Detailed Description
This cmdlet adds a Hyper-V backup proxy server to the 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.
When you add a proxy, you set a role to a server. To add a new proxy, you need to have the server
added to your Veeam Backup & Replication managing console.
Run Add-VBRHvHost to add a Hyper-V server.
45 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the server which will (ByValue,
Server True Named False
act as a Hyper-V backup proxy. ByProperty
Name)
Specifies the description of the
Hyper-V proxy.
Description If not set, Veeam Backup & False Named False False
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
MaxTasks simultaneously. False Named False False
If not set, the number of tasks
will be set to 2 by default.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds a new proxy. The server that will act as the proxy is obtained with Get-VBRServer
and piped down. The description is "Local Backup Proxy". The max concurrent tasks number is set to 6.
Get-VBRServer -Name "HyperV Local Server" | Add-VBRHvProxy -
Description "Local Backup Proxy" -MaxTasks 6
Example 2
This command adds a new proxy. The server that will act as the proxy is obtained with Get-VBRServer
and assigned to the $server variable. The description is "Local Backup Proxy". The max concurrent
tasks number is not set to enable the default value.
Add-VBRHvProxy -Server $server -Description "Local Backup Proxy"
46 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRHvScvmm
Short Description
Adds a SCVMM server to Veeam Backup & Replication.
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRHvScvmm -Name <String> -User <String> -Password <String>
[-Description <String>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Add-VBRHvScvmm -Name <String> [-Description <String>] -
Credentials <CCredentials> [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRCredentials
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
credentials. This cmdlet provides syntax for both scenarios accordingly.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the string with the DNS
Name True Named False False
name of the added SCVMM server.
Specifies the user name you want
to use for authenticating with the
SCVMM server.
User True Named False False
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.
Password True Named False False
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Credentials Specifies the credentials you want True Named False False
to use for authenticating with the
47 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
SCVMM server.
If you use the Credentials scenario,
the -User and -Password
parameters must be omitted.
Specifies the description of the
SCVMM server.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds the SCVMM server using a username and a password.
Add-VBRHvScvmm -Name "SCVMM1" -User "Administrator" -Password
"Password" -Description "SCVMM Server"
Example 2
This command adds the SCVMM server using credentials. The credentials record is obtained with Get-
VBRCredentials and assigned to the $SCVMMAdministrator variable beforehand.
Add-VBRHvScvmm -Name "SCVMM1" -Description "SCVMM Server" -
Credentials $SCVMMAdministrator
48 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRLinux
Short Description
Adds a Linux server to Veeam Backup & Replication.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
This cmdlet provides two parameter sets.
For authenticating with the Linux host with Username/Password:
Add-VBRLinux [-Name] <string> [-SSHUser] <string> [-SSHPassword]
<string> [-SSHPort <int>] [-Description <string>] [-WhatIf] [-
Confirm] [<CommonParameters>]
For authenticating with the Linux host with credentials:
Add-VBRLinux [-Name] <string> -Credentials <CCredentials> [-
SSHPort <int>] [-Description <string>] [-WhatIf] [-Confirm]
[<CommonParameters>]
Related Commands
Get-VBRCredentials
Detailed Description
This cmdlet adds a Linux server to Veeam Backup & Replication.
The Linux server must have SSH and Perl.
When adding a new Linux server, you will need to provide either username and password or
credentials.
To add a Linux host using an SSH key fingerprint, run this cmdlet with the Confirm parameter.
49 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the string with a DNS
Name name or IP address of the Linux True 1 False False
server you want to add.
Specifies the user name you
want to use for authenticating
with the Linux server.
SSHUser If you use the True 2 False False
Username/Password scenario,
the -Credentials parameter must
be omitted.
Specifies the password you
want to use for authenticating
with the Linux server.
SSHPassword If you use the True 3 False False
Username/Password scenario,
the -Credentials parameter must
be omitted.
Specifies the credentials you
want to use for authenticating
with the Linux server.
Credentials If you use the Credentials True Named False False
scenario, the -User and -
Password parameters must be
omitted.
Provide an integer specifying
the Web service port number
SSHPort used to connect to the Linux False Named False False
server console.
Default: 443
Specifies the description of the
Linux server.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the False Named False False
cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if
Confirm False Named False False
the user is sure that they want
to continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
50 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command adds the Linux server with the 172.11.16.13 IP address using a username and a
password. The user name is "Administrator" and the password is "Password".
Add-VBRLinux -Name "172.11.16.13" -SSHUser "Administrator" -
SSHPassword "Password" -Description "Linux host 01"
Example 2
This command adds the Linux server with the 172.11.16.13 IP address using credentials. The
credentials record is obtained with Get-VBRCredentials and assigned to the $"Linux Administrator"
variable beforehand.
Add-VBRLinux -Name '172.11.16.13" -Description "Linux host 01" -
Credentials $"Linux Administrator"
Example 3
This command adds the Linux server with the 172.11.16.13 IP address using an SSH key fingerprint.
• The user name is "Administrator" and the password is "Password".
• The Web service port is set to "22".
• The Confirm parameter is used to verify the connection with SSH key fingerprint.
PS C:\PS> Add-VBRLinux -Name "172.11.16.13" -SSHUser
"Administrator" -SSHPassword "Password" -SSHPort 22 -Confirm
Confirm
Are you sure you want to perform this action?
Performing operation "Add-VBRLinux" on Target "172.11.16.13"
"SSH key fingerprint:
ssh-dss 1024 7a:64:8d:7d:12:72:e9:e1:28:42:94:51:55:65:13:7a
Do you trust this server?".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "Y"): Y
51 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRSmbV3Cluster
Short Description
Adds an SMB3 cluster to Veeam Backup & Replication.
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRSmbV3Cluster -Name <String> -User <String> -Password
<String> [-Description <String>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Add-VBRSmbV3Cluster -Name <String> [-Description <String>] -
Credentials <CCredentials> [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRCredentials
Detailed Description
This cmdlet adds an SMB3 cluster to the Veeam Backup & Replication managing console.
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 you add a cluster, you start managing the VMs that are part of the cluster automatically.
When you remove a Hyper-V cluster from Veeam Backup & Replication managing console, the VMs
that are part of the cluster are removed too. If you want to manage individual VMs with Veeam Backup
& Replication, you need to add them as standalone SMB3 servers.
Run Add-VBRSmbV3Host to add a standalone SMB3 server to Veeam Backup & Replication.
When adding a new SMB3 cluster, you will need to provide either username and password or
credentials. This cmdlet provides syntax for both scenarios accordingly. When you provide
authentication with the Hyper-V cluster, you get equal rights for all clustered VMs.
52 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the full DNS name or IP
Name True Named False False
address of the SMB3 cluster.
Specifies the user name you want
to use for authenticating with the
SMB3 cluster.
User True Named False False
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Specifies the password you want
to use for authenticating with the
SMB3 cluster.
Password True Named False False
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Specifies the description of the
SMB3 cluster.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Specifies the credentials you want
to use for authenticating with the
SMB3 cluster.
Credentials True Named False False
If you use the Credentials scenario,
the -User and -Password
parameters must be omitted.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds a new SMB3 cluster named "SMBCLUSTER01" using username and password. The
user name is "Administrator", and the password is "Password". The description is "Hyper-V SMB Share
Cluster 01".
Add-VBRSmbV3Cluster -Name "SMBCLUSTER01" -User "Administrator" -
Password "Password" -Description "Hyper-V SMB Share Cluster 01"
Example 2
This command adds a new SMB3 cluster named "SMBCLUSTER01" using credentials. The credentials
object is obtained with Get-VBRCredentials and assigned to the $Administrator variable beforehand.
The description is "Hyper-V SMB Share Cluster 01".
Add-VBRHvCluster -Name "SMBCLUSTER01" -Description "Hyper-V SMB
Share Cluster 01" -Credentials $Administrator
53 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRSmbV3Host
Short Description
Adds an SMB3 host to Veeam Backup & Replication.
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRSmbV3Host -Name <String> -User <String> -Password <String>
[-Description <String>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Add-VBRSmbV3Host -Name <String> [-Description <String>] -
Credentials <CCredentials> [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRCredentials
Detailed Description
This cmdlet adds an SMB3 server 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 SMB3 host is part of a cluster, add the
SMB3 cluster instead of standalone SMB3 host.
Run Add-VBRSmbV3Cluster to add a Hyper-V cluster.
When adding a new SMB3 host, you will need to provide either username and password or
credentials. This cmdlet provides syntax for both scenarios accordingly.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the string with the DNS
Name True Named False False
name of the added SMB3 host.
Specifies the user name you want
to use for authenticating with the
SMB3 host.
User True Named False False
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Specifies the password you want
to use for authenticating with the
Password True Named False False
SMB3 host.
If you use the Username/Password
54 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
scenario, the -Credentials
parameter must be omitted.
Specifies the description of the
SMB3 host.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Specifies the credentials you want
to use for authenticating with the
SMB3 host.
Credentials True Named False False
If you use the Credentials scenario,
the -User and -Password
parameters must be omitted.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds a new SMB3 host named "SMBShare010" using username and password. The user
name is "Administrator", and the password is "Password". The description is "Hyper-V SMB Share
Cluster 01".
Add-VBRSmbV3Cluster -Name "SMBShare010" -User "Administrator" -
Password "Password" -Description "Hyper-V SMB Share Host 010"
Example 2
This command adds a new SMB3 host named "SMBShare010" using credentials. The credentials object
is obtained with Get-VBRCredentials and assigned to the $Administrator variable beforehand. The
description is "Hyper-V SMB Share Cluster 01".
Add-VBRHvCluster -Name "SMBShare010" -Description "Hyper-V SMB
Share Host 010" -Credentials $Administrator
55 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRvCenter
Short Description
Adds a vCenter Server to Veeam Backup & Replication.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRvCenter [-Name] <String> [-User] <String> [-Password]
<String> [-Port <Int32>] [-Description <String>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Add-VBRvCenter [-Name] <String> [-Port <Int32>] [-Description
<String>] -Credentials <CCredentials> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRCredentials
Detailed Description
This cmdlet allows you to add a vCenter Server to Veeam Backup & Replication.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the string with a full DNS
Name name or IP address of the vCenter True 1 False False
Server.
Specifies the user name you want
to use for authenticating with the
vCenter server.
Note that the user name should
User be in "DOMAIN\USERNAME" True 2 False False
format.
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Specifies the password you want
to use for authenticating with the
Password vCenter server. True 3 False False
If you use the Username/Password
scenario, the -Credentials
56 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
parameter must be omitted.
Specifies the credentials you want
to use for authenticating with the
vCenter server.
Credentials True Named False False
If you use the Credentials scenario,
the -User and -Password
parameters must be omitted.
Sets the integer specifying the
number of Web service port used
Port to connect to the vCenter Server. False Named False False
Default: 443
Specifies the description of the
vCenter server.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds the vCenter server named "vcdev25.domain.local" using a username and a
password. The user name is "Administrator" and the password is "Password".
Add-VBRvCenter -Name "vcdev25.domain.local" -User
"Domain\Administrator" -Password "Password" -Description "vcdev25
vCenter Server"
Example 2
This command adds the vCenter server named "vcdev25.domain.local" using credentials. The
credentials record is obtained with Get-VBRCredentials and assigned to the $"Linux Administrator"
variable beforehand.
Add-VBRvCenter -Name "vcdev25.domain.local" -Description "vcdev25
vCenter Server" -Credentials $"vcdev Administrator"
57 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRViProxy
Short Description
Adds a VMware backup proxy to Veeam Backup & Replication.
Applies to
Platform: VMware
For Hyper-V, run Add-VBRHvProxy.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRViProxy -Server <CHost> [-Description <String>] [-MaxTasks
<Int32>] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
Get-VBRServer
Detailed Description
This cmdlet adds a VMware backup proxy server to the 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.
When you add a proxy, you set a role to a server. To add a new proxy, you need to have the server
added to your Veeam Backup & Replication managing console.
Run Add-VBRESX or Add-VBRESXi to add a VMware server.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the server which will (ByValue,
Server True Named False
act as a VMware backup proxy. ByProperty
Name)
Specifies the description of the
VMware proxy.
Description If not set, Veeam Backup & False Named False False
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
MaxTasks simultaneously. False Named False False
If not set, the number of tasks
will be set to 2 by default.
58 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds a new proxy. The server that will act as the proxy is obtained with Get-VBRServer
and piped down. The description is "Local Backup Proxy". The max concurrent tasks number is set to 6.
Get-VBRServer -Name "VMware Local Server" | Add-VBRViProxy -
Description "Local Backup Proxy" -MaxTasks 6
Example 2
This command adds a new proxy. The server that will act as the proxy is obtained with Get-VBRServer
and assigned to the $server variable. The description is "Local Backup Proxy". The max concurrent
tasks number is not set to enable the default value.
Add-VBRViProxy -Server $server -Description "Local Backup Proxy"
59 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRWinServer
Short Description
Adds Windows server to Veeam Backup & Replication.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRWinServer -Name <String> -User <String> -Password <String>
[-Description <String>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Add-VBRWinServer -Name <String> [-Description <String>] -
Credentials <CCredentials> [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRCredentials
Detailed Description
This cmdlet adds a Windows server to the Veeam Backup & Replication managing console.
When adding a new Windows server, you will need to provide either username and password or
credentials. This cmdlet provides syntax for both scenarios accordingly.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the string with the DNS
Name name of the Windows server you True Named False False
want to add.
Specifies the user name you want
to use for authenticating with the
Windows server.
User True Named False False
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Specifies the password you want
to use for authenticating with the
Windows server.
Password True Named False False
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Description Specifies the description of the False Named False False
60 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Windows server.
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
Windows server.
Credentials True Named False False
If you use the Credentials scenario,
the -User and -Password
parameters must be omitted.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds a new Windows server named "WinServer" using username and password. The
user name is "Administrator", and the password is "Password". The description is "Windows File
Server".
Add-VBRWinServer -Name "WinServer" -User Administrator -Password
Password -Description "Windows File Server"
Example 2
This command adds a new Windows server named "WinServer" using credentials. The credentials
object is obtained with Get-VBRCredentials and assigned to the $Administrator variable beforehand.
The description is "Windows File Server".
Add-VBRWinServer -Name "WinServer" -Credentials $Administrator -
Description "Windows File Server"
61 | Veeam Backup PowerShell |REFERENCE| REV 2
Disable-VBRHvProxy
Short Description
Disables a Hyper-V backup proxy.
Applies to
Platform: Hyper-V
For VMware, run Disable-VBRViProxy.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Disable-VBRHvProxy -Proxy <CHvProxy[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRHvProxy
Detailed Description
This cmdlet allows you to disable a Hyper-V backup proxy. The disabled proxy is not used by any job.
You can enable the poxy at any time by running Enable-VBRHvProxy.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the Hyper-V backup True
proxy you want to disable. (ByValue,
Proxy True Named False
You can assign multiple proxies ByProperty
to this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
62 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command disables the selected Hyper-V proxy. The needed proxy object is obtained with Get-
VBRHvProxy by selecting the proxy with name containing "Hyper-V" and piped down.
Get-VBRHvProxy -Name *Hyper-V* | Disable-VBRHvProxy
Example 2
This command disables the selected Hyper-V proxy represented by the $proxy variable. The proxy is
obtained with Get-VBRHvProxy and assigned to the variable beforehand.
Disable-VBRHvProxy -Proxy $proxy
63 | Veeam Backup PowerShell |REFERENCE| REV 2
Disable-VBRViProxy
Short Description
Disables a VMware backup proxy.
Applies to
Platform: VMware
For Hyper-V, run Disable-VBRHvProxy.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Disable-VBRViProxy -Proxy <CViProxy[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRViProxy
Detailed Description
This cmdlet allows you to temporarily disable a VMware backup proxy. The disabled proxy is not used
by any job.
You can enable the poxy at any time by running Enable-VBRViProxy.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the VMware backup True
proxy you want to disable. (ByValue,
Proxy True Named False
You can assign multiple proxies ByProperty
to this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
64 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command disables the selected VMware proxies named "VMware Backup Proxy 01", "VMware
Backup Proxy 05". The proxies are obtained with Get-VBRViProxy by selecting by names and piped
down.
Get-VBRHvProxy -Name "VMware Backup Proxy 01", "VMware Backup
Proxy 05" | Disable-VBRViProxy
Example 2
This command disables the selected VMware proxy represented by the $proxy variable. The proxy is
obtained with Get-VBRViProxy and assigned to the variable beforehand.
Disable-VBRViProxy -Proxy $proxy
65 | Veeam Backup PowerShell |REFERENCE| REV 2
Enable-VBRHvProxy
Short Description
Enables a Hyper-V backup proxy that was previously disabled.
Applies to
Platform: Hyper-V
For VMware, run Enable-VBRViProxy.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Enable-VBRHvProxy -Proxy <CHvProxy[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRHvProxy
Detailed Description
This cmdlet enables a Hyper-V backup proxy that was previously disabled.
You can disable a proxy by running Disable-VBRHvProxy.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies then object of the
Hyper-V backup proxy you want True
to enable. (ByValue,
Proxy True Named False
ByProperty
You can assign multiple proxies Name)
to this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
66 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command enables all proxies with names starting with "Hyper-V Proxy 1...". The proxies are
obtained with Get-VBRHvProxy by filtering with "*" search condition and piped down.
Get-VBRHvProxy -Name "Hyper-V Proxy 1*" | Enable-VBRHvProxy
Example 2
This command enables the Hyper-V proxy represented by the $proxy variable. The needed proxy is
obtained with Get-VBRHvProxy and assigned to the variable beforehand.
Enable-VBRHvProxy -Proxy $proxy
67 | Veeam Backup PowerShell |REFERENCE| REV 2
Enable-VBRViProxy
Short Description
Enables a VMware backup proxy that was previously disabled.
Applies to
Platform: VMware
For Hyper-V, run Enable-VBRHvProxy.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Enable-VBRViProxy -Proxy <CViProxy[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRViProxy
Detailed Description
This cmdlet allows you to enable a VMware backup proxy.
You can disable a proxy by running Disable-VBRViProxy.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the VMware backup True
proxy you want to enable. (ByValue,
Proxy True 0 False
You can assign multiple proxies ByProperty
to this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
68 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command enables the selected VMware proxy named "VMwareProxy". The needed proxy is
obtained with Get-VBRViProxy and piped down.
Get-VBRViProxy -Name "VMwareProxy" | Enable-VBRViProxy
Example 2
This command enables the selected VMware proxy represented by the $proxy variable. The needed
proxy is obtained with Get-VBRViProxy and assigned to the variable beforehand.
Enable-VBRViProxy -Proxy $proxy
69 | Veeam Backup PowerShell |REFERENCE| REV 2
Find-VBRHvEntity
Short Description
Looks for Hyper-V objects.
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Find-VBRHvEntity [-Server <CHost[]>] [-HostsAndVMs] [-Name
<String[]>] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
-OR-
Find-VBRHvEntity [-Server <CHost[]>] [-Hosts] [-Name <String[]>]
[-WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Find-VBRHvEntity [-Server <CHost[]>] [-HostsAndVolumes] [-Name
<String[]>] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
Get-VBRServer
Detailed Description
This cmdlet returns a list of Hyper-V objects managed by Veeam Backup & Replication.
You can get the list of all Hyper-V objects in your virtual environment or narrow down your search to
hosts, VMs or volumes, or look for instances directly by name.
Run Get-VBRServer to get the list of the Hyper-V hosts.
Return Type
CHvHostItem
CHvVmItem
70 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the host you want to True
look for entities on. (ByValue,
Server False Named False
You can assign multiple servers ByProperty
to this object. Name)
HostsAnd
Views results as hosts and VMs. False Named False False
VMs
Hosts Views results as hosts. False Named False False
HostsAnd Views results as hosts and
False Named False False
Volumes volumes.
Specifies the name of the entity
you want to get, or search
Name conditions. False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for all Hyper-V objects registered on server named "Hyper-V Host". The server is
obtained with Get-VBRServer and piped down.
Get-VBRServer -Name "HvHost" | Find-VBRHvEntity
Example 2
This command looks for Hyper-V hosts and VMs registered on Hyper-V servers named "HvHost 01" and
"HvHost 02". The servers are obtained with Get-VBRServer and piped down.
Get-VBRServer -Name "HvHost 01", "HvHost 02" | Find-VBRHvEntity -
HostsAndVMs
Example 3
This command directly looks for the Hyper-V server named "HvExchange".
Find-VBRHvEntity -Name "HvExchange"
71 | Veeam Backup PowerShell |REFERENCE| REV 2
Find-VBRViDatastore
Short Description
Looks for VMware datastores.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
This cmdlet provides two parameter sets.
For looking for datastores connected to a specific host:
Find-VBRViDatastore -Server <CHost> [-Name <string[]>]
[<CommonParameters>]
For looking for datastores compatible with a specific storage policy:
Find-VBRViDatastore -StoragePolicy <VBRViStoragePolicy> [-Name
<string[]>] [<CommonParameters>]
Related Commands
Get-VBRServer
Find-VBRViStoragePolicy
Detailed Description
This cmdlet returns a list of datastores connected to the specified ESX(i) host or that are compatible
with a particular VMware storage policy profile.
With both parameter sets, you can narrow down your search by indicating a datastore name.
Return Type
CViDatastoreItem
72 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the ESX(i) host. The
(ByValue,
Server cmdlet will return the True Named False
ByProperty
datastores connected to it.
Name)
Specifies the VMware storage True
policy profile. The cmdlet will (ByValue,
StoragePolicy True Named False
return datastores compatible ByProperty
with it. Name)
Specifies the name of the
datastore you want to get, or
Name search conditions. False Named False True
You can specify multiple
names separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of datastores connected to the ESXi hosts. The servers are obtained
with Get-VBRServer, sorted by "Type" and piped down.
Get-VBRServer -Type ESXi | Find-VBRViDatastore
Example 2
This command looks for the datastores connected to the ESXi host named "ESXiHost". The server is
obtained with Get-VBRServer and piped down. The list of datastores is narrowed down to the
datastore named "MSExchange" and datastores with names starting with "LocalStore_0".
Get-VBRServer -Name "ESXiHost" | Find-VBRViDatastore -Name
"MSExchange", "LocalStore_0*"
Example 3
This command looks for the datastore named "MSExchange" connected to the server represented by
the $server variable. The server object is obtained with Get-VBRServer and assigned to the variable
beforehand.
Find-VBRViDatastore -Server $server -Name "MSExchange"
73 | Veeam Backup PowerShell |REFERENCE| REV 2
Find-VBRViEntity
Short Description
Looks for VMware entities.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Find-VBRViEntity [-Server <CHost[]>] [-HostsAndClusters] [-Name
<String[]>] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
-OR-
Find-VBRViEntity [-Server <CHost[]>] [-VMsAndTemplates] [-Name
<String[]>] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
-OR-
Find-VBRViEntity [-Server <CHost[]>] [-DatastoresAndVMs] [-Name
<String[]>] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
-OR-
Find-VBRViEntity [-Server <CHost[]>] [-HostsAndDatastores] [-Name
<String[]>] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
-OR-
Find-VBRViEntity [-Server <CHost[]>] [-ResourcePools] [-Name
<String[]>] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
-OR-
Find-VBRViEntity [-Server <CHost[]>] [-Servers] [-Name
<String[]>] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
-OR-
Find-VBRViEntity [-Name <String[]>] [-Server <CHost[]>] [-Tags]
[-WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRServer
74 | Veeam Backup PowerShell |REFERENCE| REV 2
Detailed Description
This cmdlet returns a list of all VMware objects connected to the specified ESX(i) host.
You can get the list of all VMware entities registered in your virtual VMware environment or narrow
down the search results to specific objects, or look for instances directly by name.
Run Get-VBRServer to get the list of the VMware hosts.
Return Type
CVcItem
CViFolderItem
CViDatacenterItem
CEsxItem
CViClusterItem
CViResourcePoolItem
CViVmItem
CViVirtualAppItem
CViFolderItem
CViDatacenterItem
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the
entity you want to get, or
search conditions.
Name False Named True True
You can specify multiple
names separated by
commas.
True
Specifies the ESX(i) host you (ByValue,
Server False Named False
want to look for entities on. ByProperty
Name)
HostsAnd Views results as hosts and
False Named False False
Clusters clusters.
VMsAnd Views results as VMs and
False Named False False
Templates templates.
Datastores Views results as datastores
False Named False False
AndVMs and VMs.
HostsAnd Views results as hosts and
False Named False False
Datastores datastores.
Views results as resource
ResourcePools False Named False False
pools.
Views results as VMware
Servers False Named False False
hosts.
75 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Views results as tags.
Tags Use the Name parameter to False Named False False
specify the tag name.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of hosts and clusters connected to the ESXi hosts named "ESXiHost 01"
and "ESXiHost 02". The servers are obtained with Get-VBRServer and piped down.
Get-VBRServer -Name "ESXiHost 01", "ESXiHost 02" | Find-
VBRViEntity -HostsAndClusters
Example 2
This command looks for the list of resource pools connected to the ESXi host named "ESXiHost". The
server is obtained with Get-VBRServer and piped down. The list of resource pools is narrowed down to
the resource pools with names starting with "Veeam".
Get-VBRServer -Name "ESXiHost" | Find-VBRViEntity -ResourcePools
-Name Veeam*
Example 3
This command looks for the list of VMs having a VMware tag named "Mac OS" within a particular host.
The host is obtained with Get-VBRServer and assigned to the '$server' variable beforehand.
Find-VBRViEntity -Server $server -Tags -Name "Mac OS"
76 | Veeam Backup PowerShell |REFERENCE| REV 2
Find-VBRViFolder
Short Description
Looks for list of folders on the specified ESX(i) host.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Find-VBRViFolder -Server <CHost> [-Name <String[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRServer
Detailed Description
This cmdlet returns a list of folders on the specified ESX(i) host.
You can get the list of all folders on the specified ESX(i) host or look for instances directly by name.
Return Type
CViFolderItem
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the ESX(i) host you (ByValue,
Server True Named False
want to look for folders on. ByProperty
Name)
Specifies the name of the folder
you want to get, or search
Name conditions. False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
77 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the list of folders located on the ESXi hosts. The servers are obtained with Get-
VBRServer, sorted by "Type" and piped down.
Get-VBRServer -Type ESXi | Find-VBRViFolder
Example 2
This command looks for the datastores connected to the ESXi host named "ESXiHost". The server is
obtained with Get-VBRServer and piped down. The list of datastores is narrowed down to the
datastore named "MSExchange" and datastores with names starting with "LocalStore_0".
Get-VBRServer -Name "ESXiHost" | Find-VBRViFolder -Name
"MSExchange", LocalStore_0*
78 | Veeam Backup PowerShell |REFERENCE| REV 2
Find-VBRViResourcePool
Short Description
Looks for resource pools on the specified ESX(i) host.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Find-VBRViResourcePool -Server <CHost> [-Name <String[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRServer
Detailed Description
This cmdlet returns a list of resource pools on the specified ESX(i) host.
You can get the list of all resource pools on the specified ESX(i) host or look for instances directly by
name.
Return Type
CViResourcePoolItem
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the ESX(i) host you
(ByValue,
Server want to look for resource pools True Named False
ByProperty
on.
Name)
Specifies the name of the
resource pool you want to get,
Name or search conditions. False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
79 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the list of resource pools located on the ESXi hosts. The servers objects are
obtained with Get-VBRServer, sorted by "Type" and piped down.
Get-VBRServer -Type ESXi | Find-VBRViResourcePool
Example 2
This command looks for the resource pool named "ResourcePool_05" connected to the ESXi host
named "ESXiHost". The server object is obtained with Get-VBRServer and piped down.
Get-VBRServer -Name "ESXiHost" | Find-VBRViResourcePool -Name
"ResourcePool_05"
80 | Veeam Backup PowerShell |REFERENCE| REV 2
Find-VBRViStoragePolicy
Short Description
Looks for storage policy profiles.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Find-VBRViStoragePolicy -Server <CHost> [-Datastore
<CViDatastoreItem>] [<CommonParameters>]
-OR-
Find-VBRViStoragePolicy -Server <CHost> [-Datastore
<CViDatastoreItem>] [-Name <string[]>] [<CommonParameters>]
-OR-
Find-VBRViStoragePolicy -Server <CHost> [-Datastore
<CViDatastoreItem>] [-Id <string[]>] [<CommonParameters>]
Related Commands
Get-VBRServer
Find-VBRViDatastore
Return Type
VBRViStoragePolicy[]
Detailed Description
This cmdlet returns a list of VMware storage policy profiles created on a vCenter server.
You can get the list of all storage policy profiles on the specified server or look for profiles directly by
name or ID.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the vCenter True (by Value
server where the FromPipeline,
Server True Named False
storage policy profiles ValueFromPipeline
are created. ByPropertyName)
Specifies the datastore.
The cmdlet will return
Datastore storage policy profiles False Named False False
compatible with this
datastore.
Name Specifies the name of False Named False True
the storage profile you
81 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
want to get.
Specifies the ID of the
Id storage profile you False Named False False
want to get.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command returns all storage policy profiles registered for the Veeam.Local host.
The host is obtained with Get-VBRServer and assigned to the '$server' variable.
PS C:\PS> $server = Get-VBRServer -Name "Veeam.Local"
PS C:\PS> Find-VBRViStoragePolicy -Server $server
Example 2
This command returns storage policy profile named "Virtual SAN Default Storage Policy" registered on
the Veeam.Local host.
The host is obtained with Get-VBRServer and piped down.
Get-VBRServer -Name "Veeam.Local" | Find-VBRViStoragePolicy -Name
"Virtual SAN Default Storage Policy"
Example 3
This command returns all storage policy profiles registered for the Veeam.Local host.
The host is obtained with Get-VBRServer and assigned to the '$server' variable.
PS C:\PS> $server = Get-VBRServer -Name "Veeam.Local"
PS C:\PS> $datastore = Find-VBRViDatastore -Name "VeeamDatastore"
PS C:\PS> Find-VBRViStoragePolicy -Server $server -Datastore
$datastore -Name "Virtual SAN Default Storage Policy"
82 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRBackupRepository
Short Description
Returns backup repositories.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRBackupRepository [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet returns the list of backup repositories managed by Veeam Backup & Replication.
You can get the list of all backup repositories or look for instances directly by name.
Return Type
CBackupRepository
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the backup
repository you want to get, or
Name search conditions. False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of all backup repositories managed by Veeam Backup & Replication.
Get-VBRBackupRepository
Example 2
This command looks for the backup repositories named "Backups Vol2" and for backup repositories
with names starting with "Local".
Get-VBRBackupRepository -Name "Backups Vol2", "*Local"
83 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRHvProxy
Short Description
Returns Hyper-V backup proxies.
Applies to
Platform: Hyper-V
For VMware, run Get-VBRViProxy.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRHvProxy [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet returns the list of Hyper-V backup proxies managed by Veeam Backup & Replication.
You can get the list of all Hyper-V backup proxies or look for instances directly by name.
Run Get-VBRJobProxy to get the list of proxies assigned to a specific job.
Return Type
CHvProxy
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the Hyper-V
proxy server you want to get, or
Name search conditions. False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
84 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the list of all Hyper-V proxies.
Get-VBRHvProxy
Example 2
This command gets the Hyper-V proxies with names containing "Local".
Get-VBRHvProxy -Name *Local*
85 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRJobProxy
Short Description
Returns proxy servers assigned to a selected job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRJobProxy -Job <CBackupJob[]> [-Target] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet returns the list of source or target proxy servers assigned to a selected job. You will see the
notification if the automatic proxy selection is enabled.
Run Get-VBRViProxy or Get-VBRHvProxy to get a list of all VMware or Hyper-V proxies managed by
Veeam Backup & Replication.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job for which you True
want to get the list proxies. (ByValue,
Job True Named False
You can assign multiple backup ByProperty
jobs to this object. Name)
If set, the command returns the
list of target proxy servers. If
Target False Named False False
omitted, the command returns
the list of source proxy servers.
<CommonParameters>
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 PowerShell |REFERENCE| REV 2
Example 1
This command looks for the list of target proxies assigned to the job named "Backup Job 01". The job
object is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Backup Job 01" | Get-VBRJobProxy -Target
Example 2
This command looks for the list of source proxies assigned to the job named "Backup Job 01". The job
object is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Backup Job 01" | Get-VBRJobProxy
Example 3
This command looks for the list of target proxies represented by the $"Job 1" variable. The job object is
obtained with Get-VBRJob and assigned to the variable beforehand.
Get-VBRJobProxy -Job $"Job 1"
87 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRLocalhost
Short Description
Returns the local server on which Veeam Backup & Replication is installed.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRLocalhost [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Detailed Description
This cmdlet returns the local server on which Veeam Backup & Replication is installed.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command looks for the local Veeam Backup & Replication server.
Get-VBRLocalhost
88 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRServer
Short Description
Returns hosts connected to Veeam Backup & Replication.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRServer [-Type <CDBHost+EType>] [-Name <String[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet returns the list of hosts connected to Veeam Backup & Replication.
You can get the list of all hosts or narrow down the output to the servers of specific type, or search for
instances directly by name.
Run Find-VBRViEntity or Find-VBRHvEntity to look for VMware or Hyper-V virtual objects registered on
these hosts.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the server type:
- BackupServer
- ESX
- ESXi
- HvCluster
- HvServer
- Linux
Type - Local False Named False False
- SanHost
- Scvmm
- SmbCluster
- SmbServer
- VC
- VcdSystem
- Windows
Specifies the name of the server
you want to get, or search
Name conditions. False Named False True
You can specify multiple names
separated by commas.
89 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the servers named "Active_Directory".
Get-VBRServer -Name "Active_Directory"
Example 2
This command looks for the VM named "Hv_DNS" registered on a Hyper-V server.
Get-VBRServer -Type HvServer -Name "Hv_DNS"
90 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRViProxy
Short Description
Returns VMware backup proxies.
Applies to
Platform: VMware
For Hyper-V, run Get-VBRHvProxy.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRViProxy [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet returns the list of VMware backup proxies managed by Veeam Backup & Replication.
Run Get-VBRJobProxy to get the list of proxies assigned to a specific job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the VMware
proxy you want to get, or search
Name conditions. False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of all VMware proxies.
Get-VBRViProxy
Example 2
This command looks for the proxy named "LocalProxy".
Get-VBRViProxy -Name "LocalProxy"
91 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRBackupRepository
Short Description
Removes a specified backup repository from Veeam Backup & Replication.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBRBackupRepository -Repository <CBackupRepository[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRBackup
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.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the backup repository (ByValue,
Repository True Named False
you want to remove. ByProperty
Name)
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the False Named False False
cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm False Named False False
user is sure that they want to
continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
92 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command removes the backup repository named "Local Repository 01". The repository is
obtained with Get-VBRBackupRepository and piped down.
Get-VBRBackupRepository -Name "Local Repository 01" | Remove-
VBRBackupRepository
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
93 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRHvProxy
Short Description
Removes a specified Hyper-V backup proxy from Veeam Backup & Replication.
Applies to
Platform: Hyper-V
For VMware, run Remove-VBRViProxy.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBRHvProxy -Proxy <CHvProxy[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-
Confirm] [<CommonParameters>]
Related Commands
Get-VBRHvProxy
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 Disable-VBRHvProxy to disable a Hyper-V proxy.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the Hyper-V backup (ByValue,
Proxy True Named False
proxy you want to remove. ByProperty
Name)
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the False Named False False
cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm False Named False False
user is sure that they want to
continue.
94 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes the proxies named "Proxy 01" and "Proxy 03". The proxies are obtained with
Get-VBRHvProxy and piped down.
Get-VBRHvProxy -Name "Proxy 01", "Proxy 03"| Remove-VBRHvProxy
Example 2
This command removes the proxy represented by the $proxy variable. The proxy is obtained with Get-
VBRHvProxy and assigned to the variable beforehand.
Remove-VBRHvProxy -Proxy $proxy
95 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRServer
Short Description
Removes a selected server from Veeam Backup & Replication.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBRServer [-Server] <CHost[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-
Confirm] [<CommonParameters>]
Related Commands
Get-VBRServer
Detailed Description
This cmdlet removes a specified VMware or Hyper-V host from Veeam Backup & Replication.
When you remove a host, you only stop managing it via your Veeam Backup & Replication console.
The host is not deleted as well as data stored on it, i.e. the backup files. You can import these backup
files later to the Veeam Backup & Replication console by running Import-VBRBackup.
Note that when you remove virtual hosts from your Veeam Backup & Replication managing console,
the backups of the removed hosts stay in the Veeam Backup & Replication database and repository.
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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the server you want to True
remove. (ByValue,
Server True 1 False
You can assign multiple servers ByProperty
to this object. Name)
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the False Named False False
cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm False Named False False
user is sure that they want to
continue.
96 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes a Virtual Center named "vCenter01". The server is obtained with Get-
VBRServer, selected by the 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
97 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRViProxy
Short Description
Removes VMware backup proxy from Veeam Backup & Replication.
Applies to
Platform: VMware
For Hyper-V, run Remove-VBRHvProxy.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBRViProxy -Proxy <CViProxy[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-
Confirm] [<CommonParameters>]
Related Commands
Get-VBRViProxy
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 Disable-VBRViProxy to disable a VMware proxy.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the proxy you want to (ByValue,
Proxy True Named False
remove. ByProperty
Name)
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the False Named False False
cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm False Named False False
user is sure that they want to
continue.
98 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes the proxies named "Proxy 01" and "Proxy 03". The proxies are obtained with
Get-VBRViProxy and piped down.
Get-VBRViProxy -Name "Proxy 01", "Proxy 03"| Remove-VBRViProxy
Example 2
This command removes the proxy represented by the $proxy variable. The proxy is obtained with Get-
VBRViProxy and assigned to the variable beforehand.
Remove-VBRViProxy -Proxy $proxy
99 | Veeam Backup PowerShell |REFERENCE| REV 2
Rescan-VBREntity
Short Description
Rescans backup infrastructure components.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Rescan-VBREntity -Entity <Object> [-Wait] [-WarningAction
<ActionPreference>] [-WarningVariable
<String>][<CommonParameters>]
Related Commands
Get-VBRServer
Get-VBRTapeServer
Get-VBRTapeLibrary
Get-VBRBackupRepository
Get-VBRCloudProvider
Get-VBRReplica
Detailed Description
This cmdlet performs rescan for the following backup infrastructure components added to Veeam
Backup & Replication:
• Hosts and clusters
• Tape servers
• Tape libraries
• Backup repositories
• Cloud providers
• Veeam backup database for new replica restore points
100 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the component you
want to rescan.
Accepts the following objects:
CHost (host)
VBRTapeServer (tape
server) True (by
Entity VBRTapeLibrary (tape True Named Value False
library) FromPipeline)
CBackupRepository
(backup repository)
VBRCloudProvider (cloud
provider)
CBackup (only replicas
restore points)
Indicates that the command
waits for the process to
Wait False Named False False
complete before accepting
more input.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command rescans a backup repository named "Win2012Repo". The repository is obtained with
Get-VBRBackupRepository and piped down.
PS C:\PS> Get-VBRBackupRepository - Name "Win2012Repo" | Rescan-
VBREntity
Example 2
This command rescans a tape server named "srv01.veeam.local". The tape server is obtained with Get-
VBRTapeServer and assigned to the 'tapesrv' variable. The Wait parameter is used to prevent the
console from taking input until the rescanning ends.
PS C:\PS> $tapesrv = Get-VBRTapeServer -Name "srv01.veeam.local"
PS C:\PS> Rescan-VBREntity Entity $tapesrv -Wait
Example 3
This command updates information about the 'Webservices' replica restore points. The replica is
obtained with Get-VBRReplica and assigned to the '$webservices' variable.
PS C:\PS> $webservices = Get-VBRReplica -Name "Webservices
Replica"
PS C:\PS> Rescan-VBREntity Entity $webservices
101 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRBackupRepository
Short Description
Modifies a backup repository.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRBackupRepository -Repository <CBackupRepository> [-Name
<String>] [-Description <String>] [-MountServer <CHost>] [-Server
<CHost>] [-RotatedDrive] [-EnableVPowerNFS] [-VPowerNFSFolder
<String>] [-UseFc] [-DDServerName <String>] [-RequireAccessCreds]
[-Credentials <CCredentials>] [-LimitConcurrentJobs] [-
MaxConcurrentJobs <Int32>] [-LimitDatarate] [-DataRateLimit
<Int32>] [-AlignDataBlocks] [-DecompressDataBlocks] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRBackupRepository
Get-VBRServer
Get-VBRCredentials
Detailed Description
This cmdlet modifies a selected backup repository. To modify settings, you need to enter the
corresponding parameters with new values. The parameters that you omit will remain unchanged.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True (by Value
Specifies the backup
FromPipeline,
Repository repository you want to True Named False
ValueFromPipeline
modify.
ByPropertyName)
Specifies the the name
Name you want to assign to the False Named False False
new backup repository.
Specifies the description
of the backup repository.
Description If not set, Veeam Backup False Named False False
& Replication will enter
date and time of creation
by default.
Type Specifies the type you True Named False False
want to assign to the
102 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
repository:
• CifsShare
• DataDomain
• ExaGrid
• HPStoreOnce
• LinuxLocal
• WinLocal
Specifies the host where
the backup repository
you want to add is
located.
Use this parameter to
explicitly set the host for
the following repository
types:
For the WinLocal
type: indicate
the Windows
based server
where you want
to create the
backup
repository or to
which you want
to connect the
rotated drives.
For the LinuxLocal
type: indicate
the Linux based
Server server where False Named False False
you want to
create the
backup
repository or to
which you want
to connect the
rotated drives.
For the CifsShare,
DataDomain
or
HPStoreOnce
types: indicate a
Windows based
server that to
which the
storage
appliance is
connected and
which will be
used as a
gateway server.
Default: This server.
Used to enable the
Mount
vPower NFS. False Named False False
Server
Specifies the host where
103 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
the NFS service must be
installed.
By default, the vPower
NFS folder is created on
the mounted host. If you
want to locate the
vPower NFS folder
elsewhere, use the
VPowerNFSFolder
parameter to set the
path.
Specifies the full path to
the folder where you
Folder True Named False False
want to store the
backups.
If indicated, the guest OS
Import
file system index will be False Named False False
Index
imported automatically.
If indicated, the existing
backups located on the
repository you are adding
Import
will be imported False Named False False
Backup
automatically. Otherwise,
you will need to import
the backups manually.
Indicates if the repository
Rotated you want to add is a
False Named False False
Drive rotated drive (removable
media).
Indicates that the
repository is accessible by
the vPower NFS service.
Enable
Use the MountServer and False Named False False
VPowerNFS
VPowerNFSFolder
parameters to set the
vPower NFS service.
Specifies the path to the
vPower NFS root folder.
VPower
To enable the vPower False Named False False
NFSFolder
NFS, the MountServer
parameter must be set.
Specifies the Data
Domain server name
according to the
connection mode:
DDServer If EMC Data Domain
False Named False False
Name works over TCP,
enter a full DNS
name or IP
address of the
EMC Data
Domain server.
104 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
If EMC Data Domain
works over
Fibre Channel,
enter a name of
the Data
Domain server
starting with a
'DFC-' prefix, for
example, "DFC-
DataDomain69
0".
Indicates that the
administrator credentials
Require
are needed to access the
Access False Named False False
shared folder. Use the
Creds
Credentials parameter to
specify the credentials.
Specifies credentials you
want to use for
Credentials False Named False False
authenticating with the
backup repository host.
Indicates if the number of
concurrent jobs using
Limit this repository must be
Concurrent limited. Use the False Named False False
Jobs MaxConcurrentJobs
parameter to set the
maximum value.
Used for setting
maximum value for the
LimitConcurrentJobs
parameter.
Max Specifies the maximum
Concurrent allowed number of False Named False False
Jobs concurrent tasks for the
backup repository.
Accepts int type.
Permitted values: 1 to 99.
Indicates that the total
speed of writing data to
the backup repository
Limit
disk must be restricted. False Named False False
Datarate
Use the DataRateLimit
parameter to set the
maximum value.
Used for setting
combined data ingestion
Data rate for the LimitDatarate
Rate parameter. False Named False False
Limit Specifies the combined
data ingestion rate for
the repository.
105 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Accepts int32 type.
Permitted value: 1 to
1024 (MByte/s).
If set, the backup blocks
size will be aligned by a
Align 4Kb block boundary. Data
Data alignment provides False Named False False
Blocks better deduplication on
storage systems with
fixed block size.
If set, backup data blocks
will be decompressed
before storing the
Decompress
backup to the repository. False Named False False
DataBlocks
Decompression helps to
achieve a better
deduplication ratio.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
106 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRJobProxy
Short Description
Assigns a specific proxy to a job or enables automatic proxy selection.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRJobProxy -Job <CBackupJob[]> -Proxy <IProxy[]> [-Target]
[-WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Set-VBRJobProxy -Job <CBackupJob[]> -AutoDetect [-Target] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Get-VBRViProxy / Get-VBRHvProxy
Detailed Description
This cmdlet assigns a specific proxy to a job or enables automatic proxy selection.
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! 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.
107 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to set True
proxy to. (ByValue,
Job True Named False
You can assign multiple backup ByProperty
jobs to this object. Name)
Specifies the proxy server you
Proxy True Named False False
want to assign to the job.
If set, the command returns the
list of target proxy servers. If
Target False Named False False
omitted, the command returns
the list of source proxy servers.
If set, the proxy server selection
mode is set to automatic. If you
AutoDetect do not set this parameter, you True Named False False
should specify the custom proxy
server.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command assigns the custom VMware source proxy to the jobs named "Backup Job 01" and
"Backup Job 02". The jobs are obtained with Get-VBRJob and piped down. The proxy to assign is
obtained with Get-VBRViProxy and assigned to the $"SourceProxy" variable beforehand. The -Target
parameter is not set to enable the source proxy allocation.
Get-VBRJob -Name "Backup Job 01", "Backup Job 02" | Set-
VBRJobProxy -Proxy $"SourceProxy"
Example 2
This command assigns the custom Hyper-V target proxy to the job represented by the $job variable.
The proxy to assign is obtained with Get-VBRHvProxy and assigned to the $proxy variable 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 are obtained with Get-VBRJob and piped down. The -Target parameter
is not set to enable the source proxy allocation.
Get-VBRJob -Name "Backup Job 01", "Backup Job 02" | Set-
VBRJobProxy -AutoDetect
108 | Veeam Backup PowerShell |REFERENCE| REV 2
Sync-VBRBackupRepository
Short Description
Rescans a selected backup repository.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Sync-VBRBackupRepository -Repository <CBackupRepository[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRBackupRepository
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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies backup repository (ByValue,
Repository True Named False
you want to rescan. ByProperty
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command rescans the repository named "Local Repository 01". The needed repository object is
obtained with Get-VBRBackupRepository and piped down.
Get-VBRBackupRepository -Name "Local Repository 01" | Sync-
VBRBackupRepository
Example 2
This command rescans the repository represented by the $repository variable. The needed repository
object is obtained with Get-VBRBackupRepository and assigned to the variable beforehand.
Sync-VBRBackupRepository -Repository $repository
109 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRViStoragePolicy
This object contains the VMware storage policy profile.
Created by
None
Properties
Property Type Description
Id String Unique identifier of the storage policy profile.
Name String Storage policy profile name.
Description String Storage policy profile description.
UpdateTime DateTime Date and time of the last storage policy profile modification.
Unique identifier of the vCenter server where the storage policy profile is
HostId GUID
created.
110 | Veeam Backup PowerShell |REFERENCE| REV 2
Backup and Replication Tasks
In Veeam Backup & Replication, backup and replication operations are a job-driven process. Veeam
PowerShell provides you with almost all capabilities available in the UI, so that you can create and run
jobs from your command line.
This section contains information on cmdlets that you will need to run the following types of jobs:
• Backup jobs: allow you to flexibly configure and automate the backup process.
• Replication jobs: allow you to create a full-functioning copy of a production VM and keep it
periodically synchronized.
When you run Veeam PowerShell cmdlets that create jobs, you configure only core job settings such
as job name, source VMs and target repository. The jobs are created in stopped status. To run them,
you need to create a schedule or start them manually.
You can also use dedicated cmdlets to configure advanced job options such as email motification, VSS
settings or other specific options.
Use the following groups of cmdlets:
Creating jobs: create backup and replication jobs.
The following cmdlets are applicable to all these jobs:
Administrating jobs: start, stop, suspend, get or remove jobs.
Managing job objects: add, get or remove VMs, VM containers or other objects in existing jobs.
Managing job options: edit job general options or clear the changes and set the default settings
to a job.
Managing job schedule: create and enable a schedule for the job, manage and customize the
existing schedules.
Managing job VSS and guest file system indexing options: configure VSS and guest file indexing
settings.
Managing job advanced options: set changed block tracking, notifications, data compression
level, enable crash consistent backup, choose backup method or schedule full backup.
See also:
Creating VMware Backup Job
Creating Hyper-V Backup Job
Creating VMware Replica Job
Creating Hyper-V Replica Job
111 | Veeam Backup PowerShell |REFERENCE| REV 2
Creating jobs
Create backup jobs to back up your data.
Operation VMware Hyper-V
Backup jobs:
Creates a VM backup job Add-VBRViBackupJob Add-VBRHvBackupJob
Replication jobs:
Creates a replica job Add-VBRViReplicaJob Add-VBRHvReplicaJob
Modifies a replica job Set-VBRViReplicaJob —
Creates a different IP addressing
New-VBRViReplicaReIpRule —
scheme for a replica
Looks for the list of re-IP rules of a
Get-VBRViReplicaReIpRule —
selected job
Gets the list of virtual networks to
which a selected host is
Get-VBRViServerNetworkInfo Get-VBRHvServerNetworkInfo
connected to map the replica
network
Administrating jobs
Start, stop or manage the created jobs.
Operation VMware Hyper-V
Clones an existing job Copy-VBRJob Copy-VBRJob
Puts a job on temporary hold Disable-VBRJob Disable-VBRJob
Enables a disabled job Enable-VBRJob Enable-VBRJob
Clears change tracking data — Reset-HvVmChangeTracking
Looks for existing jobs Get-VBRJob Get-VBRJob
Starts a created job Start-VBRJob Start-VBRJob
Stops a running job Stop-VBRJob Stop-VBRJob
Removes a job Remove-VBRJob Remove-VBRJob
Managing job objects
Edit the jobs you have already created by adding or removing job objects: VMs, VM containers or
other virtual instances.
Operations VMware Hyper-V
Adds VMs or other objects to a
Add-VBRViJobObject Add-VBRHvJobObject
created job
Looks for VMs or other objects
Get-VBRJobObject Get-VBRJobObject
added to a job
Removes VMs or other objects
Remove-VBRJobObject Remove-VBRJobObject
from a job
112 | Veeam Backup PowerShell |REFERENCE| REV 2
Operations VMware Hyper-V
Looks for VSS options set for a
Get-VBRJobObjectVssOptions Get-VBRJobObjectVssOptions
specific job object
Edits VSS options of a specific job
Set-VBRJobObjectVssOptions Set-VBRJobObjectVssOptions
object
Managing job options
Edit general options, schedule, VSS settings or advanced options of a selected job.
Operations VMware Hyper-V
Edit general options of backup, replication or copy jobs:
Looks for settings of a selected
Get-VBRJobOptions Get-VBRJobOptions
job
Creates an object containing new
job settings New-VBRJobOptions New-VBRJobOptions
(run Set-VBRJobOptions to apply)
Applies new job settings to a
Set-VBRJobOptions Set-VBRJobOptions
selected job
Sets default settings to a selected
Reset-VBRJobOptions Reset-VBRJobOptions
job
Managing job schedule
Create general schedule settings for jobs:
Operations VMware Hyper-V
Create and manage job schedule:
Creates schedule for a selected
Set-VBRJobSchedule Set-VBRJobSchedule
job
Enables a job schedule (you
Enable-VBRJobSchedule Enable-VBRJobSchedule
should have a schedule preset)
Disables a job schedule (job
Disable-VBRJobSchedule Disable-VBRJobSchedule
requires manual run)
Customize or reset job schedule settings:
Looks for schedule settings of a
Get-VBRJobScheduleOptions Get-VBRJobScheduleOptions
selected job
Creates an object containing new
schedule settings (run Set- New-
New-VBRJobScheduleOptions
VBRJobScheduleOptions to VBRJobScheduleOptions
apply)
Applies new schedule settings to
Set-VBRJobScheduleOptions Set-VBRJobScheduleOptions
a selected job
Sets default schedule settings to Reset-
Reset-VBRJobScheduleOptions
a selected job VBRJobScheduleOptions
113 | Veeam Backup PowerShell |REFERENCE| REV 2
Managing job VSS and guest file system indexing options
Configure VSS settings for jobs:
Operations VMware Hyper-V
Set and edit VSS (Volume Shadow Services) options of jobs:
Looks for VSS settings of a
Get-VBRJobVSSOptions Get-VBRJobVSSOptions
selected job
Creates an object containing new
VSS settings (run Set- New-VBRJobVssOptions New-VBRJobVssOptions
VBRJobVssOptions to apply)
Applies new VSS settings to a
Set-VBRJobVssOptions Set-VBRJobVssOptions
selected job
Sets default VSS settings to a
Reset-VBRJobVssOptions Reset-VBRJobVssOptions
selected job
Disables guest file system Disable-
Disable-VBRJobGuestFSIndexing
indexing in a selected job VBRJobGuestFSIndexing
Disables VSS settings in a Disable-
Disable-VBRJobVSSIntegration
selected job VBRJobVSSIntegration
Enables guest file system Enable-
Enable-VBRJobGuestFSIndexing
indexing in a selected job VBRJobGuestFSIndexing
Enables VSS settings in a selected Enable-
Enable-VBRJobVSSIntegration
job VBRJobVSSIntegration
Managing advanced job options
Configure advanced job options:
Operations VMware Hyper-V
Set advanced options to jobs:
Sets special options for a selected Set-
Set-VBRJobAdvancedHvOptions
job VBRJobAdvancedViOptions
Set-
Sets advanced backup options Set-
VBRJobAdvancedBackupOpti
for a selected job VBRJobAdvancedBackupOptions
ons
Set- Set-
Sets advanced notification
VBRJobAdvancedNotification VBRJobAdvancedNotificationOpt
options for a selected job
Options ions
Sets advanced options for a
Set-VBRJobAdvancedOptions Set-VBRJobAdvancedOptions
selected job
Set-
Sets advanced storage options Set-
VBRJobAdvancedStorageOpti
for a selected job VBRJobAdvancedStorageOptions
ons
114 | Veeam Backup PowerShell |REFERENCE| REV 2
Creating VMware Backup Job
This example shows how to create a VMware backup job for a CRM database server, then add another
CRM database server to this job and set the additional options.
You will need to perform the following steps:
1. Create the backup job by running Add-VBRViBackupJob. You will need to get the VM that you
will add to the job and the backup repository to store its backups. Use Find-VBRViEntity and
Get-VBRBackupRepository respectively.
2. If you want to add another VM to the created job, get the job with Get-VBRJob and run Add-
VBRViJobObject.
3. Configure a schedule with Set-VBRJobSchedule and apply it to the job. Remember to enable
the schedule with Enable-VBRJobSchedule.
4. Add advanced job options: schedule a synthetic and an active full backup with Set-
VBRJobAdvancedBackupOptions.
// Create a backup job:
PS C:\PS> $crm = Find-VBRViEntity -Name "CRMdb_01"
PS C:\PS> $repository = Get-VBRBackupRepository -Name
172.16.03.119
PS C:\PS> Add-VBRViBackupJob -Name "CRM Backup" -Entity $crm -
BackupRepository $repository
// Add another VM to the job:
PS C:\PS> $crmjob = Get-VBRJob -Name "CRM Backup"
PS C:\PS> Find-VBRViEntity -Name "CRMdb_02" | Add-
VBRViJobObject -Job $crmjob
// Configure job schedule and enable it:
PS C:\PS> Get-VBRJob -Name "CRM Backup" | Set-VBRJobSchedule -
Daily -At "21:00" -DailyKind Weekdays | Enable-VBRJobSchedule
// Set synthetic full and active full schedule:
PS C:\PS> Get-VBRJob -Name "CRM Backup" | Set-
VBRJobAdvancedBackupOptions -TransformFullToSyntethic $True -
TransformIncrementsToSyntethic $True -TransformToSyntethicDays
Sunday -EnableFullBackup $True -FullBackupScheduleKind Monthly
-DayNumberInMonth Last -FullBackupDays Sunday
115 | Veeam Backup PowerShell |REFERENCE| REV 2
Creating Hyper-V Backup Job
This example shows how to create a Hyper-V backup job for a CRM database server, then add another
CRM database server to this job and set the additional options.
You will need to perform the following steps:
1. Create the backup job by running Add-VBRHvBackupJob. You will need to get the VM that
you will add to the job and the backup repository to store its backups. Use Find-VBRHvEntity
and Get-VBRBackupRepository respectively.
2. If you want to add another VM to the created job, get the job with Get-VBRJob and run Add-
VBRHvJobObject.
3. Configure a schedule with Set-VBRJobSchedule and apply it to the job. Remember to enable
the schedule with Enable-VBRJobSchedule.
4. Add advanced job options: schedule a synthetic and an active full backup with Set-
VBRJobAdvancedBackupOptions.
// Create a backup job:
PS C:\PS> $crm = Find-VBRHvEntity -Name "CRMdb_01"
PS C:\PS> $repository = Get-VBRBackupRepository -Name
172.16.03.119
PS C:\PS> Add-VBRHvBackupJob -Name "CRM Backup" -Entity $crm -
BackupRepository $repository
// Add another VM to the job:
PS C:\PS> $crmjob = Get-VBRJob -Name "CRM Backup"
PS C:\PS> Find-VBRHvEntity -Name "CRMdb_02" | Add-
VBRHvJobObject -Job $crmjob
// Configure job schedule and enable it:
PS C:\PS> Get-VBRJob -Name "CRM Backup" | Set-VBRJobSchedule -
Daily -At "21:00" -DailyKind Weekdays | Enable-VBRJobSchedule
// Set synthetic full and active full schedule:
PS C:\PS> Get-VBRJob -Name "CRM Backup" | Set-
VBRJobAdvancedBackupOptions -TransformFullToSyntethic $True -
TransformIncrementsToSyntethic $True -TransformToSyntethicDays
Sunday -EnableFullBackup $True -FullBackupScheduleKind Monthly
-DayNumberInMonth Last -FullBackupDays Sunday
116 | Veeam Backup PowerShell |REFERENCE| REV 2
Creating VMware Replica Job
This example shows how to set up and manage a job that will replicate a domain controller server. The
replicated VM will be created on another site. After the replication job is configured, a network
mapping will be added.
Before replicating a VM to another host, make sure that the source host and target host are added to
Veeam Backup & Replication.
To replicate a VM, you need to perform the following operations:
1. Create a replication job with Add-VBRViReplicaJob. With one job, you can replicate more than
one VM.
If you need the replicated VMs, get them with Get-VBRReplica. To get the replication job, run Get-
VBRJob.
2. Configure a schedule with Set-VBRJobSchedule and apply it to the job. Remember to enable
the schedule with Enable-VBRJobSchedule.
3. You can set email notification that will send information on result after each job run.
Remember that email notifications for jobs will work only if you enable the global email
notifications.
4. If you need to suspend the replication job for a while, run Disable-VBRJob. To resume the
replication, run Enable-VBRJob. The replication job will bring the VM state into sync with the
first run.
5. If you want to stop replicating the VM, you need to delete the replication job with Remove-
VBRJob. Note that running Stop-VBRJob will stop the job once: it will start again on the next
scheduled run.
6. When you remove the replication job, the replica VM remains on disk, it only stops being
synchronized with the original VM. If you do not need the replicas, you can remove them from
Veeam Backup console by running Remove-VBRReplica or remove them completely by
running Remove-VBRReplica with -FromDisk parameter.
// Create a replica job:
PS C:\PS> $server = Get-VBRServer -Type ESXi -Name
"172.16.14.19"
PS C:\PS> $resourcepool = Find-VBRViResourcePool -Server
$server -Name "Replicas"
PS C:\PS> $datastore = Find-VBRViDatastore -Server $server -
Name "LocalStore01"
PS C:\PS> $folder = Find-VBRViFolder -Server $server -Name
"VM"
PS C:\PS> Find-VBRViEntity -Name "DC" | Add-VBRViReplicaJob -
Name "DC Replication Job" -Server $server -Datastore
$datastore -ResourcePool $resourcepool -Folder $folder -Suffix
"_replica" -Description "DC server replication"
// Set the job schedule and enable it:
PS C:\PS> Get-VBRJob -Name "DC Replication Job" | Set-
VBRJobSchedule -Daily -At "23:00" -DailyKind SelectedDays -
Days Saturday | Enable-VBRJobSchedule
117 | Veeam Backup PowerShell |REFERENCE| REV 2
// Set email notification for the job:
PS C:\PS> Get-VBRJob -Name "DC Replication Job" | Set-
VBRJobAdvancedNotificationOptions -EmailNotification $True -
EmailNotificationAddresses "
[email protected]"
// Add network mapping to the replica settings:
PS C:\PS> $sourcenetwork = Get-VBRServer -Name "192.12.11.199"
| Get-VBRViServerNetworkInfo
PS C:\PS> $targetnetwork = Get-VBRViServerNetworkInfo -Server
$server
PS C:\PS> $dcreplica = Get-VBRJob -Name "DC Replication Job"
PS C:\PS> Set-VBRViReplicaJob -Job $dcreplica -
EnableNetworkMapping -SourceNetwork $sourcenetwork -
TargetNetwork $targetnetwork
// Look for the created replica VM:
PS C:\PS> Get-VBRReplica -Name "DC Replication Job"
// Suspend and resume the replication job:
PS C:\PS> Get-VBRJob -Name "DC Replication Job" | Disable-
VBRJob
PS C:\PS> Get-VBRJob -Name "DC Replication Job" | Enable-
VBRJob
// Remove the replication job:
PS C:\PS> Get-VBRJob -Name "DC Replication Job" | Remove-
VBRJob
// Remove the replicated VM from disk:
PS C:\PS> Get-VBRReplica -Name "DC Replication Job" | Remove-
VBRReplica -FromDisk
118 | Veeam Backup PowerShell |REFERENCE| REV 2
Creating Hyper-V Replica Job
This example shows how to set up and manage a job that will replicate an SQL server. The replicated
VM will be created on another site. This is a simple scenario illustrating basic operations with
replication job and replica VM.
Before replicating a VM to another host, make sure that the source host and target host are added to
Veeam Backup & Replication.
To replicate a VM, you need to perform the following operations:
1. Create a replication job with Add-VBRHvReplicaJob. With one job, you can replicate more
than one VM.
If you need the replicated VMs, get them with Get-VBRReplica. To get the replication job, run Get-
VBRJob.
2. Configure a schedule with Set-VBRJobSchedule and apply it to the job. Remember to enable
the schedule with Enable-VBRJobSchedule.
3. You can set email notification that will send information on result after each job run.
Remember that email notifications for jobs will work only if you enable the global email
notifications.
4. If you need to suspend the replication job for a while, run Disable-VBRJob. To resume the
replication, run Enable-VBRJob. The replication job will bring the VM state into sync with the
first run.
5. If you want to stop replicating the VM, you need to delete the replication job with Remove-
VBRJob. Note that running Stop-VBRJob will stop the job once: it will start again on the next
scheduled run.
6. When you remove the replication job, the replica VM remains on disk, it only stops being
synchronized with the original VM. If you do not need the replicas, you can remove them from
Veeam Backup console by running Remove-VBRReplica or remove them completely by
running Remove-VBRReplica with -FromDisk parameter.
// Create a replica job:
PS C:\PS> $sourceserver = Get-VBRServer -Type HvServer -Name
"srv03.veeam.local"
PS C:\PS> $targetserver = Get-VBRServer -Type HvServer -Name
"srv02.veeam.remote"
PS C:\PS> Find-VBRHvEntity -Server $sourceserver-Name sql02 |
Add-VBRHvReplicaJob -Name "SQL02 Replica job" -Server
$targetserver -Path "c:\Replicas" -Description "SQL02
replication"
// Set the job schedule and enable it:
PS C:\PS> Get-VBRJob -Name "SQL02 Replica job" | Set-
VBRJobSchedule -Periodicaly -FullPeriod 6 -PeriodicallyKind
Hours | Enable-VBRJobSchedule
// Set email notification for the job:
PS C:\PS> Get-VBRJob -Name "SQL02 Replica job" | Set-
VBRJobAdvancedNotificationOptions -EmailNotification $True -
EmailNotificationAddresses "
[email protected]"
119 | Veeam Backup PowerShell |REFERENCE| REV 2
// Look for the created replica VM:
PS C:\PS> Get-VBRReplica -Name "SQL02 Replica job"
// Look for the created replication job:
PS C:\PS> Get-VBRJob -Name "SQL02 Replica job"
// Suspend and resume the replication job:
PS C:\PS> Get-VBRJob -Name "SQL02 Replica job" | Disable-
VBRJob
PS C:\PS> Get-VBRJob -Name "SQL02 Replica job" | Enable-VBRJob
// Remove the replication job:
PS C:\PS> Get-VBRJob -Name "SQL02 Replica job" | Remove-VBRJob
// Remove the replicated VM from disk:
PS C:\PS> Get-VBRReplica -Name "SQL02 Replica job" | Remove-
VBRReplica -FromDisk
120 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRHvBackupJob
Short Description
Creates a new Hyper-V backup job.
Applies to
Platform: Hyper-V
For VMware, run Add-VBRViBackupJob.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRHvBackupJob [-Name <String>] [-BackupRepository
<CBackupRepository>] -Entity <IHvItem[]> [-Description <String>]
[-WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRBackupRepository
Find-VBRHvEntity
Detailed Description
This cmdlet creates a new Hyper-V backup job.
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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you want to
Name False Named False False
assign to the backup job.
Specifies the backup repository
where the created backup
Backup should be stored.
False Named False False
Repository If not set, Veeam Backup &
Replication will use the default
backup repository.
Specifies the VM(s) you want to True
back up. (ByValue,
Entity True Named False
You can assign multiple VMs to ByProperty
this object. Name)
Specifies the description of the
Description False Named False False
backup job.
121 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
If not set, Veeam Backup &
Replication will enter date and
time of creation by default.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command creates a backup job named "Exchange Backup". The VMs to backup are obtained with
Find-VBRHvEntity and piped down. The backup repository is obtained with Get-VBRBackupRepository
and assigned to the $Repository variable beforehand. The description is "Hyper-V Exchange Backup".
Find-VBRHvEntity -Name Exchange* | Add-VBRHvBackupJob -Name
"Exchange Backup" -BackupRepository $Repository -Description
"Hyper-V Exchange Backup"
122 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRHvJobObject
Short Description
Adds a new object to a Hyper-V job.
Applies to
Platform: Hyper-V
For VMware, run Add-VBRViJobObject.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRHvJobObject -Job <CBackupJob> -Entities <IHvItem[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Find-VBRHvEntity
Detailed Description
This cmdlet allows to add VM(s) to an existing job.
You can run this cmdlet with any kind of jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job(s) you want to
add the VM(s) to.
Job True Named False False
You can assign multiple backup
jobs to this object.
Specifies the VM(s) you want to True
add to the job. (ByValue,
Entities True Named False
You can assign multiple VMs to ByProperty
this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
123 | Veeam Backup PowerShell |REFERENCE| REV 2
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 obtained with Find-VBRHvEntity
and piped down.
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
124 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRHvReplicaJob
Short Description
Creates a new Hyper-V replication job.
Applies to
Platform: Hyper-V
For VMware, run Add-VBRViReplicaJob.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRHvReplicaJob [-Name <String>] -Server <CHost> [-Path
<String>] -Entity <IHvItem[]> [-Suffix <String>] [-Description
<String>] [-BackupRepository <CBackupRepository>] [-WarningAction
<ActionPreference>][-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRServer
Find-VBRHvEntity
Get-VBRBackupRepository
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.
You can select a data source from which VM data must be read:
Actual VM: Veeam Backup & Replication will copy an actual VM from production storage. The
created replica will mirror an actual VM state.
Use the Entity parameter to indicate the VMs you want to replicate.
Replica from backup files: Veeam Backup & Replication will build a replica from backup files
stored on a backup repository. The created replica will be in the latest state the VM is
available in backups.
Use the Entity parameter to indicate the VMs you want to replicate and the BackupRepository
parameter to set the repository from where the backup files must be read.
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 manually.
Run Set-VBRJobSchedule to set schedule for the job and run it automatically.
125 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you want to
assign to the replication job.
Name If not set, Veeam Backup & False Named False False
Replication will give the default
job name.
Specifies the Hyper-V host where
Server the created replica should be True Named False False
stored.
Specifies the Hyper-V volume
Path where the created replica should True Named False False
be stored.
Specifies the VM(s) that you True
want to replicate. (ByValue,
Entity True Named False
You can assign multiple VMs to ByProperty
this object. Name)
Specifies the suffix that will be
appended to the name of the
VM you are replicating. This
name will be used to register the
Suffix replicated VM on the target False Named False False
server.
If omitted, the replicated VMs
will have the '_replica' suffix by
default.
Specifies the description of the
replication job.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Used for building replica from
backup files.
Specifies the backup repository
Backup that will be used to read the VM
False Named False False
Repository data from the already existing
backup chain.
Accepts CBackupRepository
object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
126 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command creates a job that replicates an SQL02 server. The replica is located on another host.
• The VM to replicate is obtained with Find-VBRHvEntity and piped down.
• The host to locate the replicated VM on is obtained with Get-VBRServer and assigned to the
'$targetserver' variable beforehand.
• The replica is created with the suffix "_replicated".
• The description of the job is "SQL02 replication".
Find-VBRHvEntity -Name "sql02" | Add-VBRHvReplicaJob -Name "SQL02
Replica job" -Server $targetserver -Path "c:\Replicas" -Suffix
"_replicated" -Description "SQL02 replication"
Example 2
This command creates a replica of an SQL server from backup. The replica is located on another host.
• The VM to replicate is obtained with Find-VBRHvEntity and assigned to the '$sql02' variable.
• The host to locate the replicated VM on is obtained with Get-VBRServer and assigned to the
'$targetserver' variable beforehand.
• The replica will be built from the SQL02 backup files that are located on a backup repository.
The repository is obtained with Get-VBRBackupRepository and assigned to the '$repository'
variable beforehand.
• The description of the job is "SQL02 replication".
Add-VBRHvReplicaJob -Name "SQL02 Replica job" -Server
$targetserver -Path "c:\Replicas" -Entity $sql02 -Description
"SQL02 replication" -BackupRepository $repository
127 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRViBackupJob
Short Description
Creates VMware backup job.
Applies to
Platform: VMware
For Hyper-V, run Add-VBRHvBackupJob.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRViBackupJob [-Name <String>] [-BackupRepository
<CBackupRepository>] -Entity <IViItem[]> [-Description <String>]
[-WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRBackupRepository
Find-VBRViEntity
Detailed Description
This cmdlet creates a new VMware backup job.
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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the string with the
Name False Named False False
name of the created backup job.
Specifies the backup repository
where the created backup
Backup should be stored. False Named False False
Repository
If not set, the default backup
repository will be used.
Specifies the VM(s) that you True
want to back up. (ByValue,
Entity True Named False
You can assign multiple VMs to ByProperty
this object. Name)
Specifies the description of the
Description backup job. False Named False False
If not set, Veeam Backup &
128 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Replication will enter date and
time of creation by default.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command creates a backup job named "Exchange Backup". The VMs to backup are obtained with
Find-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"
129 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRViJobObject
Short Description
Adds a VM to a job.
Applies to
Platform: VMware
For Hyper-V, run Add-VBRHvJobObject.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRViJobObject -Job <CBackupJob> -Entities <IViItem[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Find-VBRViEntity
Detailed Description
This cmdlet adds VM(s) to an existing job.
You can run this cmdlet with any kind of jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to
add the VM(s) to.
Job True Named False False
You can assign multiple backup
jobs to this object.
Specifies the vM(s) you want to True
add to the job. (ByValue,
Entities True Named False
You can assign multiple VMs to ByProperty
this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
130 | Veeam Backup PowerShell |REFERENCE| REV 2
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 down.
Find-VBRViEntity -Name VM01 | Add-VBRViJobObject -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
131 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRViReplicaJob
Short Description
Adds new VMware replication job.
Applies to
Platform: VMware
For Hyper-V, run Add-VBRHvReplicaJob.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRViReplicaJob -Server <CHost> -Entity <IViItem[]> [-Name
<string>] [-Datastore <CViDatastoreItem>] [-StoragePolicy
<VBRViStoragePolicy>] [-ResourcePool <CViResourcePoolItem>] [-
Folder <CViFolderItem>] [-Suffix <string>] [-BackupRepository
<CBackupRepository>] [-Description <string>] [-
EnableNetworkMapping] [-SourceNetwork <VBRViNetworkInfo[]>] [-
TargetNetwork <VBRViNetworkInfo[]>] [-SourceProxy <CViProxy[]>]
[-TargetProxy <CViProxy[]>] [-SourceWANAccelerator
<CWanAccelerator>] [-TargetWANAccelerator <CWanAccelerator>] [-
RestorePointsToKeep <int>] [-SourceRepository
<CBackupRepository[]>] [-ReIpRule <VBRViReplicaReIpRule[]>] [-
DiskType <EDiskCreationMode> {Source | Thick | Thin}]
[<CommonParameters>]
Related Commands
Get-VBRJob
Find-VBRViEntity
Find-VBRViDatastore
Find-VBRViStoragePolicy
Find-VBRViResourcePool
Find-VBRViFolder
Get-VBRBackupRepository
Get-VBRViServerNetworkInfo
Detailed Description
This cmdlet creates 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.
You can select a data source from which VM data must be read:
Actual VM: Veeam Backup & Replication will copy an actual VM from production storage. The
created replica will mirror an actual VM state.
Use the Entity parameter to indicate the VMs you want to replicate.
132 | Veeam Backup PowerShell |REFERENCE| REV 2
Replica from backup files: Veeam Backup & Replication will build a replica from backup files
stored on a backup repository. The created replica will be in the latest state the VM is
available in backups.
Use the Entity parameter to indicate the VMs you want to replicate and the BackupRepository
parameter to set the repository from where the backup files must be read.
When you create a replication job, you can configure the following additional settings:
Storage policy profile: you can apply a particular VMware storage policy profile to virtual
disks of the replica VM. Use the StoragePolicy parameter to set the profile.
Network mapping: this option allows you to configure network mapping rules if the
production site and DR site uses separate virtual networks. Use the EnableNetworkMapping
parameter to enable the network mapping and the SourceNetwork and the TargetNetwork
parameters to select the networks.
Proxy servers: this options allow you to configure particular proxy servers for the data
transfer. Use the SourceProxy and the TargetProxy parameters to set the proxies.
WAN accelerators: this options allow you to use the built-in WAN accelerators to optimize
the data transfer. Use the SourceWANAccelerator and the TargetWANAccelerator
parameters to set the WAN accelerators.
Ri-IP rules: this option allows you to configure different IP addressing scheme for the
production and the DR sites. You need to create an object containing the re-IP rules before
hand by running New-VBRViReplicaReIpRule. Pass the created object to the ReIpRule
parameter of this cmdlet.
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 manually.
Run Set-VBRJobSchedule to set schedule for the job and run it automatically.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the string with the
name of the created
replication job.
Name False Named False False
If not set, Veeam Backup &
Replication will give the
default job name.
Specifies the host where the
Server created replica should be True Named False False
stored.
Specifies the VM(s) that you True
want to replicate. (ByValue,
Entity True Named False
You can assign multiple VMs ByProperty
to this object. Name)
Specifies the datastore to
Datastore False Named False False
which you want to replicate.
Specifies the VMware storage
policy profile that must be
StoragePolicy False Named False False
applied to the replica virtual
disks.
133 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Resource Specifies the resource pool to
False Named False False
Pool which you want to replicate.
Specifies the folder to which
Folder False Named False False
you want to replicate.
Specifies the suffix that will be
appended to the name of the
VM you are replicating. This
name will be used to register
Suffix the replicated VM on the False Named False False
target server.
If omitted, the replicated VMs
will have the '_replica' suffix
by default.
Specifies the backup
repository which will be used
Backup to store replica metadata files. False Named False False
Repository
If not set, the default backup
repository will be used.
Specifies the description of the
new job.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Indicates that the network
mapping must be used. Use
Enable
the SourceNetwork and the
Network False Named False False
TargetNetwork parameters to
Mapping
set the network mapping
rules.
Used to set the source
network for the
EnableNetworkMapping
parameter.
Specifies the production
network to which VMs added
Source to the job are connected. False Named False False
Network
Use the TargetNetwork
parameter to set the target
network.
NOTE: the number of the
source and the target
networks must be the same.
Used to set the target network
for the
EnableNetworkMapping
Target parameter. False Named False False
Network
Specifies the network in the
DR site to which VM replicas
must be connected.
134 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Use the SourceNetwork
parameter to set the source
network.
NOTE: the number of the
source and the target
networks must be the same.
Specifies the source proxy that
Source will be used by the job. False Named False False
Proxy
Default: automatic selection.
Specifies the target proxy that
Target will be used by the job. False Named False False
Proxy
Default: automatic selection.
Specifies the WAN accelerator
configured in the source site
that will be used for data
Source transfer.
WAN False Named False False
Remember to set the pair of
Accelerator
source and target WAN
accelerators.
Default: not set.
Specifies the WAN accelerator
configured in the target site
that will be used for data
Target transfer.
WAN False Named False False
Remember to set the pair of
Accelerator
source and target WAN
accelerators.
Default: not set.
Specifies the number of
restore points that will be
Restore
kept.
Points False Named False False
ToKeep Permitted values: 1 to 28.
Default: 7.
Used for building replica from
backup files.
Source Specifies the backup False Named False False
Repository repository that will be used to
read the VM data from the
already existing backup chain.
Specifies the re-IP rules.
ReIpRule Accepts VBRViReplicaReIpRule False Named False False
object.
Specifies the disks that you
want to replicate: Source,
DiskType Thick, Thin. False Named False False
Default: same as source.
135 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds a new job named "DC Replication Job" replicating a VM named "DC".
• The VM to replicate is obtained with Find-VBRViEntity and piped down.
• The server and the resource pool to locate the replica are obtained with Get-VBRServer and
Find-VBRViResourcePool and assigned to the $server and $pool variables accorgingly
beforehand.
• The replica is created with the suffix "_replicated".
• The description of the job is "DC Replication Job".
Find-VBRViEntity -Name "DC" | Add-VBRViReplicaJob -Name "DC
Replication Job" -Server $server -ResourcePool $pool -Suffix
"_replicated"
Example 2
This command creates a new job named "DC Replication Job" replicating a VM represented by the
$vm variable.
• The VM to replicate is obtained with Find-VBRViEntity and assigned to the variable
beforehand.
• The server where the replica will reside is obtained with Get-VBRServer and assigned to the
$server variable beforehand.
• The datastore and the resource pool to locate the replica are obtained with Find-
VBRViDatastore and Find-VBRViResourcePool and assigned to the $datastore and $pool
variables accorgingly beforehand.
• The replica is created with the suffix "_replicated".
• The description of the job is "DC Replication Job".
Add-VBRViReplicaJob -Name "DC Replication Job" -Server $server -
Entity $vm -Datastore $datastore -ResourcePool $pool -Suffix
"_replicated" -Description "DC Replication Job"
136 | Veeam Backup PowerShell |REFERENCE| REV 2
Copy-VBRJob
Short Description
Clones an existing job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Copy-VBRJob [-Job] <CBackupJob[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet clones an existing job. You can use the cloned job, for example, as a template, as it retains
all settings of the primary job. The cloned job is created with the name of the primary job with
'_clone<clone sequence number>' suffix.
You can run this cmdlet with backup, replication and copy jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the job you want to (ByValue,
Job True 1 False
clone. ByProperty
Name)
Specifies a new backup
Repository repository that will be used by False Named False False
the cloned job as a target.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
137 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command clones the jobs named "DHCP Replica Job" and "DHCP Backup Job". The jobs are
obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "DHCP Replica Job", "DHCP Backup Job" | Copy-
VBRJob
Example 2
This command clones the job represented by the $job variable. The job is obtained with Get-VBRJob
and assigned to the variable beforehand.
Copy-VBRJob -Job $job
138 | Veeam Backup PowerShell |REFERENCE| REV 2
Disable-VBRJob
Short Description
Puts a selected job on hold.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Disable-VBRJob -Job <CBackupJob[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet puts a selected job on hold. The job and its settings are not deleted from Veeam Backup &
Replication. You can enable the job at any time by running Enable-VBRJob.
You can run this cmdlet with backup, replication and copy jobs.
Run Stop-VBRJob to stop the job once without disabling it.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to True
disable. (ByValue,
Job True Named False
You can assign multiple jobs to ByProperty
this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
139 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command disables jobs named "Backup Job 01" and "Backup Job 02".The jobs object is obtained
with Get-VBRJob and piped down.
Get-VBRJob -Name "Backup Job 01", "Backup Job 02" | Disable-
VBRJob
Example 2
This command disables the job represented by the $job variable. The job object is obtained with Get-
VBRJob and assigned to the variable beforehand.
Disable-VBRJob -Job $job
140 | Veeam Backup PowerShell |REFERENCE| REV 2
Disable-VBRJobGuestFSIndexing
Short Description
Disables job guest file system indexing option.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Disable-VBRJobGuestFSIndexing [-Job] <CBackupJob[]>
[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet disables guest file system indexing in the selected job. The guest file system indexing
settings are not deleted.
Guest file system indexing is cataloging the guest VM files during the backup. Indexing helps you
recognize files stored on guest VM. If you backup your VMs without guest file system indexing option,
you will not be able to perform guest OS files restore.
You can run this cmdlet with backup, replication and copy jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to True
edit. (ByValue,
Job True 1 False
You can assign multiple backup ByProperty
jobs to this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
141 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command disables the guest file system indexing option in jobs named "Backup Job 01" and
"Backup Job 02". The jobs object is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Backup Job 01", "Backup Job 02" | Disable-
VBRJobGuestFSIndexing
Example 2
This command disables the guest file system indexing option in the job represented by the $job
variable. The job object is obtained with Get-VBRJob and assigned to the variable beforehand.
Disable-VBRJobGuestFSIndexing -Job $job
142 | Veeam Backup PowerShell |REFERENCE| REV 2
Disable-VBRJobSchedule
Short Description
Disables job schedule.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Disable-VBRJobSchedule -Job <CBackupJob[]> [-WarningAction
<ActionPreference>] [-WarningVariable
<String>][<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet disables job schedule. The schedule settings are not deleted. When you disable a job
schedule, you can launch the job manually by running Start-VBRJob.
You can run this cmdlet with backup, replication and copy jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job(s) you want to True
disable. (ByValue,
Job True Named False
You can assign multiple backup ByProperty
jobs to this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
143 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command disables the job named "Backup Job 01". The job object is obtained with Get-VBRJob
and piped down.
Get-VBRJob -Name "Backup Job 01" | Disable-VBRJobSchedule
Example 2
This command disables the job represented by the $job variable. The job object is obtained with Get-
VBRJob and assigned to the variable beforehand.
Disable-VBRJobSchedule -Job $job
144 | Veeam Backup PowerShell |REFERENCE| REV 2
Disable-VBRJobVSSIntegration
Short Description
Disables job VSS settings.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Disable-VBRJobVSSIntegration [-Job] <CBackupJob[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet disables the VSS settings in the selected job. The VSSs settings are not deleted form the
job.
VSS (Volume Shadow Services) is a Windows OS service allowing to copy files of running applications
that can be modified at the moment of copying. The VSS-aware applications typically are Active
Directory, Microsoft SQL, Microsoft Exchange, Sharepoint, etc. To create a transactionally consistent
backup of a VM running VSS-aware applications without shutting them down, Veeam Backup &
Replication uses application-aware image processing. It allows backup the data fully and consistently.
You can run this cmdlet with backup, replication and copy jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to True
edit. (ByValue,
Job True 1 False
You can assign multiple jobs to ByProperty
this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
145 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command disables the VSS options in jobs named "Backup Job 01" and "Backup Job 02". The jobs
object is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Backup Job 01", "Backup Job 02" | Disable-
VBRJobVSSIntegration
Example 2
This command disables the VSS options in job represented by the $job variable. The job object is
obtained with Get-VBRJob and assigned to the variable beforehand.
Disable-VBRJobVSSIntegration -Job $job
146 | Veeam Backup PowerShell |REFERENCE| REV 2
Enable-VBRJob
Short Description
Enables a disabled job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Enable-VBRJob -Job <CBackupJob[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
a[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet enables a disabled job. When you disable a job, you put it on hold until you enable it with
this cmdlet. You can disable a job by running Disable-VBRJob.
You can run this cmdlet with backup, replication and copy jobs.
Run Start-VBRJob to start a job once.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to True
enable. (ByValue,
Job True Named False
You can assign multiple jobs to ByProperty
this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
147 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command enables the jobs named "Backup Job 01" and "Backup Job 02". The backup jobs are
obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Backup Job 01", "Backup Job 02" | Enable-VBRJob
Example 2
This command enables the job represented by the $job variable. The job object is obtained with Get-
VBRJob and assigned to the variable beforehand.
Enable-VBRJob -Job $job
148 | Veeam Backup PowerShell |REFERENCE| REV 2
Enable-VBRJobGuestFSIndexing
Short Description
Enables job guest file system indexing option.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Enable-VBRJobGuestFSIndexing [-Job] <CBackupJob[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet enables guest file system indexing in the selected job.
Guest file system indexing is cataloging the guest VM files during the backup. Indexing helps you
recognize files stored on guest VM. If you backup your VMs without guest file system indexing option,
you will not be able to perform guest OS files restore.
You can enable the guest file system indexing settings in case you have these settings set beforehand.
Use this cmdlet to enable the indexing option that was disabled with Disable-
VBRJobGuestFSIndexing.
You can run this cmdlet with backup and replica jobs including vCloud jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to True
edit. (ByValue,
Job True 1 False
You can assign multiple jobs to ByProperty
this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
149 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command enables the guest file system indexing option in jobs named "Backup Job 01" and
"Backup Job 02". The jobs are obtained with Get-VBRJob and piped down.
Get-VBRJob -Name Name "Backup Job 01", "Backup Job 02" | Enable-
VBRJobGuestFSIndexing
Example 2
This command enables the guest file system indexing option in the job represented by the $job
variable. The job object is obtained with Get-VBRJob and assigned to the variable beforehand.
Enable-VBRJobGuestFSIndexing -Job $job
150 | Veeam Backup PowerShell |REFERENCE| REV 2
Enable-VBRJobSchedule
Short Description
Enables job schedule.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Enable-VBRJobSchedule -Job <CBackupJob[]> [-WarningAction
<ActionPreference>][-WarningVariable
<String>][<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet enables job schedule.
You can enable the job schedule in case you have the schedule set beforehand. Use this cmdlet to
enable the job schedule that was disabled with Disable-VBRJobSchedule.
You can run this cmdlet with any kind of jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job(s) you want to True
edit. (ByValue,
Job True Named False
You can assign multiple jobs to ByProperty
this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
151 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command enables the schedule for jobs named "Backup Job 01" and "File Copy Job 02". The jobs
are obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Backup Job 01", "File Copy Job 02" | Enable-
VBRJobSchedule
Example 2
This command enables the schedule for job represented by the $"Backup Job 01" variable. The job
object is obtained with Get-VBRJob and assigned to the variable beforehand.
Enable-VBRJobSchedule -Job $"Backup Job 01"
152 | Veeam Backup PowerShell |REFERENCE| REV 2
Enable-VBRJobVSSIntegration
Short Description
Enables job VSS settings.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Enable-VBRJobVSSIntegration [-Job] <CBackupJob[]>
[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet enables the VSS settings in the selected job.
VSS (Volume Shadow Services) is a Windows OS service allowing to copy files of running applications
that can be modified at the moment of copying. The VSS-aware applications typically are Active
Directory, Microsoft SQL, Microsoft Exchange, Sharepoint, etc. To create a transactionally consistent
backup of a VM running VSS-aware applications without shutting them down, Veeam Backup &
Replication uses application-aware image processing. It allows backup the data fully and consistently.
You can enable the VSS settings in case you have these settings set beforehand. Use this cmdlet to
enable the VSS settings that were disabled with Disable-VBRJobVSSIntegration.
You can run this cmdlet with backup and replica jobs including vCloud jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to True
edit. (ByValue,
Job True 1 False
You can assign multiple jobs to ByProperty
this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
153 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command enables the VSS option in the job named "Backup Job 01" and "Backup Job 02". The
jobs are obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Backup Job 01", "Backup Job 02" | Enable-
VBRJobVSSIntegration
Example 2
This command enables the VSS option in the job represented by the $"Backup Job 01" variable. The
job object is obtained with Get-VBRJob and assigned to the variable beforehand.
Enable-VBRJobVSSIntegration -Job $"Backup Job 01"
154 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRHvServerNetworkInfo
Short Description
Returns virtual networks for a Hyper-V host.
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRHvServerNetworkInfo -Server <CHost> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRServer
Detailed Description
This cmdlet returns a list of all virtual networks to which a selected Hyper-V host is connected.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the Hyper-V
host for which you True (by Value
want to get the list of FromPipeline,
Server networks. True Named True
ValueFromPipeline
Accepts CHost object ByPropertyName)
or string (host name).
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
155 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the list of networks of the host represented by the '$server' variable. The host
is obtained with Get-VBRServer and assigned to the variable beforehand.
PS C:\PS> $server = Get-VBRServer -Type HvServer -Name
"srv01.veeam.local"
PS C:\PS> Get-VBRHvServerNetworkInfo -Server $server
Example 2
This command looks for the list of networks to which the "01Veeam.Local" host is connected. The host
is obtained with Get-VBRServer and piped down.
Get-VBRServer -Type HvServer -Name "srv01.veeam.local" | Get-
VBRHvServerNetworkInfo
156 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRJob
Short Description
Returns existing jobs.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRJob [-Name <String[]>] [-WarningAction <ActionPreference>]
[-WarningVariable <String>] [<CommonParameters>]
Detailed Description
This cmdlet returns the list of jobs stored in Veeam Backup & Replication database.
With this cmdlet, you can get the following jobs:
• Backup Jobs
• Replication Jobs
• Backup Copy Jobs
• VM Copy Jobs
• File Copy Jobs
You can get the list of all jobs or look for instances directly by name.
Run Get-VBRBackupSession or Get-VBRTaskSession to get the information on job session or session
tasks.
Run Get-VBRTapeJob to get tape jobs.
Run Get-VSBJob to get SureBackup jobs.
Run Get-VBREPJob to get Endpoint backup jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the job you
want to get, or search conditions.
Name False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
157 | Veeam Backup PowerShell |REFERENCE| REV 2
Example
This command gets the list of backup copy jobs.
Get-VBRJob -Name *Backup Copy Job*
158 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRJobObject
Short Description
Returns objects in a specified job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRJobObject [-Job] <CBackupJob> [-Name <String[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet returns the list of objects in a specified job. The job objects are VMs, VM containers,
datastores or resource pools.
You can run this cmdlet for backup, replication, backup copy, VM copy or file copy jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the job you want to (ByValue,
Job True 1 False
get the objects of. ByProperty
Name)
Specifies the name of the job
object (i.e. a VM) you want to
Name get, or search conditions. False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
159 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the SharePoint VMs in the job named "VM Copy Job 01". The job is obtained
with Get-VBRJob and piped down.
Get-VBRJob -Name "VM Copy Job 01" | Get-VBRJobObject -Name
*SharePoint*
Example 2
This command looks for the VM named "SharePoint" in the job represented by the $job variable. The
job is obtained with Get-VBRJob and assigned to the variable beforehend.
Get-VBRJobObject -Job $job -Name "SharePoint"
160 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRJobObjectVssOptions
Short Description
Returns VSS settings of a specific VM in job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRJobObjectVssOptions [-ObjectInJob] <CObjectInJob> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJobObject
Detailed Description
This cmdlet returns the list of VSS settings set for a specific VM in 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.
Run Get-VBRJobVSSOptions to get the list of VSS options of a specific job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the VMs or VM
(ByValue,
ObjectInJob containers for which you want True 1 False
ByProperty
to get VSS options.
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
161 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the VSS settings of the first VM included in job named "Exchange Backup
Copy". The job to look for the VM in is obtained with Get-VBRJob and piped down. The VM is obtained
with Get-VBRJobObject by selecting the first VM in the job object list and piped down.
Get-VBRJob -Name "Exchange Backup Copy" | Get-VBRJobObject |
Select -First 1 | Get-VBRJobObjectVssOptions
Example 2
This command looks for the VSS settings of the VM represented by the $vm variable. The VM is
obtained with Get-VBRJobObject and assigned to the variable beforehand.
Get-VBRJobObjectVssOptions -ObjectInJob $vm
162 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRJobOptions
Short Description
Returns job settings for a selected job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRJobOptions [-Job] <CBackupJob[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet returns the list of job settings for a selected job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the job you want to (ByValue,
Job True 1 False
get the options of. ByProperty
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of options of the job named "Fileserver Replica". The job is obtained
with Get-VBRJob and piped down.
Get-VBRJob -Name "Fileserver Replica" | Get-VBRJobOptions
Example 2
This command looks for the list of options of the job represented by the $"Fileserver Replica" variable.
The job is obtained with Get-VBRJobObject and assigned to the variable beforehand.
Get-VBRJobOptions -Job $"Fileserver Replica Job"
163 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRJobScheduleOptions
Short Description
Returns scheduling settings for a selected job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRJobScheduleOptions [-Job] <CBackupJob[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet returns a list of job scheduling options for a selected job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the job you want to (ByValue,
Job True 1 False
get the scheduling options of. ByProperty
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of schedulling options of the job named "ActiveDirectory Copy Job".
The job is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "ActiveDirectory Copy Job" | Get-
VBRJobScheduleOptions
Example 2
This command looks for the list of options of the job represented by the $"ActiveDirectory Copy Job"
variable. The job is obtained with Get-VBRJobObject and assigned to the variable beforehand.
Get-VBRJobScheduleOptions -Job $"ActiveDirectory Copy Job"
164 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRJobVSSOptions
Short Description
Returns VSS settings for a selected job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRJobVSSOptions [-Job] <CBackupJob[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet returns the list of VSS settings for a selected job.
Run Get-VBRJobObjectVssOptions to get the list of VSS options set for specific objects in a job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the job you want to (ByValue,
Job True 1 False
get the VSS options of. ByProperty
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of VSS options of the job named "ActiveDirectory Backup". The job is
obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "ActiveDirectory Backup" | Get-VBRJobVSSOptions
Example 2
This command looks for the list of options of the job represented by the $ad_backup variable. The job
is obtained with Get-VBRJobObject and assigned to the variable beforehand.
Get-VBRJobVSSOptions -Job $ad_backup
165 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRReplica
Short Description
Returns VM replicas.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRReplica [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet returns the list of VM replicas managed by Veeam Backup & Replication. You can look for
all VM replicas or for replicas created by a particular replication job.
With this cmdlet, you call get the replicas that are managed by your backup console. In case you have
removed some replicas from the Veeam Backup console, but they remain on disk, you will not be able
to get them.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the
replication job you want to get, or
Name search conditions. False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for all replicas managed by Veeam Backup & Replication.
Get-VBRReplica
Example 2
This command looks for the replicas created with the "DC Replica" replication job.
Get-VBRReplica -Name "DC Replica"
166 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRViReplicaReIpRule
Short Description
Returns job re-IP rules.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRViReplicaReIpRule -Job <CBackupJob> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet returns the list of re-IP rules configured for a selected replication job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the
replication job for
which you want to get True (by Value
the list of the re-IP FromPipeline,
Job True Named False
rules. ValueFromPipeline
ByPropertyName)
Accepts CBackupJob
object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
167 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the re-IP rules set for the 'Backup Copy Job 1' job. The job is obtained with
Get-VBRJob and piped down.
Get-VBRJob -Name "Backup Copy Job 1" | Get-VBRViReplicaReIpRule
Example 2
This command looks for the re-IP rules set for the job represented by the '$job' variable. The job is
obtained with Get-VBRJob and assigned to the variable beforehand.
Get-VBRViReplicaReIpRule -Job $job
168 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRViServerNetworkInfo
Short Description
Returns virtual networks for a VMware host.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRViServerNetworkInfo -Server <CHost> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRServer
Detailed Description
This cmdlet returns the list of all virtual networks to which a selected VMware host is connected.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the VMware
host for which you True (by Value
want to get the list of FromPipeline,
Server networks. True Named True
ValueFromPipeline
Accepts CHost object ByPropertyName)
or string (host name).
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
169 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the list of networks of the 'srv01.veeam.local' host. The host is obtained with
Get-VBRServer and assigned to the '$server' variable.
PS C:\PS> $server = Get-VBRServer -Type ESX -Name
"srv01.veeam.local"
PS C:\PS> Get-VBRViServerNetworkInfo -Server $server
Example 2
This command looks for the list of networks to which the 'srv01.veeam.local' host is connected. The
host is obtained with Get-VBRServer and piped down.
Get-VBRServer -Type ESX -Name "srv01.veeam.local" | Get-
VBRViServerNetworkInfo
Example 3
This command looks for a particular network that is connected to the 'srv01.veeam.local' host.
• The host is obtained with Get-VBRServer and piped down. The obtained array of networks is
assigned to the '$networks'.
• The needed network is obtained by addressing the index of the corresponding element of
the array and assigned to the '$targetnet' variable.
$networks = Get-VBRServer -Type ESX -Name "srv01.veeam.local" |
Get-VBRViServerNetworkInfo
$targetnet = $networks[5]
170 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRJobOptions
Short Description
Sets job options.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
New-VBRJobOptions [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
New-VBRJobOptions [-ForBackupJob] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
New-VBRJobOptions [-ForReplicaJob] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet lets you edit job settings of backup jobs, replication jobs or selected VMs.
This cmdlet returns the CJobOptions object containing the default settings of the job you want to
edit. You can customize any setting that you want to apply to the job. This object is then used in the
Set-VBRJobOptions cmdlet.
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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Returns the list of the default
ForBackupJob False Named False False
settings for backup job.
Returns the list of the default
ForReplicaJob False Named False False
settings for replication job.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
171 | Veeam Backup PowerShell |REFERENCE| REV 2
Example
This command schedules the job named "Backup Job 1" to running every 2 hours.
• The object with scheduling settings is assigned to the $NewScheduleOption variable. The
"OptionsPeriodically" parameter is set to $True and its value is set to 120 (minutes).
• The job to apply the schedule is obtained with Get-VBRJob and assigned to the $job variable.
• The object is then applied to the job by running Set-VBRJobScheduleOptions with these two
variables.
$NewScheduleOption = New-VBRJobScheduleOptions
$NewScheduleOption.OptionsPeriodically.Enabled = $True
$NewScheduleOption.OptionsPeriodically.FullPeriod = 120
$Job = Get-VBRJob -Name "Backup Job 1"
Set-VBRJobScheduleOptions -Job $Job -Options $NewScheduleOption
172 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRJobScheduleOptions
Short Description
Sets job schedule options.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
New-VBRJobScheduleOptions [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Detailed Description
This cmdlet lets you edit scheduling settings of jobs.
This cmdlet returns the ScheduleOptions object containing the default scheduling settings of the job
you want to edit. You can customize any setting that you want to apply to the job. This object is then
used in the Set-VBRJobScheduleOptions cmdlet.
You can use the ScheduleOptions object with backup, replication or copy jobs.
173 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRJobVssOptions
Short Description
Sets job VSS options.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
New-VBRJobVssOptions [-ForJob] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
New-VBRJobVssOptions [-ForObject] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
New-VBRJobVssOptions [-ForReplicaJob] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet lets you edit VSS settings of backup jobs, replication jobs or selected VMs.
VSS (Volume Shadow Services) is a Windows OS service allowing to copy files of running applications
that can be modified at the moment of copying. The VSS-aware applications typically are Active
Directory, Microsoft SQL, Microsoft Exchange, Sharepoint, etc. To create a transactionally consistent
backup of a VM running VSS-aware applications without shutting them down, Veeam Backup &
Replication uses application-aware image processing. It allows backup the data fully and consistently.
This cmdlet returns the CVssOptions object containing the VSS settings of the job you want to edit.
You can customize any setting that you want to apply to the job. This object is then used in the Set-
VBRJobVssOptions cmdlet.
You can edit settings of backup jobs (including vCloud backup jobs), Vms or replication jobs by
running this cmdlet with -ForJob, -ForObject or -ForReplicaJob parameters respectively.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Returns the list of the default
ForJob VSS settings for backup, False Named False False
replication or copy job.
Returns the list of the default
ForObject False Named False False
VSS settings for VMs.
Returns the list of the default
ForReplicaJob False Named False False
VSS settings for replication job.
174 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This example helps you get the CVssOptions object with customized VSS settings for a backup job.
• The Enable setting is set to True,
• The GuestFSIndexingType setting is set to "Everyfolders",
• The TransactionLogsTruncation setting is set to Always.
PS C:\PS> New-VBRJobVssOptions
Enabled Is Credentials GuestFS Indexing Transaction Logs
------- --------------- ---------------- ----------------
False False None Never
PS C:\PS> $o=New-VBRJobVssOptions
PS C:\PS> $o.Enabled=$true
PS C:\PS> $o.GuestFSIndexingType="Everyfolders"
PS C:\PS> $o.TransactionLogsTruncation="Always"
PS C:\PS> $o
Enabled Is Credentials GuestFS Indexing Transaction Logs
------- --------------- ---------------- ----------------
True False Everyfolders Always
175 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRViReplicaReIpRule
Short Description
Creates a new replica re-IP rule.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
New-VBRViReplicaReIpRule [-SourceIp <String>] [-SourceMask
<String>] [-TargetIp <String>] [-TargetMask <String>] -
TargetGateway <String> [-DNS <String[]>] [-WINS <String[]>] [-
Description <String>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
None
Detailed Description
This cmdlet creates a VBRViReplicaReIpRule object containing a list of rules for different IP addressing
scheme. This object is then further used for creating or modifying replication jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the IP address or the
IP addressing scheme of the
network in which the source
VM is located. You can use the
Source
asterisk character (*) to specify False Named False False
Ip
a range of IP addresses.
Accepts string type.
Default: 172.16.*.*.
Specifies the mask of the
network in which the source
VM is located. You can use the
Source asterisk character (*) to specify
False Named False False
Mask a range of IP addresses.
Accepts string type.
Default: 255.255.0.0.
Specifies the IP address or the
IP addressing scheme of the
Target network in which the replica False Named False False
Ip VM will be located. You can
use the asterisk character (*)
to specify a range of IP
176 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
addresses.
Accepts string type.
Default: 172.17.*.*.
Specifies the mask of the
network in which the replica
VM will be located. You can
use the asterisk character (*)
Target
to specify a range of IP False Named False False
Mask
addresses.
Accepts string type.
Default: 255.255.0.0.
Specifies the gateway address
of the network in which the
TargetGateway replica VM will be located. True Named False False
Accepts string type.
Specifies the DNS server
DNS address. False Named False False
Accepts string type.
Specifies the WINS server
WINS address. False Named False False
Accepts string type.
Specifies the description of
the re-IP rule.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
177 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command creates a new re-IP rule. The created object is saved into the '$reiprule' variable.
$reiprule = New-VBRViReplicaReIpRule -SourceIp 172.16.*.* -
SourceMask 255.255.0.0 -TargetIp 172.17.*.* -TargetMask
255.255.0.0 -TargetGateway 172.17.0.1
Example 2
This example shows how to set a re-IP rule to an existing replica job.
• The re-IP rule is assigned to the '$reiprule' variable that was created in the 'Example 1'.
• To set the re-IP rule, the replication job is edited with Set-VBRViReplicaJob. The job is
obtained with Get-VBRJob and assigned to the '$replicajob' variable beforehand.
Set-VBRViReplicaJob -Job $replicajob -EnableReIp -ReIpRule
$reiprule
178 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRJob
Short Description
Removes a selected backup, replication or backup copy job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBRJob [-Job] <CBackupJob[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-
Confirm] [<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet removes a selected backup, replication or backup copy job from Veeam Backup &
Replication console and database.
Run Remove-VSBJob to remove SureBackup jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to True
remove. (ByValue,
Job True 1 False
You can assign multiple jobs to ByProperty
this object. Name)
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the False Named False False
cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm False Named False False
user is sure that they want to
continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
179 | Veeam Backup PowerShell |REFERENCE| REV 2
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
180 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRJobObject
Short Description
Removes VMs or VM containers from the specified job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBRJobObject [-Objects] <CObjectInJob[]>
Related Commands
Get-VBRJobObject
Detailed Description
This cmdlet allows you to remove VMs or VM containers from existing backup, replication or copy job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies objects (VMs and VM
(ByValue,
Objects containers) you want to True 2 False
ByProperty
remove.
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
181 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRReplica
Short Description
Removes a selected replicated VM.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBRReplica [-Backup] <CBackup[]> [-FromDisk] [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRReplica
Detailed Description
This cmdlet removes a selected replicated VM.
You can delete the replica completely, or only remove it from Veeam Backup & Replication managing
console. In the latter case, you will not delete the VM but only stop managing it with Veeam Backup &
Replication; the replica VM will stay on target host.
When replica is created, Veeam Backup & Replication maintains it in sync with the original VM by
running the replication job. When you delete a replica from your managing console, it is no longer
synchronized.
To stop synchronizing a replica without deleting it from the console, you need to stop or delete the
corresponding replication job.
Run Stop-VBRJob or Remove-VBRJob to stop or remove a replication job.
This cmdlet can only remove all VMs in the replication job. If you want to remove some particular VMs,
you need to do it with Veeam user interface.
Note: When you remove a replica from Veeam Backup & Replication console, you can not bring it back by
means of PowerShell. Use replica seeding option in Veeam Backup & Replication console interface to
restore a removed replica in your managing console.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the replica you want to True
remove. (ByValue,
Backup True 1 False
You can assign multiple replicas ByProperty
to this object. Name)
If indicated, the replicated VM
FromDisk will be permanently removed False Named False False
from disk. Otherwise, you only
182 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
exclude the replica from
processing with Veeam Backup
& Replication.
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the cmdlet False Named False False
without actually performing any
action.
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm False Named False False
user is sure that they want to
continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes the replicas named "DC_replica01" and "DC_replica02" from Veeam Backup &
Replication. The replicated VMs are obtained with Get-VBRReplica and piped down.
Get-VBRReplica -Name "DC_replica01", "DC_replica02" | Remove-
VBRReplica
Example 2
This command removes the replicas named "DC_replica01" and "DC_replica02" from disk. The
replicated VMs are obtained with Get-VBRReplica and piped down.
Get-VBRReplica -Name "DC_replica01", "DC_replica02" | Remove-
VBRReplica -FromDisk
Example 3
This command removes the replicated VM represented by the $replica variable from disk. The
replicated VM is obtained with Get-VBRReplica and assigned to the variable beforehand.
$replica | Remove-VBRReplica -FromDisk
183 | Veeam Backup PowerShell |REFERENCE| REV 2
Reset-HvVmChangeTracking
Short Description
Clears change tracking data for a specific VM or specific virtual disk (VHD).
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Reset-HvVmChangeTracking [-Server] <CHost> [-VMName <String>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Reset-HvVmChangeTracking [-Server] <CHost> [-VhdPath <String>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRServer
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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the server hosting the
Server VM for which you want to reset True 2 False False
change tracking data.
Specifies the VM for which you
VMName want to reset change tracking False Named False False
data.
Specifies the virtual disk (VHD) for
VhdPath which you want to reset change False Named False False
tracking data.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
184 | Veeam Backup PowerShell |REFERENCE| REV 2
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"
185 | Veeam Backup PowerShell |REFERENCE| REV 2
Reset-VBRJobOptions
Short Description
Sets job settings to default.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Reset-VBRJobOptions -Job <CBackupJob> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
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. Run Reset-VBRJobVssOptions to clear the job VSS settings. Run Disable-
VBRJobVSSIntegration or Disable-VBRJobGuestFSIndexing to temporarily disable the application-
aware image processing and guest file system indexing settings.
You can run this cmdlet with any kind of jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the job you want to (ByValue,
Job True Named False
edit. ByProperty
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
186 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command sets default settings to backup jobs named "Fileserver Backup Job 1" and "Fileserver
Backup Job 2". The jobs object is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Fileserver Backup Job 1", "Fileserver Backup
Job 2" | Reset-VBRJobOptions
Example 2
This command sets default settings to the job represented by the $job variable. The job object is
obtained with Get-VBRJob and assigned to the variable beforehand.
Reset-VBRJobOptions -Job $job
187 | Veeam Backup PowerShell |REFERENCE| REV 2
Reset-VBRJobScheduleOptions
Short Description
Sets job schedule settings to default.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Reset-VBRJobScheduleOptions -Job <CBackupJob> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet sets the default scheduling options to the selected job. When you clear the schedulling
options of a job, you need to run the job manually.
You can run this cmdlet with any kind of jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True (ByValue,
Job Specifies job you want to edit. True Named ByProperty True
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command sets default schedule options to backup jobs named "Fileserver Backup Job" and
"Fileserver Copy Job". The jobs object is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Fileserver Backup Job", "Fileserver Copy Job" |
Reset-VBRJobScheduleOptions
Example 2
This command sets default schedule options to the job represented by the $job variable. The job
object is obtained with Get-VBRJob and assigned to the variable beforehand.
Reset-VBRJobScheduleOptions -Job $job
188 | Veeam Backup PowerShell |REFERENCE| REV 2
Reset-VBRJobVssOptions
Short Description
Sets job VSS settings to default.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Reset-VBRJobVssOptions -Job <CBackupJob> [-WarningAction
<ActionPreference>] [-WarningVariable
<String>][<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet clears the custom VSS settings of the specified job and restores their default values.
VSS (Volume Shadow Services) is a Windows OS service allowing to copy files of running applications
that can be modified at the moment of copying. The VSS-aware applications typically are Active
Directory, Microsoft SQL, Microsoft Exchange, Sharepoint, etc. To create a transactionally consistent
backup of a VM running VSS-aware applications without shutting them down, Veeam Backup &
Replication uses application-aware image processing. It allows backup the data fully and consistently.
You can run this cmdlet with any kind of jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the job you want to (ByValue,
Job True Named False
edit. ByProperty
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
189 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command sets default VSS settings to backup jobs named "Fileserver Backup Job 1" and
"Fileserver Backup Job 2". The jobs object is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Fileserver Backup Job 1", "Fileserver Backup
Job 2" | Reset-VBRJobVssOptions
Example 2
This command sets default VSS settings to the job represented by the $job variable. The job object is
obtained with Get-VBRJob and assigned to the variable beforehand.
Reset-VBRJobVssOptions -Job $job
190 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRJobAdvancedBackupOptions
Short Description
Customizes advanced job backup settings.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRJobAdvancedBackupOptions -Job <CBackupJob[]> [-Algorithm
<JobAlgorithms> {ReverseIncremental | Incremental }] [-
TransformFullToSyntethic <bool>] [-TransformIncrementsToSyntethic
<bool>] [-TransformToSyntethicDays <DayOfWeek[]> {Sunday | Monday
| Tuesday | Wednesday | Thursday | Friday | Saturday}] [-
EnableFullBackup <bool>] [-FullBackupDays <DayOfWeek[]> {Sunday |
Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] [-
FullBackupScheduleKind <EFullBackupScheduleKind> {Daily |
Monthly}] [-Months <EMonth[]> {January | February | March | April
| May | June | July | August | September | October | November |
December}] [-DayNumberInMonth <EDayNumberInMonth> {First | Second
| Third | Fourth | Last | OnDay}] [-DayOfWeek <DayOfWeek> {Sunday
| Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}]
[<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet sets advanced backup options for the selected job.
You can select backup method: reverse incremental or incremental, and set schedule settings for
synthetic full backups.
Read more about advanced backup job settings in Veeam Backup & Replication user guide at
http://www.veeam.com/vmware-backup/help-center.
191 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept
Accept
Require Positio Wildcard
Parameter Description Pipeline
d n Character
Input
s
Specifies the job you want True
to edit. (ByValue,
Job True Named ByPropert False
You can assign multiple y
jobs to this object. Name)
Specifies backup method:
ReverseIncremental:
every backup job run
creates a full backup file by
merging a previous full
backup with recent
Algorithm False Named False False
changes.
Incremental: the first job
run creates a full backup
file, and the subsequent
runs backups only the
changed blocks.
Used with incremental
backup method.
If set to TRUE, the full
synthetic backup will be
enabled. Otherwise, you
TransformFull will have to perform full
False Named False False
ToSyntethic backups manually.
Use
TransformToSyntethicDa
ys to set the days to
perform the synthetic full
backups.
Used with incremental
backup method.
If set to TRUE, the previous
Transform full backup chain will be
Increments transformed into the False Named False False
ToSyntethic reversed incremental
backup chain. Otherwise
all created synthetic fulls
will remain on disk. Used
to save disk space.
Specifies days to perform
synthetic fulls: Sunday,
TransformTo
Monday, Tuesday, False Named False False
SyntethicDays
Wednesday, Thursday,
Friday, Saturday.
If set to TRUE, the active
full backup will be
Enable
scheduled. False Named False False
FullBackup
Use the FullBackupDays,
FullBackupScheduleKind
192 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept
Accept
Require Positio Wildcard
Parameter Description Pipeline
d n Character
Input
s
, Months,
DayNumberInMonth and
DayOfWeek parameters
to set the full backup
schedule.
Sets backup schedule.
Specifies days to perform
FullBackupDays the full backup: Sunday, False Named False False
Monday, Tuesday,
Wednesday, Thursday,
Friday, Saturday.
Sets backup schedule.
FullBackup Sets weekly or monthly False Named False False
ScheduleKind period to schedule the full
backup: Daily, Monthly.
Sets backup schedule.
Specifies months to
perform the full backup:
Months January, February, False Named False False
March, April, May, June,
July, August, September,
October, November,
December.
Sets backup schedule.
Specifies the period
condition for the monthly
backup job run: First,
Second, Third, Forth,
DayNumber
Last. False Named False False
InMonth
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:
Sunday, Monday,
Tuesday, Wednesday,
DayOfWeek Thursday, Friday, False Named False False
Saturday. Use this
parameter to set the day
for -NumberInMonth
parameter, i.e. to run the
job on first Saturday every
month.
193 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command 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 obtained with Get-VBRJob, assigned to the variable beforehand and piped down.
$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
194 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRJobAdvancedHvOptions
Short Description
Customizes Hyper-V job settings.
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRJobAdvancedHvOptions -Job <CBackupJob[]> [-
CanDoCrashConsistent <bool>] [-EnableHvQuiescence <bool>] [-
UseChangeTracking <bool>] [-ExcludeSwapFile <bool>]
[<CommonParameters>]
Related Commands
Get-VBRJob
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.
Read more about Hyper-V job settings in Veeam Backup & Replication user guide at
http://www.veeam.com/vmware-backup/help-center.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to True
edit. (ByValue,
Job True Named False
You can assign multiple jobs to ByProperty
this object. Name)
If set to TRUE, the crash
consistent backup will be
CanDoCrash enabled. Otherwise the VM will
be suspended for a short period False Named False False
Consistent
of time.
Default: FALSE.
If set to TRUE, the Hyper-V
quiescence mechanism will be
EnableHv enabled. Use this mechanism if
the application-aware image False Named False False
Quiescence
processing cannot be used.
Default: FALSE.
UseChange If set to TRUE, the changed
False Named False False
Tracking block tracking will be enabled.
195 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Default: TRUE.
If set to TRUE, the swap file will
Exclude be excluded from backup. False Named False False
SwapFile
Default: TRUE.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command 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 and piped down.
Get-VBRJob -Name "Backup Job 01" | Set-VBRJobAdvancedHvOptions -
EnableHvQuiescence $True -CanDoCrashConsistent $True -
UseChangeTracking $True -ExcludeSwapFile $True
196 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRJobAdvancedNotificationOptions
Short Description
Customizes job notification settings.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRJobAdvancedNotificationOptions -Job <CBackupJob[]> [-
SnmpNotification <bool>] [-EmailNotificationAddresses <string>]
[-EmailNotification <bool>] [<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet sets notification options for the selected job.
You can set SNMP and email notifications on job run results.
Important! Email notification can be configured for jobs only in case that the global email notifications are
enabled. Note that you cannot enable the global email notifications with Veeam PowerShell. Read
more about job notification settings in Veeam Backup & Replication user guide at
http://www.veeam.com/vmware-backup/help-center.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to True
edit. (ByValue,
Job True Named False
You can assign multiple jobs to ByProperty
this object. Name)
If set to TRUE, the SNMP
Snmp notification will be sent. You
False Named False False
Notification need to have the SNMP
notification pre-configured.
Email If set to TRUE, the notifications
False Named False False
Notification will be sent to email address(es).
Specifies the email address(es)
Email to send the email notification.
Notification You can specify multiple False Named False False
Addresses addresses separated by
semicolon.
197 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command sets SNMP and email notifications for the backup job named "Backup Job 01". The job
object is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Backup Job 01" | Set-
VBRJobAdvancedNotificationOptions -SnmpNotification $True -
EmailNotification $True -EmailNotificationAddresses
"
[email protected]"
Example 2
This command turns off the previously set email notification for the backup job named "Backup Job
01". The job object is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Backup Job 01" | Set-
VBRJobAdvancedNotificationOptions -EmailNotification $False
198 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRJobAdvancedOptions
Short Description
Customizes advanced job settings.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRJobAdvancedOptions -Job <CBackupJob[]> [-Periodicity
<CDomJobScriptCommand+PeriodicityType>] [-Frequency <UInt32>] [-
Enabled [<Boolean>]] [-Days <DayOfWeek[]>] [-CommandLine
<String>] [-EnablePreScript [<Boolean>]] [-PreJobScript <String>]
[-EnableIntegrityChecks [<Boolean>]] [-RetainDays <Int32>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
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.
Read more about advanced job settings in Veeam Backup & Replication user guide at
http://www.veeam.com/vmware-backup/help-center.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want True
to edit. (ByValue,
Job True Named False
You can assign multiple jobs ByProperty
to this object. Name)
Enable If set to TRUE, automatic
Integrity backup integrity check will False Named False False
Checks be enabled. Integrity check
process verifies the full
199 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
backup file integrity to
avoid data corruption.
Otherwise integrity check in
not performed.
Default: TRUE.
Specifies the integer setting
the number of days to keep
backup data for deleted
RetainDays False Named False False
VMs. If ommited, the data
retention period will be set
to 14 days by default.
Used to execute a user-
defined command after the
job run.
If set to TRUE, the command
set in CommandLine will
be executed after the job
Enabled run. False Named False False
You need to schedule the
command run periodically
with the Periodicity and
Frequency parameters, or
on specific days with the
Days parameter.
Used to execute a user-
defined command after the
job run.
Specifies the command you
want to execute after the
job run. You can schedule
the command run
Command
periodically with the False Named False False
Line
Periodicity and Frequency
parameters, or on specific
days with the Days
parameter.
Set the Enable parameter to
TRUE to enable the
command execution.
Indicates that a custom
script must be run before
EnablePreScript the job. Use the
PreJobScript parameter to
specify the script.
Used to specify the script
you want to run before job
PreJobScript
for the EnablePreJobScript
parameter.
Used to set command run
Periodicity schedule. False Named False False
Specifies the command run
200 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
schedule type:
Cycles: the command will
be executed in periods set
with -Frequency parameter,
Days: the command will be
executed on the days
specified with -Days
parameter.
Used to set command run
schedule to Cycle.
Specifies the integer setting
the number of the backup
job runs after which the
command will be executed.
Frequency To set the command run to False Named False False
cycle run, set the
Periodicity parameter to
Cycle.
You can also set the daily
schedule with the Days
parameter.
Used to set command run
schedule to Days.
Specifies the days to run the
command: Sunday,
Monday, Tuesday,
Days False Named False False
Wednesday, Thursday,
Friday, Saturday.
You can also set the cycle
schedule with the
Frequency parameter.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
201 | Veeam Backup PowerShell |REFERENCE| REV 2
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 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 and piped down.
Get-VBRJob -Name "Backup Job 01" | Set-VBRJobAdvancedOptions -
EnableIntegrityChecks -Enabled $True -CommandLine "report.exe" -
Periodicity Cycles -Frequency 5
202 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRJobAdvancedStorageOptions
Short Description
Customizes advanced job storage settings.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRJobAdvancedStorageOptions -Job <CBackupJob[]> [-
EnableDeduplication [<Boolean>]] [-CompressionLevel <Int32>] [-
StorageBlockSize <EKbBlockSize>] [-WarningAction
<ActionPreference>] [-WarningVariable
<String>][<CommonParameters>]
Related Commands
Get-VBRJob
Get-VBREncryptionKey
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.
Read more about job storage settings in Veeam Backup & Replication user guide at
http://www.veeam.com/vmware-backup/help-center.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to True
edit. (ByValue,
Job True Named False
You can assign multiple jobs ByProperty
to this object. Name)
If set to TRUE, the data will be
deduplicated during the
Enable backup job run
False Named False False
Deduplication (recommended). Otherwise,
no data will be checked for
duplication.
Specifies the compression
level for the created backup:
Compression AUTO _COMPRESSION _LEVEL
False Named False False
Level = -1,
NONE _COMPRESSION _LEVEL
= 0,
203 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
DEDUPE _COMPRESSION
_LEVEL = 4,
OPTIMAL _COMPRESSION
_LEVEL = 5,
HIGH _COMPRESSION _LEVEL
= 6,
EXTREME _COMPRESSION
_LEVEL = 9
Default: OPTIMAL.
Specifies the integer defining
the data blocks size. Larger
sized blocks provide faster
procession but lower
deduplication level.
0 = KbBlockSize256,
Storage 1 = KbBlockSize512, False Named False False
BlockSize
3 = KbBlockSize1024,
4 = KbBlockSize2048,
5 = KbBlockSize4096,
6 = KbBlockSize8192,
7= Automatic.
Indicates if the job must use
Enable encryption. Use the
False Named False False
Encryption EncryptionKey parameter to
specify the encryption key.
Used to specify the
encryption key for the
Encryption EnableEncryption False Named False False
Key parameter.
Accepts PSCryptoKey object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
204 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command edits advanced storage settings for the backup jobs named "Backup Job 01" and
"Backup Job 02".
• 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.
The jobs are obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Backup Job 01", "Backup Job 02" | Set-
VBRJobAdvancedStorageOptions -EnableDeduplication $TRUE -
CompressionLevel 0 -StorageBlockSize 7
Example 2
This command applies the optimal compression level (=5) to all jobs. The jobs are obtained with Get-
VBRJob and piped down.
Get-VBRJob | Set-VBRJobAdvancedStorageOptions -CompressionLevel 5
205 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRJobAdvancedViOptions
Short Description
Customizes VMware job settings.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRJobAdvancedViOptions -Job <CBackupJob[]> [-ExcludeSwapFile
[<Boolean>]] [-VmAttributeName <String>] [-
SetResultsToVmAttribute [<Boolean>]] [-EnableChangeTracking
[<Boolean>]] [-UseChangeTracking [<Boolean>]] [-VMToolsQuiesce
[<Boolean>]] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRJob
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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you
want to edit. True (by Value
FromPipeline,
Job You can assign True Named False
ValueFromPipeline
multiple jobs to this ByPropertyName)
object.
If set to TRUE, the
swap file will be
Exclude excluded from False Named False False
SwapFile backup.
Default: TRUE.
VmAttribute Specifies the custom
False Named False False
Name attributes field name.
If set to TRUE, the job
SetResultsTo results will be written
False Named False False
VmAttribute to custom attributes
field of the VM.
If set to TRUE, the
Enable False Named False False
changed block
Change
tracking will be
206 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Tracking enabled.
Default: TRUE.
If set to TRUE, the
changed block
UseChange tracking will be used
even if CBT is disabled False Named False False
Tracking
on the ESX(i) host.
Default: TRUE.
If set to TRUE, the
VMware quiescence
mechanism will be
enabled. Use this
VMTools mechanism if the False Named False False
Quiesce application-aware
processing cannot be
used.
Default: FALSE.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command edits advanced job settings to backup job named "Backup Job 01":
• The VMware quiescence is enabled.
• The changed block data is enabled.
• The CBT is forced to use despite the ESX host settings.
• The swap file is excluded form backup.
The job is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Backup Job 01" | Set-VBRJobAdvancedViOptions -
VMToolsQuiesce $True -EnableChangeTracking $True -
UseChangeTracking $True -ExcludeSwapFile $True
207 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRJobObjectVssOptions
Short Description
Customizes job VSS settings.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRJobObjectVssOptions [-Object] <CObjectInJob> [-Options]
<CVssOptions> [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Set-VBRJobObjectVssOptions [-Object] <CObjectInJob> -Credentials
<CCredentials> [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRJobObject
New-VBRJobVssOptions ([-ForObject])
Get-VBRCredentials
Detailed Description
This cmdlet applies a set of customized VSS settings to the specific objects in job or sets credentials to
authenticate with a specific objects in 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 object. The CVssOptions object is created with the help
of the New-VBRJobVssOptions cmdlet.
Run Set-VBRJobVssOptions to set the VSS options to the whole job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the VMs and VM
(ByValue,
Object containers for which you want True 1 False
ByProperty
to change VSS settings.
Name)
Specifies the option that you
Options True 2 False False
want to change.
208 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the credentials you
Credentials want to use for authenticating True Named False False
with the guest VM.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command applies custom VSS options to the VM named "AD_01" included in the backup job
named "Active Directory Backup". The job object and the VM object are obtained with Get-VBRJob
and Get-VBRJobObject accordingly and piped down. The object containing the set of customized VSS
options is obtained with New-VBRJobVssOptions ([-ForObject] option) and assigned to the $options
variable beforehand.
Get-VBRJob -Name "Active Directory Backup" | Get-VBRJobObject -
Name "AD_01" | Set-VBRJobVssOptions -Options $options
Example 2
This command applies custom VSS options to the VMs running Active Directory represented by the
$"AD_VMs" variable. The VMs object is obtained with Get-VBRJobObject and assigned to the variable
beforehand. The object containing the set of customized VSS options is obtained with New-
VBRJobVssOptions ([-ForObject] option) and assigned to the $options variable beforehand.
Set-VBRJobObjectVssOptions -Object $"AD_VMs" -Options $options
Example 3
This command sets credentials to authenticate with the SQL server included in the SharePoint backup
job. The VM object is obtained with Get-VBRJobObject and piped down. The job object to look for the
VM in is obtained with Get-VBRJob and assigned to the $"SharePoint Backup" variable beforehand.
The credentials record to apply to the VM is obtained with Get-VBRCredentials and assigned to the
$"Administrator" variable beforehand.
Get-VBRJobObject -Job $"SharePoint Backup" -Name "SharePoint_SQL"
| Set-VBRJobObjectVssOptions -Credentials $"Administrator"
Example 4
This command sets credentials to authenticate with the VM represented by the $"SharePoint_SQL"
variable. The VM object is obtained with Get-VBRJobObject and assigned to the variable beforehand.
The credentials record to apply to the VM is obtained with Get-VBRCredentials and assigned to the
$"Administrator" variable beforehand.
Set-VBRJobObjectVssOptions -Object $"SharePoint_SQL" -Credentials
$"Administrator"
209 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRJobOptions
Short Description
Applies custom job settings.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRJobOptions [-Job] <CBackupJob[]> [-Options] <CJobOptions>
[-WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
New-VBRJobOptions
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 New-
VBRJobOptions cmdlet.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the job you want to (ByValue,
Job True 1 False
edit. ByProperty
Name)
Specifies the set of parameters
Options True 2 False False
you want to apply to the job.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
210 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command applies custom settings to the backup job named "Backup Job 01". The job object is
obtained with Get-VBRJob and piped down. The object containing the set of customized options is
obtained with New-VBRJobOptions and assigned to the $options variable beforehand.
Get-VBRJob -Name "Backup Job 01" | Set-VBRJobOptions -Options
$options
Example 2
This command applies custom settings to the backup job represented by the $job variable. The job
object is obtained with Get-VBRJob andassigned to the variable beforehand. The object containing
the set of customized options is obtained with New-VBRJobOptions and assigned to the $options
variable beforehand.
Set-VBRJobOptions -Job $job -Options $options
211 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRJobSchedule
Short Description
Sets job schedule options.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRJobSchedule -Job <CBackupJob[]> [-Daily] [-At <DateTime>]
[-DailyKind <DailyOptions+DailyKinds>] [-Days <DayOfWeek[]>]
[WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Set-VBRJobSchedule -Job <CBackupJob[]> [-At <DateTime>] [-Days
<DayOfWeek[]>] [-Monthly] [-NumberInMonth <EDayNumberInMonth>] [-
Months <EMonth[]>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>][<CommonParameters>]
-OR-
Set-VBRJobSchedule -Job <CBackupJob[]> [-Periodicaly] [-
FullPeriod <Int32>] [-PeriodicallyKind
<PeriodicallyOptions+PeriodicallyKinds>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Set-VBRJobSchedule -Job <CBackupJob[]> [-After] [-AfterJob
<CBackupJob>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRJob
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.
212 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to set True
schedule to. (ByValue,
Job True Named False
You can assign multiple jobs to ByProperty
this object. Name)
Daily:
Daily Sets job schedule to daily run. False Named False False
Specifies the job start time. If not
At set, the job will start at 10:00 by False Named False False
default.
Specifies the days to run the job:
Everyday: the job will run
everyday,
Weekdays: the job will run
DailyKind Monday through Friday, False Named False False
SelectedDays: 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
Days False Named False False
the job.
Monthly:
Specifies the job start time. If not
At set, the job will start at 10:00 by False Named False False
default.
Specifies the day of week to run
the job. Use this parameter to set
Days the day for -NumberInMonth False Named False False
parameter, i.e. to run the job on
first Saturday every month.
Specifies the period condition
for the job run:
First/Second/Third/Forth/Last.
Number
Use this parameter to set the False Named False False
InMonth
condition for the Days
parameter, i.e. to run the job on
first Saturday every month.
Sets job schedule to monthly
Monthly False Named False False
run.
Specifies the months to run the
Months False Named False False
job.
Periodically:
Sets job schedule to periodical
Periodicaly False Named False False
run.
213 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Sets the integer specifying value
for the time period to run the
job.
FullPeriod False Named False False
Use this parameter to set the
value for the PeriodicallyKind
parameter.
Specifies the measurement unit
for the time period:
Hours: the job will run
periodically in number of hours
set in the FullPeriod parameter,
Minutes: the job will run
periodically in number of
Periodically
minutes set in the FullPeriod False Named False False
Kind
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
the FullPeriod parameter.
After this job:
Sets job schedule to run after a
After False Named False False
specific job.
Specifies the job after which you
AfterJob False Named False False
want to run this job.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
214 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command sets a new schedule to jobs named "Backup Job 01" and "Backup Job 05". The jobs are
obtained with Get-VBRJob and piped down. The jobs are scheduled to run daily at 23:00 on weekdays.
Get-VBRJob -Name "Backup Job 01", "Backup Job 05" | Set-
VBRJobSchedule -Daily -At "23:00" -DailyKind Weekdays
Example 2
This command schedules all replication jobs to monthly run. The replication jobs are obtained with
Get-VBRJob and piped down. 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 is
obtained with Get-VBRJob and assigned to the 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 obtained with Get-VSBJob and piped down. The
backup job is obtained with Get-VBRJob and assigned to $job variable beforehand.
Get-VSBJob -Name "SureBackup Job 01" | Set-VBRJobSchedule -After
-AfterJob $job
215 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRJobScheduleOptions
Short Description
Applies customized job scheduling settings to a selected backup, replication or copy job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRJobScheduleOptions [-Job] <CBackupJob[]> [-Options]
<ScheduleOptions> [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRJob
New-VBRJobScheduleOptions
Detailed Description
This cmdlet applies customized scheduling options to a selected backup, replication or copy 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.
Run Set-VSBJobScheduleOptions to set scheduling options to SureBackup job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job for which you
want to change the scheduling True
options. (ByValue,
Job True 1 False
ByProperty
You can assign multiple jobs to Name)
this object.
Specifies the custom scheduling
options.
Options True 2 False False
Accepts the ScheduleOptions
object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
216 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command applies the customized scheduling options to the jobs named "DC Backup" and "DC
File Copy". The jobs are obtained with Get-VBRJob and piped down. The options to apply are set to
the $"Schedule Options" variable beforehand by running New-VBRJobScheduleOptions.
Get-VBRJob -Name "DC Backup", "DC File Copy" | Set-
VBRJobScheduleOptions -Options $"Schedule Options"
Example 2
This command applies the customized scheduling options to the job represented by the $job variable.
The job is obtained with Get-VBRJob and assigned to the variable beforehand. The options to apply
are set to the $"Schedule Options" variable beforehand by running New-VBRJobScheduleOptions.
Set-VBRJobScheduleOptions -Job $job -Options $"Schedule Options"
217 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRJobVssOptions
Short Description
Applies custom VSS settings to a selected job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRJobVssOptions [-Job] <CBackupJob[]> [-Options]
<CGuestProcessingOptions> [<CommonParameters>]
-OR-
Set-VBRJobVssOptions [-Job] <CBackupJob[]> -Credentials
<CCredentials> [<CommonParameters>]
Related Commands
Get-VBRJob
New-VBRJobVssOptions
Get-VBRCredentials
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.
This cmdlet provides two parameter sets:
Applying changes to the job VSS settings.
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 the New-VBRJobVssOptions cmdlet.
Set credentials for the guest OS.
To set the credentials, specify the credentials you want to use for the VMs in the job. The
credentials will be used for all VMs in the job.
Run Set-VBRJobObjectVssOptions to apply VSS settings to specific VMs in job.
218 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the job you want to (ByValue,
Job True 1 False
edit. ByProperty
Name)
Specifies the set of parameters
Options you want to apply to the job. True 2 False False
Accepts the CVssOptions object.
Specifies the credentials you
want to use for authenticating
Credential with the guest VM. True Named False False
Accepts the CCredentials object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command applies custom VSS options to the backup job named "Backup Job 01". The job object
is obtained with Get-VBRJob and piped down. The object containing the set of customized VSS
options is obtained with New-VBRJobVssOptions and assigned to the $options variable beforehand.
Get-VBRJob -Name "Backup Job 01" | Set-VBRJobVssOptions -Options
$options
Example 2
This command applies custom VSS options to the job represented by the $job variable. The job object
is obtained with Get-VBRJob and assigned to the variable beforehand. The object containing the set of
customized VSS options is obtained with New-VBRJobVssOptions and assigned to the $options
variable beforehand.
Set-VBRJobVssOptions -Job $job -Options $options
219 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRViReplicaJob
Short Description
Modifies replication job.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRViReplicaJob -Job <CBackupJob> [-Name <String>] [-Server
<CHost>] [-Entity <IViItem[]>] [-Datastore <CViDatastoreItem>] [-
ResourcePool <CViResourcePoolItem>] [-Folder <CViFolderItem>] [-
Suffix <String>] [-BackupRepository <CBackupRepository>] [-
Description <String>] [-EnableNetworkMapping] [-SourceNetwork
<VBRViNetworkInfo[]>] [-TargetNetwork <VBRViNetworkInfo[]>] [-
SourceProxy <CViProxy[]>] [-TargetProxy <CViProxy[]>] [-
UseWANAccelerator] [-SourceWANAccelerator <CWanAccelerator>] [-
TargetWANAccelerator <CWanAccelerator>] [-RestorePointsToKeep
<Int32>] [-ReplicateFromBackup] [-SourceRepository
<CBackupRepository[]>] [-EnableReIp] [-ReIpRule
<VBRViReplicaReIpRule[]>] [-DiskType <EDiskCreationMode>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Get-VBRServer
Find-VBRViEntity
Find-VBRViDatastore
Find-VBRViResourcePool
Find-VBRViFolder
Get-VBRBackupRepository
Get-VBRViProxy
Get-VBRWANAccelerator
Get-VBRViServerNetworkInfo
New-VBRViReplicaReIpRule
Detailed Description
This cmdlet modifies an existing replication job. To modify settings, you need to enter the
corresponding parameters with new values. The parameters that you omit will remain unchanged.
220 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the replication True (by Value
job you want to modify. FromPipeline,
Job True Named False
Accepts CBackupJob ValueFromPipeline
object. ByPropertyName)
Specifies the string with
Name the name of the created False Named False False
replication job.
Specifies the host where
Server the created replica should True Named False False
be stored.
Specifies the VM(s) that
you want to replicate. True (ByValue,
Entity True Named ByProperty False
You can assign multiple Name)
VMs to this object.
Specifies the datastore to
Datastore which you want to False Named False False
replicate.
Specifies the resource
Resource
pool to which you want to False Named False False
Pool
replicate.
Specifies the folder to
Folder which you want to False Named False False
replicate.
Specifies the suffix that
will be appended to the
name of the VM you are
Suffix replicating. This name will False Named False False
be used to register the
replicated VM on the
target server.
Specifies the backup
Backup repository which will be
False Named False False
Repository used to store replica
metadata files.
Specifies the description
of the new job.
Description If not set, Veeam Backup False Named False False
& Replication will enter
date and time of creation
by default.
Indicates that the network
mapping is used. Use the
Enable
SourceNetwork and the
Network False Named False False
TargetNetwork
Mapping
parameters to set the
network mapping rules.
221 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Used to set the source
network for the
EnableNetworkMapping
parameter.
Specifies the production
network to which VMs
added to the job are
Source connected. False Named False False
Network
Use the TargetNetwork
parameter to set the
target network.
NOTE: the number of the
source and the target
networks must be the
same.
Used to set the target
network for the
EnableNetworkMapping
parameter.
Specifies the network in
the DR site to which VM
replicas must be
Target connected. False Named False False
Network
Use the SourceNetwork
parameter to set the
source network.
NOTE: the number of the
source and the target
networks must be the
same.
Specifies the source proxy
Source
that will be used by the False Named False False
Proxy
job.
Specifies the target proxy
Target
that will be used by the False Named False False
Proxy
job.
Indicates that the data
must be transferred via
WAN accelerators.
UseWAN Use the
SourceWANAccelerator False Named False Fals
Accelerator
and
TargetWANAccelerator
parameters to set the pair
of WAN accelerators.
Specifies the WAN
Source
accelerator configured in
WAN False Named False False
the source site that will be
Accelerator
used for data transfer.
Target Specifies the WAN False Named False False
WAN accelerator configured in
222 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Accelerator the target site that will be
used for data transfer.
Specifies the number of
Restore restore points that will be
Points kept. False Named False False
ToKeep
Permitted values: 1 to 28.
Specifies the backup
repository that will be
Source
used to read the VM data False Named False False
Repository
from the already existing
backup chain.
Indicates that the re-IP
rules must be used. Use
EnableReIp False Named False False
the ReIpRule parameter to
set the re-IP rules.
Specifies the re-IP rules.
ReIpRule Accepts False Named False False
VBRViReplicaReIpRule
object.
Specifies the disks that
DiskType you want to replicate: False Named False False
Source, Thick, Thin.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
223 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRJob
Short Description
Starts backup, replication or copy job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRJob [-Job] <CBackupJob[]> [-FullBackup] [-RetryBackup]
[-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet allows you to start a created or stopped backup, replication or copy job.You can start the
job for an ordinary run, or force a full backup, or set the job to try to restart in case it fails.
When you create a job, you need to run it manually unless you enable a job schedule. Run Set-
VBRJobSchedule to schedule the job to run automatically.
You can start the job for an ordinary run, or force a full backup, or set the job to try to restart in case it
fails.
Run Stop-VBRJob to stop a running job.
Run Enable-VBRJob to enable a disabled job.
Run Start-VSBJob to start a SureBackup job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to True
start. (ByValue,
Job True 1 False
You can assign multiple jobs to ByProperty
this object. Name)
Specify this parameter if you
FullBackup want to perform an active full False Named False False
backup.
Specify this parameter if you
want the job to try to restart in
RetryBackup case it fails. By default, the job False Named False False
automatically tries to restart for
3 times.
RunAsync Indicates that the command False Named False False
returns immediately without
224 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
waiting for the task to
complete.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command starts the jobs named "WebApplications Server Backup" and "Fileserver Copy Job". The
job is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "WebApplications Server Backup", "Fileserver
Copy Job" | Start-VBRJob
Example 2
This command starts the vCloud backup job right after it the job is created. (See Add-VBRvCloudJob
for creating a vCloud job). The RunAsync parameter is set to bring the process to the background.
Add-VBRvCloudJob -Entity $"vCloud Server" -Name "vCloud Server
Backpup" | Start-VBRJob -RunAsync
Example 3
This command starts the job named "WebApplications Server Backup" and requires to perform a full
backup. The job is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "WebApplications Server Backup" | Start-VBRJob -
FullBackup
Example 4
This command starts the job represented by the $job variable. The job is obtained with Get-VBRJob
and assigned to the variable beforehand. The -RetryBackup parameter is set to enable the automatic
retry. The RunAsync parameter is set to bring the process to the background.
Start-VBRJob -Job $job -RetryBackup -RunAsync
225 | Veeam Backup PowerShell |REFERENCE| REV 2
Stop-VBRJob
Short Description
Stops a running backup, replication or copy job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Stop-VBRJob [-Job] <CBackupJob[]> [-RunAsync] [-WarningAction
<ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-
Confirm] [<CommonParameters>]
Related Commands
Get-VBRJob
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 temporarily disable a job.
Run Stop-VSBJob to stop a SureBackup job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job you want to True
stop. (ByValue,
Job True 1 False
You can assign multiple jobs to ByProperty
this object. Name)
Indicates that the command
RunAsync returns immediately without False Named False False
waiting for the task to complete.
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the False Named False False
cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm False Named False False
user is sure that they want to
continue.
226 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command 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"
227 | Veeam Backup PowerShell |REFERENCE| REV 2
Failover and Failback
When you have a replica of a VM, you can use it to fail over to it in case of the original VM malfunction
or for testing.
Migrate to created replicas in case of production host malfunction.
Operations VMware Hyper-V
Perform replica failover:
Fail over a corrupted VM to its replica Start-VBRViReplicaFailover Start-VBRHvReplicaFailover
Undoes the replica failover Stop-VBRReplicaFailover Stop-VBRReplicaFailover
Perform replica failback:
Fails back to the production host Start-VBRViReplicaFailback Start-VBRHvReplicaFailback
Undoes the replica failback Stop-VBRViReplicaFailback Stop-VBRViReplicaFailback
228 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRHvReplicaFailback
Short Description
Performs failback to the production host.
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRHvReplicaFailback -RestorePoint <COib> [-Reason
<String>] [-RunAsync] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [-WhatIf] [-Confirm]
[<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Detailed Description
This cmdlet stars failing back to the production host after failover to its replica.
This cmdlet lets you finalize the replica failover started with Start-VBRViReplicaFailover by switching
back to the production VM with data synchronization.
When you perform failback, you switch back to the original VM on the production site. The failback
process collects all the changes that were made to the replica while you failed over to it, and implies
them to the source VM. This allows you to switch between source and replica VMs without data loss.
To switch back to the production VM and discard the changes made to the replica while failover, start
an undo failover process. In this case you return to the production VM in the state preceeding failover.
Run Stop-VBRReplicaFailover to undo failover.
Undo Failback: If you tried to fail back to the original VM but was unable to, because i.e. it was non-
functional or corrupted, you can undo the failback and return to the working replica. Run Stop-
VBRViReplicaFailback to undo failback.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the replica restore
(ByValue,
RestorePoint point which you want to fail True Named False
ByProperty
back.
Name)
Specifies the reason for
Reason False Named False False
performing a failback.
Indicates that the command
returns immediately without
RunAsync False Named False False
waiting for the task to
complete.
229 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies whether the cmdlet
writes a message that
WhatIf describes the effects of
running the cmdlet without
actually performing any action.
Specifies whether the cmdlet
displays a prompt that asks if
Confirm
the user is sure that they want
to continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command fails back from the VM replica named "WebServer_ replica". The restore point is
obtained with Get-VBRRestorePoint and piped down. The restore points of the VM are filtered with
Sort-Object method by the "creationtime" property to get the most recent one. The reason is
"Configuration recovery". The RunAsync parameter is set to bring the process to the background.
Get-VBRRestorePoint -Name "WebServer_replica" | Sort-Object
$_.creationtime -Descending | Select -First 1 | Start-
VBRHvReplicaFailback -Reason "Configuration recovery" -RunAsync
Example 2
This command fails back from the VM replica represented by the $"WebServer_replica restorepoint"
variable. The restore point is obtained with Get-VBRRestorePoint and assigned to the variable
beforehand. The reason is "Data recovery". The RunAsync parameter is set to bring the process to the
background.
Start-VBRHvReplicaFailback -RestorePoint $"WebServer_replica
restorepoint" -Reason "Data recovery" -RunAsync
230 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRHvReplicaFailover
Short Description
Fails over a corrupted VM to its replica.
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRHvReplicaFailover [-RestorePoint] <COib> [-Reason
<String>] [-RunAsync] [-Planned] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRRestorePoint
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.
In Veeam Backup & Replication, failover is a temporary stage that needs to be finalized:
You can perform failback to recover the original VM on the source host or in a new location.
Failback is used in case you failed over to a DR site that is not intended for continuous
operations, and would like to move the operations back to the production site when the
consequences of a disaster are eliminated.
Run Start-VBRHvReplicaFailback to failback to the original VM.
You can undo failover to switch back to the original VM, revert replication operations and
discard changes made to the working VM replica. In this case you loose all the changes that
were made to the replica while you failed over to it.
Run Stop-VBRReplicaFailover to undo failover. You can also undo planned failover.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the replica restore
Restore (ByValue,
point to which you want to fail True 1 False
Point ByProperty
over.
Name)
Specifies the reason for
Reason False Named False False
performing a failover.
Indicates that the command
RunAsync returns immediately without False Named False False
waiting for the task to complete.
231 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Planned Performs planned failover. False Named False False
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
232 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRViReplicaFailback
Short Description
Fails back to production host.
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRViReplicaFailback -RestorePoint <COib> [-Reason
<String>] [-RunAsync] [-Complete] [-PowerOn] [-WarningAction
<ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-
Confirm] [<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Detailed Description
This cmdlet stars failing back to the production host after failover to its replica.
This cmdlet lets you finalize the replica failover started with Start-VBRViReplicaFailover by switching
back to the production VM with data synchronization.
When you perform failback, you switch back to the original VM on the production site. The failback
process collects all the changes that were made to the replica while you failed over to it, and implies
them to the source VM. This allows you to switch between source and replica VMs without data loss.
To switch back to the production VM and discard the changes made to the replica while failover, start
an undo failover process. In this case you return to the production VM in the state preceeding failover.
Run Stop-VBRReplicaFailover to undo failover.
Undo Failback: If you tried to fail back to the original VM but was unable to, because i.e. it was non-
functional or corrupted, you can undo the failback and return to the working replica. Run Stop-
VBRViReplicaFailback to undo failback.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the replica restore
(ByValue,
RestorePoint point which you want to fail True Named False
ByProperty
back.
Name)
Specifies the reason for
Reason False Named False False
performing a failback.
Indicates that the command
returns immediately without
RunAsync False Named False False
waiting for the task to
complete.
233 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
If set, the failback will be
Complete False Named False False
committed.
If set, the production VM will
be powered on after the
PowerOn failback. Otherwise, you will False Named False False
have to power the VM on
manually.
Specifies whether the cmdlet
writes a message that
WhatIf describes the effects of False Named False False
running the cmdlet without
actually performing any action.
Specifies whether the cmdlet
displays a prompt that asks if
Confirm False Named False False
the user is sure that they want
to continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command fails back from the VM replica named "WebServer_ replica". The restore point is
obtained with Get-VBRRestorePoint and piped down. The restore points of the VM are filtered with
Sort-Object method by the "creationtime" property to get the most recent one. The reason is
"Configuration recovery". The RunAsync parameter is set to bring the process to the background.
Get-VBRRestorePoint -Name "WebServer_replica" | Sort-Object
$_.creationtime -Descending | Select -First 1 | Start-
VBRViReplicaFailback -Reason "Configuration recovery" -RunAsync
Example 2
This command fails back from the VM replica represented by the $"WebServer 01_replica
restorepoint" variable. The restore point is obtained with Get-VBRRestorePoint and assigned to the
variable beforehand. The reason is "Data recovery". The RunAsync parameter is set to bring the
process to the background.
Start-VBRViReplicaFailback -RestorePoint $"WebServer_replica
restorepoint" -Reason "Data recovery" -RunAsync
234 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRViReplicaFailover
Short Description
Fails over a corrupted VM to its replica.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRViReplicaFailover [-RestorePoint] <COib> [-Reason
<String>] [-RunAsync] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [-WhatIf] [-Confirm]
[<CommonParameters>]
-OR-
Start-VBRViReplicaFailover [-RestorePoint] <COib> [-Reason
<String>] [-RunAsync] [-Definite] [-WarningAction
<ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-
Confirm] [<CommonParameters>]
-OR-
Start-VBRViReplicaFailover [-RestorePoint] <COib> [-Reason
<String>] [-RunAsync] [-Planned] [-WarningAction
<ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-
Confirm] [<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Detailed Description
This cmdlet allows you fail over a corrupted VM to its successfully created replica.
This cmdlet provides 3 parameter sets for the following operations:
Performing failover. 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.
Performing permanent failover. You can perform the permanent failover to permanently move your
workload to the target host if the source is nonrecoverable. Your target host should have adequate
resources. The replica starts acting like source in this case.
Performing planned failover. In this case, the source VM is powered off properly, and the replica is fully
synchronized before the failover. The planned failover is used for maintenance or in other cases of
planned downtime.
235 | Veeam Backup PowerShell |REFERENCE| REV 2
In Veeam Backup & Replication, failover is a temporary stage that needs to be finalized. In case your
primary VM is unrecoverable, you can perform the permanent failover with this cmdlet. In case you
plan to switch to the replica temporarily, you need to take the following steps:
You can perform failback to recover the original VM on the source host or in a new location.
Failback is used in case you failed over to a DR site that is not intended for continuous
operations, and would like to move the operations back to the production site when the
consequences of a disaster are eliminated.
Run Start-VBRViReplicaFailback for VMware or Start-VBRHvReplicaFailback for Hyper-V to
failback to the original VM.
You can undo failover to switch back to the original VM, revert replication operations and
discard changes made to the working VM replica. In this case you loose all the changes that
were made to the replica while you failed over to it.
Run Stop-VBRReplicaFailover to undo failover.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the replica restore
Restore (ByValue,
point to which you want to fail True 1 False
Point ByProperty
over.
Name)
Specifies the reason for
Reason False Named False False
performing a failover.
Indicates that the command
RunAsync returns immediately without False Named False False
waiting for the task to complete.
Definite Performs permanent failover. False Named False False
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the False Named False False
cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm False Named False False
user is sure that they want to
continue.
Definite Performs permanent failover. False Named False False
Planned Performs planned failover. False Named False False
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
236 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command fails over to the VM replica named "WebServer_ replica" to its latest restore point. The
restore point is obtained with Get-VBRRestorePoint and piped down. The restore points of the VM are
filtered with Sort-Object method by the "creationtime" property to get the most recent one. The
reason is "Configuration recovery". The RunAsync parameter is set to bring the process to the
background.
Get-VBRRestorePoint -Name "WebServer_replica" | Sort-Object
$_.creationtime -Descending | Select -First 1 | Start-
VBRViReplicaFailover -Reason "Configuration recovery" -RunAsync
Example 2
This command starts permanent failover to the VM replica named "WebServer_ replica" to its latest
restore point. The restore point is obtained with Get-VBRRestorePoint and piped down. The restore
points of the VM are filtered with Sort-Object method by the "creationtime" property to get the most
recent one. The reason is "Configuration recovery". The RunAsync parameter is set to bring the process
to the background. The -Definite parameter is set to perform the permanent failover.
Get-VBRRestorePoint -Name "WebServer_replica" | Sort-Object
$_.creationtime -Descending | Select -First 1 | Start-
VBRViReplicaFailover -Reason "Configuration recovery" -RunAsync -
Definite
Example 3
This command fails over to the VM replica represented by the $"WebServer_replica restorepoint"
variable. The restore point is obtained with Get-VBRRestorePoint and assigned to the variable
beforehand. The reason is "Data recovery". The RunAsync parameter is set to bring the process to the
background.
Start-VBRViReplicaFailover -RestorePoint $"WebServer_replica
restorepoint" -Reason "Data recovery" -RunAsync
Example 4
This command performs the planned failover to the VM replica represented by the $"DC_replica
restorepoint" variable. The restore point is obtained with Get-VBRRestorePoint and assigned to the
variable beforehand. The reason is "Tsunami forecast". The Planned parameter is used to leverage the
planned failover mechanism.
Start-VBRViReplicaFailover -RestorePoint $"DC_replica
restorepoint" -Reason "Tsunami forecast" -Planned
237 | Veeam Backup PowerShell |REFERENCE| REV 2
Stop-VBRReplicaFailover
Short Description
Undoes the replica failover.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Stop-VBRReplicaFailover [-RestorePoint] <COib> [-RunAsync] [-
Force] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Detailed Description
This cmdlet allows you to undo the replica failover.
This cmdlet lets you finalize the replica failover started with Start-VBRViReplicaFailover by reverting
back to the production VM discarding changes.
When you undo the failover, you switch back to the original VM, revert replication operations and
discard changes made to the working VM replica. In this case you loose all the changes that were
made to the replica while you failed over to it. You can select a restore point to revert to.
To switch back to the production VM and synchronize the changes made to the replica while failover,
start a failback process. Run Start-VBRViReplicaFailback or Start-VBRHvReplicaFailback to fail back to
the VMware or Hyper-V production VM respectively.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the restore point of
(ByValue,
RestorePoint the production VM to recover True 1 False
ByProperty
to.
Name)
Indicates that the command
returns immediately without
RunAsync False Named False False
waiting for the task to
complete.
Indicates that the replica job
starts running without waiting
for the target host to power off.
Force False Named False False
Otherwise the replica job will
start only after the target host
is powered off.
WhatIf Specifies whether the cmdlet False Named False False
writes a message that
238 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
describes the effects of running
the cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if
Confirm False Named False False
the user is sure that they want
to continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command stops failover process by reverting to the production VM. The restore point of the
replica VM is obtained with Get-VBRRestorePoint and piped down. The restore points of the VM are
filtered with Sort-Object method by the "creationtime" property to get the most recent one. The
reason is "Configuration recovery". The RunAsync parameter is set to bring the process to the
background. The -Force parameter is set to start the replica job running anyway.
Get-VBRRestorePoint -Name "WebServer_replica" | Sort-Object
$_.creationtime -Descending | Select -First 1 | Stop-
VBRReplicaFailover -Reason "Configuration recovery" -RunAsync -
Force
Example 2
This command stops failover process by reverting to the production VM. The restorepoint of the
replica VM is represented by the $"WebServer_replica restorepoint" variable. The restore point is
obtained with Get-VBRRestorePoint and assigned to the variable beforehand. The reason is "Data
recovery". The RunAsync parameter is set to bring the process to the background.
Stop-VBRReplicaFailover -RestorePoint $"WebServer_replica
restorepoint" -Reason "Data recovery" -RunAsync
239 | Veeam Backup PowerShell |REFERENCE| REV 2
Stop-VBRViReplicaFailback
Short Description
Undoes replica failback.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRViReplicaFailback -RestorePoint <COib> [-Reason
<string>] [-RunAsync] [-Complete] [-PowerOn] [-
StoragePolicyAction <VBRStoragePolicyAction> {Current | Stored |
Default}] [-WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Detailed Description
This cmdlet allows you to undo the replica failback started with Start-VBRViReplicaFailback or Start-
VBRHvReplicaFailback.
If you tried to fail back to the production VM but was unable to, because i.e. it was non-functional or
corrupted, you can undo the failback and return to the working replica.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the restore point of
(ByValue,
RestorePoint the replica VM for which you True 1 False
ByProperty
want to undo the failback.
Name)
Indicates that the command
returns immediately without
RunAsync False Named False False
waiting for the task to
complete.
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the False Named False False
cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if
Confirm False Named False False
the user is sure that they want
to continue.
Storage Specifies the strategy for
Policy selecting storage policy profile
Action in case the storage profile of
the backed up VM differs from
240 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
the profile of the original VM.
Current: the restored VM
will be subscribed to
the same profile as in
backup (if such
profile still exists) or
to the profile to
which the original VM
is subscribed (if
profile as in backup
was removed).
Default: the restored VM
will be subscribed to
the profile that is set
as default for the
target datastore.
Stored: the restored VM
will be subscribed to
the profile as in
backup (if such
profile still exists).
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command stops failback from the replica VM named "WebServer_replica". The restore point is
obtained with Get-VBRRestorePoint and piped down. The restore points of the VM are filtered with
Sort-Object method by the "creationtime" property to get the most recent one. The RunAsync
parameter is set to bring the process to the background.
Get-VBRRestorePoint -Name "WebServer_replica" | Sort-Object
$_.creationtime -Descending | Select -First 1 | Stop-
VBRViReplicaFailback -RunAsync
Example 2
This command stops failback from the replica VM named "WebServer_replica". The restorepoint to
revert to is represented by the $"WebServer_replica restorepoint" variable. The restore point is
obtained with Get-VBRRestorePoint and assigned to the variable beforehand. The RunAsync
parameter is set to bring the process to the background.
Stop-VBRViReplicaFailback -RestorePoint $"WebServer_replica
restorepoint" -RunAsync
241 | Veeam Backup PowerShell |REFERENCE| REV 2
Failover Plans
Failover plan is a preset scenario for one-click failover of a group of interdependent VMs.
Failover plan is created by user in advance and then used to perform failover of the group in case the
primary VMs are out of service for any reason.
Note that operations with failover plans require Enterprise or Enterprise Plus product edition.
See also:
Performing Failover by Failover Plan
Failover Plans Cmdlets
Create and manage failover plans.
Operation VMware Hyper-V
Create objects for the VMs you want to add to a failover plan:
Creates an object containing the VM to
New-VBRFailoverPlanObject New-VBRFailoverPlanObject
add to the failover plan.
Modifies the object containing the VM
Set-VBRFailoverPlanObject Set-VBRFailoverPlanObject
to add to the failover plan.
Create and manage failover plans:
Creates a failover plan. Add-VBRFailoverPlan Add-VBRFailoverPlan
Looks for existing failover plans. Get-VBRFailoverPlan Get-VBRFailoverPlan
Modifies the failover plan. Set-VBRFailoverPlan Set-VBRFailoverPlan
Removes the failover plan. Remove-VBRFailoverPlan Remove-VBRFailoverPlan
Use failover plans to launch failover and roll the group back to production:
Starts failing the VMs over by failover
Start-VBRFailoverPlan Start-VBRFailoverPlan
plan.
Undoes failover by failover plan. Undo-VBRFailoverPlan Undo-VBRFailoverPlan
Failover Plans Objects
Veeam PowerShell uses the following objects to manage the failover operations performed by failover
plan:
Object Description
Contains the VM that you want to add to a failover
VBRFailoverPlanObject
plan.
VBRFailoverPlan Contains the failover plan.
242 | Veeam Backup PowerShell |REFERENCE| REV 2
Performing Failover by Failover Plan
To perform failover by failover plan with Veeam PowerShell snap-in, you need to perform the
following steps:
1. Create VM objects: run New-VBRFailoverPlanObject to create an object for each VM that you want
to add to the failover plan.
You can edit the created VM objects with Set-VBRFailoverPlanObject afterwards.
2. Create the failover plan: run Add-VBRFailoverPlan to create the failover plan. Use the created VM
objects to add VM to your plan.
If you need to edit a created failover plan, run Set-VBRFailoverPlan.
3. Launch failover by the failover plan: run Start-VBRFailoverPlan to launch the failover process. Use
Get-VBRFailoverPlan to look for the failover plan you need.
You can launch failover plan that were created with UI as well.
4. Finalize the failover process:
a) Undo failover is the only available option to finalize failover as a group. Undo failover
switches workload back to the original VMs, revert replication operations and discard
changes made to the working VM replicas. In this case you loose all the changes that were
made to the replicas while you failed over to them. Run Undo-VBRFailoverPlan to undo
failover of the group.
b) Fail back if you want to switch back to the original VMs and keep the changes made to
replicas. Run Stop-VBRReplicaFailover. You need to process each VM individually.
c) Commit failover if you want to permanently move the workload to replica. Run Start-
VBRViReplicaFailover with -Definite parameter. You need to process each VM individually.
This example demonstrates how to create a failover plan for a group of Microsoft Exchange servers
and a DNS server, run and undo it.
// Create VM objects:
PS C:\PS> $DNS = Find-VBRViEntity -Name "DNSServer" | New-
VBRFailoverPlanObject -BootDelay 0
PS C:\PS> $MSExchange01 = Find-VBRViEntity -Name
"MS_Exchange_Server_01" | New-VBRFailoverPlanObject -BootOrder
1 -BootDelay 180
PS C:\PS> $MSExchange02 = Find-VBRViEntity -Name
"MS_Exchange_Server_02" | New-VBRFailoverPlanObject -BootOrder
2 -BootDelay 120
// Create failover plan:
PS C:\PS> Add-VBRFailoverPlan -Name "MS Exchange Group
Failover" -FailoverPlanObject $DNS, $MSexchange01,
$MSExchange02 -Description "Failover plan for the mail servers
group: DNS Server, MS Exchange 01 Server, MS Exchange 02
Server"
// Launch failover plan:
PS C:\PS> Get-VBRFailoverPlan -Name "MS Exchange Group
Failover" | Start-VBRFailoverPlan
243 | Veeam Backup PowerShell |REFERENCE| REV 2
// Undo failover:
PS C:\PS> Get-VBRFailoverPlan -Name "MS Exchange Group
Failover" | Undo-VBRFailoverPlan
244 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRFailoverPlan
Short Description
Creates failover plan.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Add-VBRFailoverPlan -Name <string> -FailoverPlanObject
<VBRFailoverPlanObject[]> [-Description <string>] [-
PrefailoverCommand <string>] [-PostfailoverCommand <string>]
[<CommonParameters>]
Related Commands
New-VBRFailoverPlanObject
Return Type
VBRFailoverPlan
Detailed Description
This cmdlet creates a failover plan.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you want to
Name True Named False False
assign to the failover plan.
Specifies the VM(s) you want to
add to the failover plan.
Failover
Accepts VBRFailoverPlanObject. True Named False False
PlanObject
You can assign multiple VMs to
this object.
Specifies the description of the
failover plan.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Specifies the path to the script
you want to automatically run
before failing over to replicas.
Prefailover
Veeam Backup & Replication False Named False False
Command
provides a 10 minute timeout for
the script.
In case the script does not run
245 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
successfully or timeout ends, the
failover is not performed.
Specifies the path to the script
you want to automatically run
after failing over to replicas is
complete.
Veeam Backup & Replication
Postfailover
provides a 10 minute timeout for False Named False False
Command
the script.
In case the script does not run
successfully or timeout ends, the
failover proceeds disregarding
script failure.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command creates a failover plan for a group of a DNS server and two Microsoft Exchange servers
named "MS Exchange Group Failover". The VMs are assigned to the '$DNS', '$MSExchange01',
'$MSExchange02' variables by running New-VBRFailoverPlanObject beforehand.
Add-VBRFailoverPlan -Name "MS Exchange Group Failover" -
FailoverPlanObject $DNS, $MSexchange01, $MSExchange02 -
Description "Failover plan for the mail servers group: DNS
Server, MS Exchange 01 Server, MS Exchange 02 Server"
Example 2
This command creates a failover plan for a group of a DNS server and two Microsoft Exchange servers
named "MS Exchange Group Failover".
The VMs are assigned to the '$DNS', '$MSExchange01', '$MSExchange02' variables by running New-
VBRFailoverPlanObject beforehand. The VM objects are first consolidated into a massive named
'$"MS_Exchange_Group"'.
PS C:\PS> $"MS_Exchange_Group" = $DNS, $MSexchange01,
$MSExchange02
PS C:\PS> Add-VBRFailoverPlan -Name "MS Exchange Group Failover"
-Description "Failover plan for the mail servers group: DNS
Server, MS Exchange 01 Server, MS Exchange 02 Server" -
FailoverPlanObject $"MS_Exchage_Group"
246 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRFailoverPlan
Short Description
Returns existing failover plans.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Get-VBRFailoverPlan [<CommonParameters>]
-OR-
Get-VBRFailoverPlan [-Name <string[]>] [<CommonParameters>]
-OR-
Get-VBRFailoverPlan [-Id <guid[]>] [<CommonParameters>]
Related Commands
None
Return Type
VBRFailoverPlan[]
Detailed Description
This cmdlet returns the list of existing failover plans.
You can get the list of all failover plans or search for instances directly by name or ID.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the
failover plan you want to True (by Value
get or search conditions. FromPipeline,
Name False Named True
ValueFromPipeline
You can assign multiple ByPropertyName)
names to this object.
Specifies the ID of the
VBRFailoverPlan object
you want to add to the
failover plan. True (by
Id False Named ValueFromPipeline False
Accepts GUID or string
ByPropertyName)
type.
You can assign multiple
IDs to this object.
247 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of all existing failover plans.
Get-VBRFailoverPlan
Example 2
This command looks for failover plan named 'MailServers Failover'.
Get-VBRFailoverPlan -Name "MS Exchange Group Failover"
Example 3
This command looks for a failover plan with a particular ID by piping down the variable containing the
ID.
1. The ID is obtained by getting the ID property of the failover plan object and assigned to the
'$MSExchangeGroupID' variable.
PS C:\PS> $MSExchangeGroup = Get-VBRFailoverPlan -Name "MS
Exchange Group Failover"
PS C:\PS> $MSExchangeGroupID = $MSExchangeGroup.ID
You can view the GUID number of the failover plan object:
PS C:\PS> $MSExchangeGroupID
Guid
-------
3247cbb5-b65f-4f93-93aa-e13bdb3001c9
2. The '$MSExchangeGroupID' variable is then piped down to the cmdlet.
PS C:\PS> $MSExchangeGroupID | Get-VBRFailoverPlan
248 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRFailoverPlanObject
Short Description
Creates the VBRFailoverPlanObject object.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
New-VBRFailoverPlanObject -Vm <IItem> [-BootOrder <int>] [-
BootDelay <int>] [<CommonParameters>]
Related Commands
Find-VBRViEntity
Return Type
VBRFailoverPlanObject
Detailed Description
This cmdlet creates the VBRFailoverPlanObject object. This object contains the VM that you want to
add to a failover plan. It is used then in the Add-VBRFailoverPlan cmdlet.
You must create the VBRFailoverPlanObject object for each VM that you want to add to the failover
plan. For each VM, you can set the boot order and the delay time.
• The boot order indicates the order in which the VMs will start by the failover plan. Make sure
you set the dependent VMs to start after the VMs they depend on.
• The delay time is an interval between each VM start. Use delay intervals to make sure that
some VMs are already running at the moment the dependent VMs start.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True (by Value
Specifies the VM you
FromPipeline,
Vm want to add to the True Named True
ValueFromPipeline
failover plan.
ByPropertyName)
Specifies the order
BootOrder number by which the VM False Named False False
will boot.
Specifies the delay time
for the VM to boot.
BootDelay The delay time is set in False Named False False
seconds.
If omitted, the delay time
will be set to 60 sec by
249 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
default.
If you set boot delay to
'0' to a number of VMs,
these VMs will start
simultaneously.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
These commands create three VBRFailoverPlanObject objects for the group of mail servers: a DNS
server and two Microsoft Exchange servers. The DNS server starts first followed by the two Microsoft
Exchange servers started with a delay.
The servers objects are obtained with Find-VBRViEntity and piped down.
• The VBRFailoverPlanObject for the DNS server is assigned to the '$DNS' variable. The boot
order is omitted and will be automatically set to 0. The boot delay is set to 0 sec to start the
DNS server immediately.
• The VBRFailoverPlanObject for the first Microsoft Exchange server is assigned to the
'$MSExchange01' variable. The boot order is set to 1, and the boot delay is set to 180 sec.
• The VBRFailoverPlanObject for the second Microsoft Exchange server is assigned to the
'$MSExchange02' variable. The boot order is set to 2, and the boot delay is set to 120 sec.
$DNS = Find-VBRViEntity -Name "DNSServer" | New-
VBRFailoverPlanObject -BootDelay 0
$MSExchange01 = Find-VBRViEntity -Name "MS_Exchange_Server_01" |
New-VBRFailoverPlanObject -BootOrder 1 -BootDelay 180
$MSExchange02 = Find-VBRViEntity -Name "MS_Exchange_Server_02" |
New-VBRFailoverPlanObject -BootOrder 2 -BootDelay 120
Example 2
This command creates the VBRFailoverPlanObject for the server named 'MS_Exchange_Server_01'.
• The server object is obtained with Find-VBRViEntity and assigned to the '$vm1' variable.
• The VBRFailoverPlanObject is created and assigned to the '$MSExchange01' variable. The
'$vm1' variable is used to add the Microsoft Exchange server, the boot order is set to 1 and
the boot delay is set to 180 sec.
PS C:\PS> $vm1 = Find-VBRViEntity -Name "MS_Exchange_Server_01"
PS C:\PS> $MSExchange01 = New-VBRFailoverPlanObject -Vm $vm1 -
BootOrder 1 -BootDelay 180
250 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRFailoverPlan
Short Description
Removes a selected failover plan.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Remove-VBRFailoverPlan -FailoverPlan <VBRFailoverPlan[]> [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRFailoverPlan
Return Type
None
Detailed Description
This cmdlet removes a selected failover plan from Veeam Backup & Replication console and database.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the failover
plan you want to
remove. True (by Value
FromPipeline,
FailoverPlan Accepts True Named False
ValueFromPipeline
VBRFailoverPlan.
ByPropertyName)
You can remove
multiple objects.
Specifies whether the
cmdlet writes a
message that describes
WhatIf the effects of running False Named False False
the cmdlet without
actually performing any
action.
Specifies whether the
cmdlet displays a
Confirm prompt that asks if the False Named False False
user is sure that they
want to continue.
251 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes failover plan named "MS Exchange Group Failover". The failover plan object is
obtained with Get-VBRFailoverPlan and piped down.
Get-VBRFailoverPlan -Name "MS Exchange Group Failover" | Remove-
VBRFailoverPlan
Example 2
This command removes failover plan represented by the '$MSExchangeGroup' variable. The failover
plan object is obtained with Get-VBRFailoverPlan and assigned to the variable beforehand.
Remove-VBRFailoverPlan -FailoverPlan $MSExchangeGroup
252 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRFailoverPlan
Short Description
Modifies a selected failover plan.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Set-VBRFailoverPlan -FailoverPlan <VBRFailoverPlan> [-Name
<string>] [-Description <string>] [-FailoverPlanObject
<VBRFailoverPlanObject[]>] [-PrefailoverCommand <string>] [-
PostfailoverCommand <string>] [-PassThru] [<CommonParameters>]
Related Commands
New-VBRFailoverPlanObject
Return Type
None, VBRFailoverPlan (use -PassThru to obtain output object)
Detailed Description
This cmdlet modifies settings of an existing failover plan. To modify settings, you need to enter the
corresponding parameters with new values. The parameters that you omit will remain unchanged.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the failover
plan you want to True (by Value
modify. FromPipeline,
FailoverPlan True Named False
ValueFromPipeline
Accepts ByPropertyName)
VBRFailoverPlan object.
Specifies the new name
Name you want to assign to False Named False False
the failover plan.
Specifies the VM(s) you
want to add to the
failover plan.
Failover Accepts
False Named False False
PlanObject VBRFailoverPlanObject
object.
You can assign multiple
VMs to this object.
Specifies the new
Description description you want to False Named False False
apply to the failover
253 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
plan.
Specifies the path to the
script you want to
Prefailover
automatically run False Named False False
Command
before failing over to
replicas.
Specifies the path to the
script you want to
Postfailover
automatically run after False Named False False
Command
failing over to replicas is
complete.
Indicates that the
command returns the
PassThru output object to the False Named False False
Windows PowerShell
console.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds a pre-failover script to an existing failover plan named "MS Exchange Group
Failover".
• The failover plan object is obtained with Get-VBRFailoverPlan and piped down.
• The -PrefailoverCommand parameter is set to add the path to the script to the failover plan.
• The other settings of the 'MS Exchange Group Failover' plan will remain unchanged.
Get-VBRFailoverPlan -Name "MS Exchange Group Failover" | Set-
VBRFailoverPlan -PrefailoverCommand
"C:\Users\Administrator\TriggerEmailNotification.cmd"
254 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 2
This command adds one more Microsoft Exchange server to the failover plan named "MS Exchange
Group Failover".
• The new server object is assigned to the '$MSExchangeServer03' variable by running New-
VBRFailoverPlanObject beforehand.
• The failover plan is obtained by running Get-VBRFailoverPlan and assigned to the
'$MSExchangePlan' variable.
• The objects of the failover plan (VMs added to the failover plan) are assigned to the
'$MSExchangeGroup' variable. The new server object is added to it.
• The Set-VBRFailoverPlan command is run with the updated list of failover plan objects and a
new description. The other settings of the 'MS Exchange Group Failover' plan will remain
unchanged.
PS C:\PS> $MSExchangeServer03 = Find-VBRViEntity -Name "MS
Exchange Server 03"
PS C:\PS> $MSExchangePlan = Get-VBRFailoverPlan -Name "MS
Exchange Group Failover"
PS C:\PS> $MSExchangeGroup = $MSExchangePlan.FailoverObject
PS C:\PS> $MSExchangeGroup = $MSExchangeServer03
PS C:\PS> Set-VBRFailoverPlan -FailoverPlan $MSExchangePlan -
FailoverPlanObject $MSExchangeGroup -Description "Failover plan
for the mail servers group: DNS Server, MS Exchange 01 Server, MS
Exchange 02 Server, MS Exchange 03 Server"
255 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRFailoverPlanObject
Short Description
Modifies the VBRFailoverPlanObject object.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Set-VBRFailoverPlanObject -Object <VBRFailoverPlanObject> [-
BootOrder <int>] [-BootDelay <int>] [<CommonParameters>]
Related Commands
None
Return Type
VBRFailoverPlanObject
Detailed Description
This cmdlet modifies the VBRFailoverPlanObject object that was created earlier. To modify settings,
you need to enter the corresponding parameters with new values. The parameters that you omit will
remain unchanged.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the VM you True (by Value
want modify. FromPipeline,
Object True Named True
Accepts ValueFromPipeline
VBRFailoverPlanObject. ByPropertyName)
Specifies the new value
BootOrder for the order number by False Named False False
which the VM will boot.
Specifies the new value
for the delay time for the
VM.
The delay time is set in
seconds.
BootDelay If ommited, the delay False Named False False
time will be set to 60 sec
by default.
If you set boot delay to
'0' to a number of VMs,
these VMs will start
simultaneously.
256 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command sets a new boot delay value for the Microsoft Exchange server that was earlier assigned
to the '$MSExchange01' variable.
• The boot delay is set to 120 sec.
• The -BootOrder parameter is omitted to leave the original value unchanged.
• The '$MSExchange01' variable is piped down.
$MSExchange01 | Set-VBRFailoverPlanObject -BootDelay 120
Example 2
This command sets a new boot delay value for the Microsoft Exchange server that was earlier assigned
to the '$MSExchange01' variable.
• The boot delay is set to 120 sec.
• The -BootOrder parameter is omitted to leave the original value unchanged.
$MSExchange01 = Set-VBRFailoverPlanObject -Object $MSExchange01 -
BootDelay 120
257 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRFailoverPlan
Short Description
Starts failover by failover plan.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Start-VBRFailoverPlan -FailoverPlan <VBRFailoverPlan[]> [-
FromDate <datetime>] [-Wait] [<CommonParameters>]
Related Commands
Get-VBRFailoverPlan
Return Type
VBRBackupSession[]
Detailed Description
This cmdlet starts failover by failover plan. With this cmdlet, you can start a number of failover
processes.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the failover
plan you want to start.
True (by Value
Accepts FromPipeline,
FailoverPlan True Named False
VBRFailoverPlan. ValueFromPipeline
ByPropertyName)
You can assign multiple
plans to this object.
Use this parameter to
fail over to a particular
restore point.
Specifies the date and
time to which you want
to fail over. Veeam
FromDate Backup & Replication False Named False False
will find a restore point
closest to this moment.
If omitted, Veeam
Backup & Replication
will fail over to the latest
restore point.
Wait Use this parameter to False Named False False
manage starting
258 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
multiple failover
processes.
If indicated, the next
failover process will wait
for the previous to end.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command starts failover process by failover plan named "MS Exchange Group Failover". The VMs
in the failover group are failed over to the latest restore point.
• The failover plan is obtained with Get-VBRFailoverPlan and piped down.
• The FromDate parameter is omitted to select the latest restore point automatically.
Get-VBRFailoverPlan -Name "MS Exchange Group Failover" | Start-
VBRFailoverPlan
Example 2
This command starts failover process represented by the '$MSExchangeGroup' variable. The VMs in
the failover group are failed over to the latest restore point.
• The failover plan is obtained with Get-VBRFailoverPlan and assigned to the
'$MSExchangeGroup' variable beforehand.
• The FromDate parameter is omitted to select the latest restore point automatically.
Start-VBRFailoverPlan -FailoverPlan $MSExchangeGroup
Example 3
This command starts failover processes by failover plans named "MS Exchange Group Failover" and
"SQLServers Group Failover". The VMs are failed over to a week ago state. The VM groups are failed
over one by one.
• The date is obtained with the Date command and assigned to the '$date' variable
beforehand.
• The failover plans are obtained with Get-VBRFailoverPlan and piped down.
• The Wait parameter is used to start the failover processes one after the other.
PS C:\PS> $date = data
PS C:\PS> Get-VBRFailoverPlan -Name "MS Exchange Group Failover",
"SQLServers Group Failover" | Start-VBRFailoverPlan -FromDate
$date.AddDays(-7) -Wait
259 | Veeam Backup PowerShell |REFERENCE| REV 2
Undo-VBRFailoverPlan
Short Description
Undoes the failover by failover plan.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Undo-VBRFailoverPlan -FailoverPlan <VBRFailoverPlan[]> [-Wait] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRFailoverPlan
Return Type
VBRBackupSession[]
Detailed Description
This cmdlet undoes the failover process. Undoing failover switches the workload back to source VMs.
All changes that were made to the replicas during failover are discarded.
To switch back to the production VM and synchronize the changes made to the replica while failover,
start a failback process. Run Start-VBRViReplicaFailback or Start-VBRHvReplicaFailback to fail back to
the VMware or Hyper-V production VM respectively. Note that failback is not a group process and
must be performed for each VM individually.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the failover
plan you want to undo.
True (by Value
Accepts FromPipeline,
FailoverPlan True Named False
VBRFailoverPlan. ValueFromPipeline
ByPropertyName)
You can assign multiple
plans to this object.
Use this parameter to
manage undoing
multiple failover
processes.
Wait False Named False False
If indicated, the next
undo failover process
will wait for the
previous to end.
Specifies whether the
WhatIf cmdlet writes a False Named False False
message that describes
260 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
the effects of running
the cmdlet without
actually performing any
action.
Specifies whether the
cmdlet displays a
Confirm prompt that asks if the False Named False False
user is sure that they
want to continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command undoes the failover process by failover plan named "MS Exchange Group Failover". The
failover plan is obtained with Get-VBRFailoverPlan and piped down.
Get-VBRFailoverPlan -Name "MS Exchange Group Failover" | Undo-
VBRFailoverPlan
Example 2
This command undoes the failover process represented by the '$MSExchangeGroup' variable. The
failover plan is obtained with Get-VBRFailoverPlan and assigned to the variable beforehand.
Undo-VBRFailoverPlan -FailoverPlan $MSExchangeGroup
Example 3
This command undoes failover processes by failover plans named "MS Exchange Group Failover" and
"SQLServers Group Failover". The VM groups are processed one by one.
• The failover plans are obtained with Get-VBRFailoverPlan and piped down.
• The Wait parameter is used to undo the failover processes one after the other.
Get-VBRFailoverPlan -Name "MS Exchange Group Failover",
"SQLServers Group Failover" | Undo-VBRFailoverPlan -Wait
261 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRFailoverPlan
This object contains the failover plan.
Created by
Add-VBRFailoverPlan
Passed to
Get-VBRFailoverPlan
Set-VBRFailoverPlan
Remove-VBRFailoverPlan
Start-VBRFailoverPlan
Undo-VBRFailoverPlan
Properties
Property Type Description
Id GUID Unique identifier of failover plan.
Name string Failover plan name.
Description string Failover plan description.
Virtualisation platform: VMware
Platform VBRPlatform
or Hyper-V.
Current status of failover plan
Status string
process.
VM(s) objects added to the
FailoverPlanObject VBRFailoverPlanObject[]
failover plan.
Number of VMs added to the
VMCount integer
failover plan.
Path to a script run automatically
PrefailoverCommand string
before failover.
Path to a script run automatically
PostfailoverCommand string
after failover.
262 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRFailoverPlanObject
This object contains the VM that you want to add to a failover plan and settings that will be applied
when processing the VM during the failover: the boot order and the delay time.
Created by
New-VBRFailoverPlanObject
Passed to
Set-VBRFailoverPlanObject
Add-VBRFailoverPlan
Set-VBRFailoverPlan
VBRFailoverPlan
Properties
Property Type Description
VM added to a failover plan. Can
contain only one VM. VM object
Item IItem
must be CViVmItem or
CHvVmItem.
Order number by which the VM
BootOrder int
will boot during failover.
Delay time for the VM to boot
BootDelay int
during failover (seconds).
263 | Veeam Backup PowerShell |REFERENCE| REV 2
Backup Copy
Backup copy jobs allows you to create copies of your backups on another locations to meet the 3-2-1
backup strategy principle.
You can create backup copy jobs for Veeam backups created with the following jobs:
• backup jobs
• vCloud Director backup jobs
• Endpoint backup jobs.
Backup jobs
Operation VMware Hyper-V
Copies VM backups to a
Add-VBRViBackupCopyJob Add-VBRHvBackupCopyJob
secondary repository
Synchronizes source and target
Sync-VBRBackupCopyJob Sync-VBRBackupCopyJob
repository
vCloud Director jobs
Operation VMware Hyper-V
Copies vCloud Director backups Add-
—
to a secondary repository VBRvCloudBackupCopyJob
Endpoint backup jobs
If your Endpoint backups are integrated with Veeam Backup & Replication, you can create backup
copy jobs for Endpoint backups.
Operation Cmdlet
Copies Endpoint backups to a secondary repository Add-VBREPBackupCopyJob
264 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRHvBackupCopyJob
Short Description
Creates a Hyper-V backup copy job.
Applies to
Platform: Hyper-V
For VMware, run Add-VBRViBackupCopyJob.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
This cmdlet provides two parameter sets.
For data transfer with WAN accelerators:
Add-VBRHvBackupCopyJob [-Name <String>] [-Entity <IHvItem[]>] [-
Backup <CBackup[]>] [-BackupJob <CBackupJob[]>] [-Repository
<CBackupRepository>] -SourceAccelerator <CWanAccelerator> -
TargetAccelerator <CWanAccelerator> [-Description <String>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
For direct data transfer:
Add-VBRHvBackupCopyJob [-Name <String>] [-Entity <IHvItem[]>] [-
Backup <CBackup[]>] [-BackupJob <CBackupJob[]>] [-Repository
<CBackupRepository>] -DirectOperation [-Description <String>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRWANAccelerator
Find-VBRHvEntity
Get-VBRBackup
Get-VBRJob
Get-VBRBackupRepository
265 | Veeam Backup PowerShell |REFERENCE| REV 2
Detailed Description
This cmdlet creates a new Hyper-V backup copy job.
The backup copy job is copying backup files from the source backup repository to the target backup
repository. The backup copy job runs continuously synchronizing the backup repositories in user-
defined time periods.
The cmdlet provides two scenarios that can be used for on-site and off-site modes:
To transfer the data efficiently to to the off-site location, you can use the WAN accelerator
technology. WAN accelerator is a backup infrastructure component that optimizes file
transfer via WAN by means of data deduplication. The role of a WAN accelerator can be
assigned to a dedicated Windows-based machine (physical or virtual). You should always use
a pair of WAN accelerators set on 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. WAN optimization is available
only in Veeam Backup & Replication Enterprise Plus Edition.
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.
Note that the backup copy job is created in disabled state. Run Enable-VBRJob to start the job running
on the defined schedule.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the WAN accelerator
on the source side.
Source If you select the mode using True Named False False
Accelerator WAN accelerators, the -
DirectOperation parameter
should be omitted.
Specifies the WAN accelerator
on the target side.
Target If you select the mode using True Named False False
Accelerator WAN accelerators, the -
DirectOperation parameter
should be omitted.
Enables the direct operation
method sending the data
directly to the target backup
repository without performing
Direct data deduplication. True Named False False
Operation
If you select the direct operation
mode, the -TargetAccelerator
and -SourceAccelerator
parameters should be omitted.
Specifies the name you want to True
assign to the backup copy job. (ByValue,
Name False Named False
You can input string up to 255 ByProperty
symbols. Name)
266 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the VM(s) you want to True
copy. (ByValue,
Entity False Named False
You can assign multiple VMs to ByProperty
this object. Name)
Specifies the existing backup(s)
from where the VMs to copy are True
derived. (ByValue,
Backup False Named False
ByProperty
You can assign multiple backups Name)
to this object.
Specifies the existing backup
job(s) from where the VMs to True
copy are derived. (ByValue,
BackupJob False Named False
ByProperty
You can assign multiple backup Name)
jobs to this object.
Specifies the backup repository
to where you want to copy the
VM data.
Repository False Named False False
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 & False Named False False
Replication will enter date and
time of creation by default.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
267 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command creates a backup copy job named "CopyJob1" with the following parameters:
• The source and target WAN accelerators are obtained with Get-VBRWANAccelerator and
assigned to $wansource and $wantarget variables accordingly beforehand,
• The VMs to copy are obtained with Find-VBRHvEntity and assigned to the $vms variable
beforehand,
• The repository to where the VM data will be copied is obtained with Get-
VBRBackupRepository and assigned to the $repository variable beforehand.
Add-VBRHvBackupCopyJob -SourceAccelerator $wansource -
TargetAccelerator $wantarget -Name CopyJob1 -Entity $vms -
Repository $repository
Example 2
This command creates a direct backup copy job with the following parameters:
• The name of the job is "DC CopyJob",
• The backup job named "DC Backup" with the VMs to be copied is obtained with Get-
VBRBackup and piped down,
• The -Repository parameter is not set to copy the VMs to the default backup repository.
Get-VBRBackup -Name "DC Backup" | Add-VBRHvBackupCopyJob -
DirectOperation -Name "DC CopyJob"
268 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRViBackupCopyJob
Short Description
Creates a VMware backup copy job.
Applies to
Platform: VMware
For Hyper-V, run Add-VBRHvBackupCopyJob.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
This cmdlet provides two parameter sets.
For data transfer with WAN accelerators:
Add-VBRViBackupCopyJob -SourceAccelerator <CWanAccelerator> -
TargetAccelerator <CWanAccelerator> [-Name <string>][-Entity
<IViItem[]>] [-Backup <CBackup[]>][-BackupJob <CBackupJob[]>] [-
Repository <CBackupRepository>][-Description
<string>][<CommonParameters>]
For direct data transfer:
Add-VBRViBackupCopyJob -DirectOperation [-Name <string>] [-Entity
<IViItem[]>] [-Backup <CBackup[]>] [-BackupJob <CBackupJob[]>] [-
Repository <CBackupRepository>] [-Description <string>]
[<CommonParameters>]
Related Commands
Get-VBRWANAccelerator
Find-VBRViEntity
Get-VBRBackup
Get-VBRJob
Get-VBRBackupRepository
269 | Veeam Backup PowerShell |REFERENCE| REV 2
Detailed Description
This cmdlet creates a new VMware backup copy job.
The backup copy job is copying backup files from the source backup repository to the target backup
repository. The backup copy job runs continuously synchronizing the backup repositories in user-
defined time periods.
To set the VM(s) or VM containers as source to the job, you can use the following source to browse to
VMs:
• From infrastructure: use the Entity parameter to get the VMs.
• From backup: use the Backup parameter to select the VMs from available backup files.
• From jobs: use the BackupJob parameter to select the VMs from available backup jobs. In this
case the Backup Copy job will process all VMs added to the source backup job.
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). You should always use
a pair of WAN accelerators set on 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. WAN optimization is available
only in Veeam Backup & Replication Enterprise Plus Edition.
• 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.
Note that the backup copy job is created in disabled state. Run Enable-VBRJob to start the job running
on the defined schedule.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the WAN accelerator
on the source side.
Remember to set the pair of
source and target WAN
Source
accelerators. True Named False False
Accelerator
If you select the mode using
WAN accelerators, the -
DirectOperation parameter
should be omitted.
Specifies the WAN accelerator
on the target side.
Remember to set the pair of
Target source and target WAN True Named False False
Accelerator accelerators.
If you select the mode using
WAN accelerators, the -
DirectOperation parameter
270 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
should be omitted.
Enables direst operation method
sending the data directly to the
target backup repository
without performing data
Direct deduplication. True Named False False
Operation
If you select the direct operation
mode, the -TargetAccelerator
and -SourceAccelerator
parameters should be omitted.
Specifies the name you want to True
assign to the backup copy job. (ByValue,
Name False Named False
You can input string up to 255 ByProperty
symbols. Name)
Specifies the VM you want to True
copy. (ByValue,
Entity False Named False
You can assign multiple VMs to ByProperty
this object. Name)
Specifies the existing backup(s) True
to set the VMs you want to copy. (ByValue,
Backup False Named False
You can assign multiple backups ByProperty
to this object. Name)
Specifies the existing backup
job(s) to set the VMs you want to True
copy. (ByValue,
BackupJob False Named False
ByProperty
You can assign multiple backup Name)
jobs to this object.
Specifies the backup repository
to where you want to copy the
VM data.
Repository False Named False False
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 & False Named False False
Replication will enter date and
time of creation by default.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
271 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command creates a backup copy job named "CopyJob1" with the following parameters:
• The source and target WAN accelerators are obtained with Get-VBRWANAccelerator and
assigned to $wansource and $wantarget variables accordingly beforehand,
• The VMs to copy are obtained with Find-VBRViEntity and assigned to the $vms variable
beforehand,
• The repository to where the VM data will be copied is obtained with Get-
VBRBackupRepository and assigned to the $repository variable beforehand.
Add-VBRViBackupCopyJob -SourceAccelerator $wansource -
TargetAccelerator $wantarget -Name CopyJob1 -Entity $vms -
Repository $repository
Example 2
This command creates a direct backup copy job with the following parameters:
• The name of the job is "DC CopyJob",
• The backup job named "DC Backup" with the VMs to be copied is obtained with Get-
VBRBackup and piped down,
• The -Repository parameter is not set to copy the VMs to the default backup repository.
Get-VBRBackup -Name "DC Backup" | Add-VBRViBackupCopyJob -
DirectOperation -Name "DC CopyJob"
272 | Veeam Backup PowerShell |REFERENCE| REV 2
Sync-VBRBackupCopyJob
Short Description
Synchronizes backup copy job data.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Sync-VBRBackupCopyJob -Job <IJob> [-WarningAction
<ActionPreference>] [-WarningVariable
<String>][<CommonParameters>]
Related Commands
Get-VBRJob
Detailed Description
This cmdlet starts manual data synchronization for the selected backup copy job.
The backup copy job is copying backup files from the source backup repository to the target backup
repository. The backup copy job runs continuously synchronizing the backup repositories in user-
defined time periods.
With this cmdlet, you can synchronize the source and the target repositories manually.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the backup copy job
(ByValue,
Job for which you want to start True Named False
ByProperty
manual synchronization.
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
273 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command synchronizes data for the backup copy job named "AD Backup Copy". The needed job
object is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "AD Backup Copy" | Sync-VBRBackupCopyJob
Example 2
This command synchronizes data for the backup copy job represented by the $"AD backup" variable.
The needed job object is obtained with Get-VBRJob and assigned to the variable beforehand.
Sync-VBRBackupCopyJob -Job $"AD backup"
274 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRvCloudBackupCopyJob
Short Description
Creates a vCloud backup copy job.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRvCloudBackupCopyJob [-Name <String>] [-Entity <IItem[]>]
[-Backup <CBackup[]>] [-BackupJob <CBackupJob[]>][-Repository
<CBackupRepository>] -SourceAccelerator <CWanAccelerator> -
TargetAccelerator <CWanAccelerator> [-Description <String>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Add-VBRvCloudBackupCopyJob [-Name <String>] [-Entity <IItem[]>]
[-Backup <CBackup[]>] [-BackupJob <CBackupJob[]>][-Repository
<CBackupRepository>] -DirectOperation [-Description <String>] [-
WarningAction <ActionPreference>][-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRBackup
Get-VBRJob
Get-VBRBackupRepository
Get-VBRWANAccelerator
Detailed Description
This cmdlet creates a new vCloud backup copy job.
The backup copy job is copying backup files from the source backup repository to the target backup
repository. The backup copy job runs continuously synchronizing the backup repositories in user-
defined time periods.
The cmdlet provides two scenarios that can be used for on-site and off-site modes:
• To transfer the data efficiently to to the off-site location, you can use the WAN accelerator
technology. WAN accelerator is a backup infrastructure component that optimizes file
transfer via WAN by means of data deduplication. The role of a WAN accelerator can be
assigned to a dedicated Windows-based machine (physical or virtual). You should always use
a pair of WAN accelerators set on 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. WAN optimization is available
only in Veeam Backup & Replication Enterprise Plus Edition.
• 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.
275 | Veeam Backup PowerShell |REFERENCE| REV 2
Note that the backup copy job is created in disabled state. Run Enable-VBRJob to start the job running
on the defined schedule.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you want to
assign to the backup copy job.
Name False Named False False
You can input string up to 255
symbols.
Specifies the VM(s) you want to True
copy. (ByValue,
Entity False Named False
You can assign multiple VMs to ByProperty
this object. Name)
Specifies the existing backup
from where the VMs to copy are True
derived. (ByValue,
Backup False Named False
ByProperty
You can assign multiple backups Name)
to this object.
Specifies the existing backup job
from where the VMs to copy are True
derived. (ByValue,
BackupJob False Named False
ByProperty
You can assign multiple backup Name)
jobs to this object.
Specifies the target backup
repository to where you want to
copy the VM data.
Repository False Named False False
If not set, Veeam Backup &
Replication will use the default
backup repository.
Specifies the WAN accelerator
on the source side.
Source If you select the mode using True Named False False
Accelerator WAN accelerators, the -
DirectOperation parameter
should be omitted.
Specifies the WAN accelerator
on the target side.
Target If you select the mode using True Named False False
Accelerator WAN accelerators, the -
DirectOperation parameter
should be omitted.
Specifies the description of the
backup copy job.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Direct Enables the direst operation False Named False False
Operation method sending the data
276 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
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.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command creates a backup copy job named "vCloud CopyJob1" with the following parameters:
• The source and target WAN accelerators are obtained with Get-VBRWANAccelerator and
assigned to $wansource and $wantarget variables accordingly beforehand,
• The VMs to copy are obtained with Find-VBRvCloudEntity and assigned to the $vms variable
beforehand,
• The repository to where the VM data will be copied is obtained with Get-
VBRBackupRepository and assigned to the $repository variable beforehand.
Add-VBRvCloudBackupCopyJob -SourceAccelerator $wansource -
TargetAccelerator $wantarget -Name CopyJob1 -Entity $vms -
Repository $repository
Example 2
This command creates a direct backup copy job with the following parameters:
• The name of the job is "DC CopyJob",
• The backup job named "DC Backup" with the VMs to be copied is obtained with Get-
VBRBackup and piped down,
• The -Repository parameter is not set to copy the VMs to the default backup repository.
Get-VBRBackup -Name "DC Backup" | Add-VBRvCloudBackupCopyJob -
DirectOperation -Name "DC CopyJob"
277 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBREPBackupCopyJob
Short Description
Creates an Endpoint backup copy job.
Syntax
This cmdlet provides two parameter sets.
For direct data transfer:
Add-VBREPBackupCopyJob -Backup <CBackup[]> -DirectOperation [-
Name <string>] [-Description <string>] [-Repository
<CBackupRepository>] [<CommonParameters>]
For data transfer with WAN accelerators:
Add-VBREPBackupCopyJob -Backup <CBackup[]> -SourceAccelerator
<CWanAccelerator> -TargetAccelerator <CWanAccelerator> [-Name
<string>] [-Description <string>] [-Repository
<CBackupRepository>] [<CommonParameters>]
Related Commands
Get-VBRBackup
Get-VBRBackupRepository
Get-VBRWANAccelerator
Detailed Description
This cmdlet creates a backup copy job for Endpoint backups.
The backup copy job is copying Endpoint backup files from the source backup repository to the target
backup repository. The backup copy job runs continuously synchronizing the backup repositories in
user-defined time periods.
The cmdlet provides two parameters sets that can be used for on-site and off-site modes:
• Direct data transfer
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.
• Data transfer with WAN accelerators
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). You should always use
a pair of WAN accelerators set on 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. WAN optimization is available
only in Veeam Backup & Replication Enterprise Plus Edition.
Note that the backup copy job is created in disabled state. Run Enable-VBRJob to start the job running
on the defined schedule.
278 | Veeam Backup PowerShell |REFERENCE| REV 2
Return Type
CBackupJob or VBREPJob
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the existing
Endpoint backup(s) you True (by Value
want to copy. FromPipeline,
Backup True Named False
ValueFromPipeline
You can assign multiple ByPropertyName)
backups to this object.
Specifies the name you
want to assign to the
backup copy job.
You can input string up
Name to 255 symbols. False Named False False
If not set, Veeam Backup
& Replication will assign
a default backup copy
job name.
Specifies the description
of the backup copy job.
Description If not set, Veeam Backup False Named False False
& Replication will enter
date and time of creation
by default.
Specifies the backup
repository to where you
want to copy the data.
Accepts the backup
repository object or
Repository string type (repository
name).
If not set, Veeam Backup
& Replication will use the
default backup
repository.
Used to set the direct
data transfer.
Enables direst operation
method sending the data
directly to the target
backup repository
Direct without performing data
True
Operation deduplication.
If you select the direct
operation mode, the -
TargetAccelerator and -
SourceAccelerator
parameters should be
omitted.
279 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Used to set data transfer
with WAN accelerators.
Specifies the WAN
accelerator on the source
side.
Source Remember to set the pair
of source and target True Named False False
Accelerator
WAN accelerators.
If you select the mode
using WAN accelerators,
the -DirectOperation
parameter should be
omitted.
Used to set data transfer
with WAN accelerators.
Specifies the WAN
accelerator on the target
side.
Target Remember to set the pair
of source and target True Named False False
Accelerator
WAN accelerators.
If you select the mode
using WAN accelerators,
the -DirectOperation
parameter should be
omitted.
<CommonParameters>
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 PowerShell |REFERENCE| REV 2
Example 1
This command creates a backup copy job using the direct operation method.
• The Endpoint backup is obtained with Get-VBRBackup and assigned to the '$EPbackup'
variable.
• The target backup repository is obtained with Get-VBRBackupRepository and assigned to the
'$repository' variable.
PS C:\PS> $EPbackup = Get-VBRBackup -Name 'Backup Job
Mediaserver'
PS C:\PS> $repository = Get-VBRBackupRepository -Name 'WinLocal'
PS C:\PS> Add-VBREpBackupCopyJob -Name "Mediaserver Endpoint" -
Description "Mediaserver Endpoint Backup Copy Job" -Backup
$EPbackup -DirectOperation -Repository $repository
Example 2
This command creates a backup copy job using WAN accelerators.
• The Endpoint backup is obtained with Get-VBRBackup and piped down.
• The target backup repository is obtained with Get-VBRBackupRepository and assigned to the
'$repository' variable.
• The source and target WAN accelerators are obtained with Get-VBRWANAccelerator and
assigned to $wansource and $wantarget variables accordingly.
PS C:\PS> $repository = Get-VBRBackupRepository -Name 'WinLocal'
PS C:\PS> $wansource = Get-VBRWANAccelerator -Name "Backup WAN
Sydney"
PS C:\PS> $wantarget = Get-VBRWANAccelerator -Name "Backup WAN
London"
PS C:\PS> Get-VBRBackup -Name 'Backup Job Mediaserver' | Add-
VBREPBackupCopyJob -Name "Mediaserver Endpoint" -Description
"Mediaserver Endpoint Backup Copy Job" -Repository $repository -
SourceAccelerator $wansource -TargetAccelerator $wantarget
281 | Veeam Backup PowerShell |REFERENCE| REV 2
VM Copy
You can run a VM copy job to create a copy of a VM in another location.
Operations VMware Hyper-V
Creates a VM copy job Add-VBRCopyJob —
282 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRCopyJob
Short Description
Creates a new VM copy job.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRCopyJob [-Name] <String> [-Type]
<CDbBackupJobInfo+ESourceType> -Server <CHost> -Folder <String>
[-FileName <String>] -SourceServer <CHost> -Objects <String[]> [-
Description <String>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Add-VBRCopyJob [-Name] <String> [-Type]
<CDbBackupJobInfo+ESourceType> [-FileName <String>] -Objects
<String[]> [-Description <String>] -Repository
<CBackupRepository> [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRServer
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.
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.
Run Copy-VBRJob to create a copy of a job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you want
Name True 1 False False
to assign to the new copy job.
Specifies the string with the
type of the created copy job
Type which defines how VM data is True 2 False False
retrieved:
VDDK – Virtual Disk
283 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Development Kit
(VMware vStorage
API): used for VM
backup jobs data.
Files: used for file backup
data.
Backup: not supported
(legacy mode).
Hyper-V: not supported
(legacy mode).
VCB: not supported
(legacy mode).
NET: not supported
(legacy mode).
Specifies the host where the
Server True Named False False
created copy should be stored.
Specifies the string with full
path to the folder where the
Folder True Named False False
created VM copy should be
stored.
Specifies the string with the
file name for the created VM
FileName copy (by default, a copied file False Named False False
is given the same name as the
VM).
Specifies the server where the
target files for file copy job are
SourceServer located. True Named False False
Accepts CHost object or string
(host name).
True
Specifies the string with the
(ByValue,
Objects name(s) of VM(s) that you want True Named False
ByProperty
to copy.
Name)
Specifies the description of the
copy job.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Specifies the backup
Repository repository to which you want True Named False False
to place the copied VMs.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
284 | Veeam Backup PowerShell |REFERENCE| REV 2
VeeamZIP
Create a VM VeeamZIP backup.
Operations VMware Hyper-V
Creates a VeeamZIP backup Start-VBRZip Start-VBRZip
285 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRZip
Short Description
Performs VeeamZIP on the selected VM.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRZip [-BackupRepository <CBackupRepository>] -Entity
<IItem[]> [-Compression <Int32>] [-DisableQuiesce] [-RunAsync] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Start-VBRZip [-Folder <String>] -Entity <IItem[]> [-Compression
<Int32>] [-DisableQuiesce] [-RunAsync] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRBackupRepository
Find-VBRViEntity / Find-VBRHvEntity
Detailed Description
This cmdlet performs VeeamZIP backup of the selected VM.
VeeamZIP is a quick backup procedure always producing a full backup. The VeeamZIP task runs once
the time it is created and does not appear in the jobs list. The result backup file is stored in the
specified folder and does not appear automatically in the backups list. Run Import-VBRBackup to start
managing the backup file with Veeam Backup & Replication.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the backup
repository where you want
Backup
to save the backup file. If False Named False False
Repository
none is specified, the default
repository will be used.
Specifies the VM for which
you want to create a True
VeeamZIP file. (ByValue,
Entity True Named False
ByProperty
You can assign multiple VMs Name)
to this object.
Compression Specifies then integer False Named False False
number corresponding to
286 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
the desired compression
level:
0 = None. Consider disabling
compression to achieve
better deduplication ratios
on deduplicating storage
appliances at the cost of
reduced backup
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.
If set, the VM will be backed
up without using the
VMware tools quiescence.
Otherwise, the applications
DisableQuiesce running on the target VM False Named False False
will be quiesced to provide
transactionally consistent
backup with use of VMware
Tools.
Indicates that the command
returns immediately without
RunAsync False Named False False
waiting for the task to
complete.
Specifies the full path to the
folder on the server where
you want to store the
created backup file. If
Folder False Named False False
omitted, the created backup
file will be saved to the
C:\backup folder on the
Veeam Backup server.
EncryptionKey Specifies the encryption key False Named False False
you want to use to encrypt
287 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
the created VeeamZIP file.
Accepts PSCryptoKey object.
Specifies the retention
settings for the created
VeeamZIP file: Never,
AutoDelete False Named False False
Tonight, TomorrowNight,
In3days, In1Week, In2Weeks,
In1Month.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command starts a VeeamZIP for the VM named "Fileserver01". The VM object is obtained with
Find-VBRViEntity and piped down. The backup repository to store the result backup file is obtained
with Get-VBRBackupRepository and assigned to the $"Repository 01" variable beforehand. The
RunAsync parameter is set to bring the process to the background.
Find-VBRViEntity -Server $server -Name "Fileserver01" | Start-
VBRZip -BackupRepository $"Repository 01" -RunAsync
Example 2
This command starts a VeeamZIP for the VM repersented by the $vm variable. The VM object is
obtained with Find-VBRViEntity and assigned to the variable beforehand. The path to the folder where
the backup file will be stored is D:\Repository\VeeamZIP. The compression level is set to 4 (Dedupe-
friendly). The VMware quiescence is disabled. The RunAsync parameter is set to bring the process to
the background.
Start-VBRZip -Folder "D:\Repository\VeeamZIP" -Entity $vm -
Compression 4 -DisableQuiesce -RunAsync
288 | Veeam Backup PowerShell |REFERENCE| REV 2
Quick Backup
Performs QuickBackup.
Operations VMware Hyper-V
Performs QuickBackup Start-VBRQuickBackup Start-VBRQuickBackup
289 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRQuickBackup
Short Description
Performs QuickBackup.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRQuickBackup -VM <IVmItem[]> [-Wait] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Find-VBRViEntity / Find-VBRHvEntity
Detailed Description
This cmdlet starts QuickBackup on selected VMs.
Quick backup performs on-demand incremental backup for VMs. The VM must be added to a backup
job and have at least one full backup.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the VMs for
which you want to
perform the
QuickBackup.
True (by Value
You can add VMware or FromPipeline,
VM Hyper-V VMs. True Named False
ValueFromPipeline
Accepts CViVmItem or ByPropertyName)
CHvVmItem objects.
You can assign multiple
VMs to this object.
Indicates that the
command waits for the
Wait catalog process to False Named False False
complete before
accepting more input.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
290 | Veeam Backup PowerShell |REFERENCE| REV 2
Quick Migration
Migrate VMs to another ESX(i) host and datastore.
Operations VMware Hyper-V
Launches Quick Migration process Start-VBRQuickMigration —
291 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRQuickMigration
Short Description
Starts Quick Migration of a virtual machine.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRQuickMigration -Entity <CViVmItem[]> -Server <CHost> [-
ResourcePool <CViResourcePoolItem>] [-Datastore
<CViDatastoreItem>] [-Folder <CViFolderItem>] [-StoragePolicy
<VBRViStoragePolicy>] [-SourceProxy <CViProxy[]>] [-TargetProxy
<CViProxy[]>] [-ForceVeeamQM] [-DeleteSorceVmFiles] [-RunAsync]
[<CommonParameters>]
Related Commands
Find-VBRViEntity
Get-VBRServer
Find-VBRViResourcePool
Find-VBRViDatastore
Find-VBRViFolder
Get-VBRViProxy
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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the virtual True
machine(s) you want to (ByValue,
Entity True Named False
migrate. You can assign ByProperty
multiple VMs to this object. Name)
True
Specifies the destination
(ByValue,
Server server to where you want to True Named False
ByProperty
migrate the VM.
Name)
Specifies the destination
ResourcePool resource pool to where you False Named False False
want to migrate the VM.
Datastore Specifies the destination False Named False False
292 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
datastore to where you want
to migrate the VM.
Specifies the destination
Folder folder to where you want to False Named False False
migrate the VM.
Specifies the VMware storage
policy profile that must be
StoragePolicy False Named False False
applied to the virtual disks of
the VM.
Specifies the source backup
proxy(ies).
If not specified, Veeam Backup
& Replication provides
automatic selection of the
SourceProxy proxy (recommended). For False Named False False
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).
If not specified, Veeam Backup
& Replication provides
automatic selection of the
TargetProxy proxy (recommended). For False Named False False
best migration performance
you should deploy at least one
target backup proxy.
You can assign multiple
proxies to this object.
Forces using Veeam Quick
Migration.
Force If omitted, migration process
will use VMware VMotion False Named False False
VeeamQM
given that the migration
scenario and VMware
licensing allows it.
If set, the original VM will be
DeleteSorce deleted upon receiving the
False Named False False
VmFiles heartbeat from the VM on the
target host.
Indicates that the command
returns immediately without
RunAsync False Named False False
waiting for the task to
complete.
<CommonParameters>
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 PowerShell |REFERENCE| REV 2
Example
This command starts Quick Migration of the selected VM.
• The VM to migrate is obtained with Find-VBRViEntity and assigned to the $vm variable
beforehand,
• The host to where the VM will be migrated is obtained with Get-VBRServer and assigned to
the $server variable beforehand,
• The resource pool to where the VM will be migrated is obtained with Find-
VBRViResourcePool and assigned to the $pool variable beforehand,
• The datastore to connect the VM to is obtained with Find-VBRViDatastore and assigned to the
$datastore variable beforehand,
• The folder to where the VM will be migrated is obtained with Find-VBRViFolder and assigned
to the $folder variable beforehand.
The source and target proxies are not set enabling the Quick Migration mechanism to select them
automatically. The -ForceVeeamQM parameter is not set enabling the use of VMware VMotion. The -
DeleteSourceVmFiles parameter is set to enable the clear up of the original VM files upon successful
migration. The -RunAsync parameter is not set.
Start-VBRQuickMigration -Entity $vm -Server $server -ResourcePool
$pool -Datastore $d -Folder $folder -DeleteSorceVmFiles
294 | Veeam Backup PowerShell |REFERENCE| REV 2
Data Recovery
Restore VMs or files from backups or tape archives.
Restore VMs and VM configuration files
Operations VMware Hyper-V
Restores a VM Start-VBRRestoreVM Start-VBRHvRestoreVM
Restores VM configuration files Start-VBRRestoreVMFiles —
Restore guest OS Windows files
Operations VMware Hyper-V
Recovers guest Windows OS
Start-VBRWindowsFileRestore —
files
Stops guest Windows OS file
Stop-VBRWindowsFileRestore —
recovery session
Restore guest OS non-Windows files
Operations VMware Hyper-V
Recovers guest non-Windows
OS files (Linux, Unix, BSD, Start-VBRLinuxFileRestore Start-VBRLinuxFileRestore
MacOS and other)
Stops guest non-Windows OS
Stop-VBRLinuxFileRestore Stop-VBRLinuxFileRestore
file recovery session
Work with restore sessions
Operations VMware Hyper-V
Looks for restore sessions Get-VBRRestoreSession Get-VBRRestoreSession
Removes a restore session Remove-VBRRestoreSession Remove-VBRRestoreSession
295 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRRestoreSession
Short Description
Returns restore sessions.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRRestoreSession [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet returns the list of restore sessions stored in Veeam Backup & Replication database.
You can get the list of all restore sessions or get the restore sessions of a specific VM or VM(s).
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the VM you
want to get the restore session of,
Name or search conditions. False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for all restore sessions stored in the database.
Get-VBRRestoreSession
Example 2
This command looks for the restore sessions of the VMs named "Hv_DNS" and "Hv_DC".
Get-VBRRestoreSession -Name "Hv_DNS", "Hv_DC"
296 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRRestoreSession
Short Description
Removes a restore session.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBRRestoreSession [-Session] <CRestoreSession[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRRestoreSession
Detailed Description
This cmdlet removes the specified restore session from Veeam Backup & Replication.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the restore session you (ByValue,
Session True 1 False
want to remove. ByProperty
Name)
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the False Named False False
cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm False Named False False
user is sure that they want to
continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
297 | Veeam Backup PowerShell |REFERENCE| REV 2
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
298 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRHvRestoreVM
Short Description
Starts restore of the entire VM.
Applies to
Platform: Hyper-V
For VMware, run Start-VBRRestoreVM.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRHvRestoreVM [-RestorePoint] <COib> [-Server <CHost>] [-
Path <String>] [-VMName <String>] [-PreserveVmID [<Boolean>]] [-
PowerUp] [-RegisterAsClusterResource] [-NICsEnabled [<Boolean>]]
[-PreserveMACs [<Boolean>]] [-User <String>] [-Password <String>]
[-Credential <PSCredential>] [-Reason <String>] [-RunAsync] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Get-VBRServer
Detailed Description
This cmdlet starts restore of the entire VM.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Restore Specifies the VM restore point (ByValue,
True 1 False
Point to which you want to restore. ByProperty
Name)
Specifies the host where you
Server want to locate the restored False Named False False
VM.
Specifies the path to the
Path folder where you want to False Named False False
restore the VM.
Specifies the name you want
to apply to the restored VM.
VMName False Named False False
By default, the original VM
name is applied.
If set to TRUE, the restored VM
Preserve will get the ID of the original
False Named False False
VmID VM. Otherwise, the restored
VM will get a new ID.
299 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Note that if the original VM
keeps running, preserving the
ID will cause conflict.
Preserving the ID is useful in
case the original VM will not
be used in future - in this case,
Veeam Backup & Replication
will recognize the restored
VM as its original and perform
all backup and other
operations that were
scheduled for the original VM.
If set, the restored VM will be
powered up immediately
PowerUp after the restore. Otherwise, False Named False False
you will have to power up the
VM manually.
If set, the restored VM will be
RegisterAs
registered as a part of a
Cluster False Named False False
cluster in case you restore the
Resource
VM to a clustered host.
If set to True, the restored VM
will be connected to the
NICsEnabled network. Otherwise the VM False Named False False
will have no network
connections.
If set to TRUE, the restored VM
will get the MAC address of
the original VM. Otherwise,
the restored VM will get a
new MAC address.
Note that if the original VM
keeps running, preserving the
PreserveMACs MAC address will cause False Named False False
conflict. Preserving the MAC
address is useful in case the
original VM will not be used in
future - in this case, the
restored VM will be able to
use the MAC settings used by
its applications, if any are
installed.
Specifies the user name you
want to use for authenticating
with the VM.
User If you use the False Named False False
Username/Password scenario,
the -Credentials parameter
must be omitted.
Specifies the password you
want to use for authenticating
Password False Named False False
with the VM.
If you use the
300 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Username/Password scenario,
the -Credentials parameter
must be omitted.
Specifies the credentials you
want to use for authenticating
with the VM.
Credential If you use the Credentials False Named False False
scenario, the -User and -
Password parameters must be
omitted.
Specifies the reason for
performing restore of the
selected VM.
Reason The information you provide False Named False False
will be saved in the session
history so that you can
reference it later.
Indicates that the command
returns immediately without
RunAsync False Named False False
waiting for the task to
complete.
Indicates that the incremental
QuickRollback False Named False False
restore must be performed.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
301 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRLinuxFileRestore
Short Description
Starts non-Windows VM guest OS file restore.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
This cmdlet provides two parameter sets.
For Hyper-V (default):
Start-VBRLinuxFileRestore -RestorePoint <COib> [-Reason <String>]
-Server <CHost> -NetworkInfo <IVBRServerNetworkInfo> [-IP
<IPAddress>] [-NetworkMask <String>] [-Gateway <IPAddress>] [-
VLanId <Int32>] [-EnableFTP] [-WarningAction <ActionPreference>]
[-WarningVariable <String>] [<CommonParameters>]
For VMware:
Start-VBRLinuxFileRestore -RestorePoint <COib> [-Reason <String>]
-Server <CHost> -ResourcePool <CViResourcePoolItem> -NetworkInfo
<IVBRServerNetworkInfo> [-IP <IPAddress>] [-NetworkMask <String>]
[-Gateway <IPAddress>] [-FromNSS] [-EnableFTP] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Use the appropriate syntax for respective platform.
Related Commands
Get-VBRRestorePoint
Get-VBRServer
Get-VBRHvServerNetworkInfo / Get-VBRViServerNetworkInfo
Find-VBRViResourcePool
Detailed Description
This cmdlet starts restore of VM guest OS files from 15 file systems such as Linux, Unix, BSD, MacOS
and many others.
For non-Windows file level restore, an assisting proxy appliance running Linux is used. Veeam Backup
& Replication mounts disks of the restored VM to the proxy appliance as virtual hard drives.
For Windows OS file restore, run Start-VBRWindowsFileRestore.
This cmdlet requires finalizing. When you restore all needed files, run Stop-VBRLinuxFileRestore to
unmount disks and powers the proxy appliance off.
Important! You need to save the restore session to a variable when you run this cmdlet. Otherwise you will be
unable to finalize the restore session with PowerShell.
302 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the restore
True (ByValue,
Restore point from which you
True Named ByProperty False
Point want to restore the VM
Name)
guest OS files.
Specifies the reason for
performing files restore.
The information you
Reason provide will be saved in False Named False False
the session history so
that you can reference it
later.
Specifies the host on
which the proxy
appliance must be
registered.
IMPORTANT! When True (by
Server choosing the host for True Named ValueFromPipeline False
the Novell file system ByPropertyName)
proxy appliance, make
sure that it allows
running VMs with 64-bit
guest OS'es.
Specifies the network
settings for the proxy
appliance. The proxy
Network appliance must be
True Named False False
Info placed in the same
network where the
Veeam backup server
resides.
Specifies the IP address
for the proxy appliance.
The proxy appliance
must be placed in the
IP same network where False Named False False
the Veeam backup
server resides.
Accepts IPAddress or
string type.
Specifies the network
mask for the proxy
appliance. The proxy
Network appliance must be
False Named False False
Mask placed in the same
network where the
Veeam backup server
resides.
Specifies the default
Gateway gateway for the proxy False Named False False
appliance. The proxy
appliance must be
303 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
placed in the same
network where the
Veeam backup server
resides.
Used for Hyper-V
platform.
VLanId False Named False False
Specifies the VLAN ID for
the proxy appliance.
Indicates that the FTP
Enable access to the restored
False Named False False
FTP file system will be
enabled.
Used for VMware
platform.
True (by
Resource Specifies a resource pool True Named ValueFromPipeline False
Pool to which the proxy ByPropertyName)
appliance must be
placed.
Used for restore files in
Novell Storage services
file system.
Indicates that Veeam
FromNSS Backup & Replication False Named False False
will deploy a specific
proxy appliance that
supports the Novell file
system.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This example shows how to start a file restore session for a non-Windows VM in the Hyper-V
environment.
• The restore session is saved to the '$linuxflr' variable to use it for finalizing in future.
• The restore point is obtained with Get-VBRRestorePoint and assigned to the '$restorepoint'
variable beforehand.
• The host where the proxy appliance will be deployed is obtained with Get-VBRServer and
assigned to the '$hvhost01' variable beforehand.
• The network in which the proxy appliance will be registered is obtained with Get-
VBRHvServerNetworkInfo and assigned to the '$targetnetwork' variable beforehand.
$linuxflr = Start-VBRLinuxFileRestore -RestorePoint $restorepoint
-Server $hvhost01 -NetworkInfo $targetnetwork
304 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 2
This example shows how to start a file restore session for a non-Windows VM in the VMware
environment.
• The restore session is saved to the '$linuxflr' variable to use it for finalizing in future.
• The restore point is obtained with Get-VBRRestorePoint and assigned to the '$restorepoint'
variable beforehand.
• The host where the proxy appliance will be deployed is obtained with Get-VBRServer and
assigned to the '$esx01' variable beforehand.
• The resource pool is obtained with Find-VBRViResourcePool and assigned to the
'$resourcepool' variable beforehand.
• The network in which the proxy appliance will be registered is obtained with Get-
VBRViServerNetworkInfo and assigned to the '$targetnetwork' variable beforehand.
$linuxflr = Start-VBRLinuxFileRestore -RestorePoint $restorepoint
-Server $esx01 -ResourcePool $resourcepool -NetworkInfo
$targetnetwork
305 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRRestoreVM
Short Description
Starts restore of the entire VM.
Applies to
Platform: VMware
For Hyper-V, run Start-VBRHvRestoreVM.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
This cmdlet provides two parameter sets.
For restore to another location:
Start-VBRRestoreVM [-RestorePoint] <COib> [-Server] <CHost> [[-
ResourcePool] <CViResourcePoolItem>] [[-Datastore]
<CViDatastoreItem>] [-Folder <CViFolderItem>] [-StoragePolicy
<VBRViStoragePolicy>] [-VMName <string>] [-DiskType
<EDiskCreationMode> {Source | Thick | Thin}] [-PowerUp <bool>] [-
Reason <string>] [-RunAsync] [-QuickRollback]
[<CommonParameters>]
For restore to original location:
Start-VBRRestoreVM [-RestorePoint] <COib> [-VMName <string>] [-
DiskType <EDiskCreationMode> {Source | Thick | Thin}] [-PowerUp
<bool>] [-Reason <string>] [-RunAsync] [-QuickRollback] [-
ToOriginalLocation] [-StoragePolicyAction
<VBRStoragePolicyAction> {Current | Stored | Default}]
[<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Get-VBRServer
Find-VBRViResourcePool
Find-VBRViDatastore
Find-VBRViStoragePolicy
Find-VBRViFolder
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. Use an
appropriate parameter set for each case.
306 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the VM restore point (ByValue,
RestorePoint True 1 False
to which you want to restore. ByProperty
Name)
Specifies the host where you
Server want to locate the restored True 2 False False
VM.
Specifies the resource pool
ResourcePool where you want to locate the False 3 False False
restored VM.
Specifies the datastore to
Datastore which you want to connect False 4 False False
the restored VM.
Specifies the VMware storage
policy profile that must be
StoragePolicy False Named False False
applied to the restored virtual
disks.
Specifies the folder where
Folder you want to locate the False Named False False
restored VM.
Specifies the name you want
to apply to the restored VM.
VMName False Named False False
By default, the original VM
name is applied.
Specifies the disk type you
DiskType want to apply to the restored False Named False False
VM: Thin, Thick or AsOriginal.
If set, the restored VM will be
powered up immediately
PowerUp after the restore. Otherwise, False Named False False
you will have to power up the
VM manually.
Specifies the reason for
performing restore of the
selected VM.
Reason The information you provide False Named False False
will be saved in the session
history so that you can
reference it later.
Indicates that the command
returns immediately without
RunAsync False Named False False
waiting for the task to
complete.
Indicates that the incremental
QuickRollback False Named False False
restore must be performed.
ToOriginal Indicates that the VM must be False Named False False
307 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Location restored with original
ResourcePool, Datastore and
Folder settings.
Specifies the strategy for
selecting storage policy
profile in case the storage
profile of the backed up VM
differs from the profile of the
original VM.
Current: the restored VM
will be subscribed
to the same profile
as in backup (if such
profile still exists) or
to the profile to
Storage which the original
PolicyAction VM is subscribed (if
profile as in backup
was removed).
Default: the restored VM
will be subscribed
to the profile that is
set as default for the
target datastore.
Stored: the restored VM
will be subscribed
to the profile as in
backup (if such
profile still exists).
<CommonParameters>
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 PowerShell |REFERENCE| REV 2
Example 1
This command restores a VM to the original location.
• The restore point is obtained with Get-VBRRestorePoint and assigned to the the
'$restorepoint' variable.
• The storage policy selection strategy is set to Default.
Start-VBRRestoreVM -RestorePoint $restorepoint -Reason "Test
restore" -ToOriginalLocation -StoragePolicyAction Default
Example 2
This example starts restore of the VM to another location.
• The restore point is obtained with Get-VBRRestorePoint and assigned to the the '$point'
variable.
• The target host is obtained with Get-VBRServer and assigned to the '$server' variable.
• The resource pool is obtained with Find-VBRViResourcePool and assigned to the '$rpool'
variable.
• The datastore is obtained with Find-VBRViDatastore and assigned to the '$datastore' variable.
• The PowerUp parameter is set to $TRUE to boot the VM after it is restored.
Start-VBRRestoreVM –RestorePoint $point –Server $server –
ResourcePool $rpool –Datastore $datastore –PowerUp $TRUE
309 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRRestoreVMFiles
Short Description
Restores VM configuration files.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRRestoreVMFiles [-RestorePoint] <COib> [-Server] <CHost>
[-Path] <String> [-Files <COIBFileInfo[]>] [-Reason <String>] [-
RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Get-VBRServer
Get-VBRFilesInRestorePoint
Detailed Description
This cmdlet allows you to restore configuration file (.vmx) or virtual disks (.vmdk) of a selected VM.
Run Start-VBRWindowsFileRestore to restore VM disks data.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True (by Value
Specifies the VM
FromPipeline,
RestorePoint restore point to which True 1 False
ValueFromPipeline
you want to restore.
ByPropertyName)
Specifies the host to
which the VM guest
Server True 2 False False
files should be
restored.
Specifies the string
with the path to the
Path True 3 False False
folder where restored
files should be saved.
Specifies the files you
want to restore.
True
Files By default, all files False Named False
(ByName)
from the VM will be
restored.
Reason Specifies the string False Named False False
with the reason for
310 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
performing the VM
guest OS file restore.
Indicates that the
command returns
RunAsync immediately without False Named False False
waiting for the task to
complete.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
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 $server variable to the C:\BackupFiles folder.
Start-VBRRestoreVMFiles –RestorePoint $point –Server $server –
Path “C:\BackupFiles”
311 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRWindowsFileRestore
Short Description
Starts VM files restore.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRWindowsFileRestore [-RestorePoint] <COib> [-Reason
<String>] [[-Host] <CHost>] [[-ResourcePool]
<CViResourcePoolItem>] [[-Folder] <CViFolderItem>] [-
WarningAction <ActionPreference>] [-WarningVariable
<String>][<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Get-VBRServer
Find-VBRViResourcePool
Find-VBRViFolder
Detailed Description
This cmdlet allows you to restore files stored on disks of VM running Windows or from Endpoint
backups.
This cmdlet mounts the disks of the backed up VM(s) to the Veeam backup server or other server in
your virtual infrastructure. The disks are published directly from the backup file. After the disks are
mounted, you can copy the needed files to any disk or folder accessible by Veeam backup server.
To stop the file restore session and unmount the disks, run Stop-VBRWindowsFileRestore.
Important! You need to save the restore session to a variable when you run this cmdlet. Otherwise you will be
unable to finalize the restore session with PowerShell.
Run Start-VBRRestoreVMFiles to restore VM configuration files.
312 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the restore point of a True
VM or an Endpoint backup (ByValue,
RestorePoint True 1 False
from which you want to ByProperty
restore files. Name)
Specifies the string with the
Reason reason for performing file False Named False False
restore.
Specifies the host to which the
snapshot clone/virtual copy
Host must be mounted and on False 2 False False
which the temporary VM must
be created.
Specifies the resource pool to
ResourcePool which the temporary VM must False 3 False False
be placed.
Specifies the folder to which
Folder the temporary VM must be False 4 False False
placed.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
313 | Veeam Backup PowerShell |REFERENCE| REV 2
Example
This example shows how to perform the whole file restore process.
1. A new file level restore session is initiated with by running Start-VBRWindowsFileRestore:
• The list of available restore points produced by the backup job 'Job 1' is obtained with
Get-VBRRestorePoint and piped down.
• The restore points are sorted with Sort-Object method by the "creationtime" property to
get the most recent one.
• The restore session is assigned to the $result variable.
2. To copy the files, you need to obtain the mount point for the target mounted volume:
• The path is obtained with the MountSession.MountedDevices property which helps to
map the mounted volumes to drives letters of the original VM.
• The mount point is assigned to the $flrmountpoint variable.
3. The mount point is used to obtain the path to the files. The path is assigned to the $file
variable.
4. The files are copied to the root of C:\ drive.
5. The file restore session is stopped with Stop-VBRWindowsFileRestore.
$result = Get-VBRBackup | where {$_.jobname -eq "Job 1"} | Get-
VBRRestorePoint | where {$_.name -eq "VM1"} | Sort-Object
creationtime -Descending | Select-Object -First 1 | Start-
VBRWindowsFileRestore
$flrmountpoint = ($result.MountSession.MountedDevices | ?
{$_.DriveLetter -eq (Split-Path -Qualifier
$origfile)}).MountPoint
$file = $flrmountpoint + (Split-Path -NoQualifier $origfile)
Copy $file c:\
Stop-VBRWindowsFileRestore $result
314 | Veeam Backup PowerShell |REFERENCE| REV 2
Stop-VBRLinuxFileRestore
Short Description
Finalizes non-Windows VM guest OS file restore.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Stop-VBRLinuxFileRestore -LinuxFlrObject <VBRLinuxFlrObject> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet terminates non-Windows VM guest OS file restore process started with Start-
VBRLinuxFileRestore.
When you terminate the non-Windows VM guest OS file restore, Veeam Backup & Replication
unmounts virtual disks and powers the proxy appliance off. Note that you cannot restore files after the
disks are unmounted.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the Linux file restore True
LinuxFlr process initiated by Start- (ByValue,
True Named False
Object VBRLinuxFileRestore that you ByProperty
want to stop. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command stops a file restore session initiated with Start-VBRLinuxFileRestore.
This example uses the '$linuxflr' variable that contains the object of the restore session. The session
object was saved to the variable during the restore session start.
Stop-VBRLinuxFileRestore -LinuxFlrObject $linuxflr
315 | Veeam Backup PowerShell |REFERENCE| REV 2
Stop-VBRWindowsFileRestore
Short Description
Stops guest OS file recovery session for VMs running Windows.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
This cmdlet provides two parameter sets:
to stop the restore session:
Stop-VBRWindowsFileRestore [[-FileRestore] <FileRestore>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
to unmount disks:
Stop-VBRWindowsFileRestore [-MountPoint <String>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet finalizes the restore session initiated with Start-VBRWindowsFileRestore.
To finalize the restore session, you can use the following options:
Submit the session object.
You need to save the object of the restore session the moment you start the session. If you
have saved it to a variable, you can use it with the FileRestore parameter.
Submit the path to any of disks that were mounted during the restore.
You need to know a temporary path to at least one of the VM virtual disks that were mounted
during the restore session. Note that when you provide path to one virtual disk, as the result
of the cmdlet all disk of the VM will be unmounted.
This cmdlet provides syntax for both scenarios accordingly.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the running file-level
FileRestore False 1 False False
restore session you want to stop.
Specifies the string with the path
MountPoint False Named False False
to the mounted disk.
316 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command stops a file restore session initiated with Start-VBRWindowsFileRestore.
This example uses the $result variable that contains the object of the restore session. The session
object was saved to the variable during the restore session start.
Stop-VBRWindowsFileRestore $Result
317 | Veeam Backup PowerShell |REFERENCE| REV 2
Instant VM Recovery
With the Instant VM Recovery technology, Veeam Backup & Replication starts a VM directly from a
backup, incremental or full, without copying it to production storage.
Veeam PowerShell supports full Instant VM Recovery capabilities, including restore to another location
or selecting a destination for redo logs.
See also:
Performing Instant Recovery of a VMware VM
Performing Instant Recovery of a Hyper-V VM
Instant VM Recovery Cmdlets
Start and manage the Instant Recovery sessions.
Operations VMware Hyper-V
Starts an instant
recovery of a Start-VBRvCloudInstantRecovery —
vCloud VM
Instantly recovers a
Start-VBRInstantRecovery Start-VBRHvInstantRecovery
VM from backup
Restarts a failed
— Restart-VBRInstantRecovery
instant recovery
Migrates a
recovered VM to the See Quick Migration Start-VBRHvInstantRecoveryMigration
production host
Terminates an
Stop-VBRInstantRecovery Stop-VBRInstantRecovery
instant recovery
Looks for instant
Get-VBRInstantRecovery Get-VBRInstantRecovery
recovery sessions
318 | Veeam Backup PowerShell |REFERENCE| REV 2
Performing Instant Recovery of a VMware VM
To leverage the Instant VM Recovery technology to restore a VM, you need to perform the following
steps:
1. Initiate the Instant Recovery process with Start-VBRInstantRecovery. This cmdlet allows you to
use the following options:
• Restore the VM to original location or to another location. The Start-VBRInstantRecovery
cmdlet provides a number of parameters to set the new location: Server, ResourcePool
and Folder. To restore the VM to the original location, skip these parameters.
• Change the destination for storing the redo logs. By default, the changes made to the VM
are written to the Veeam backup server. Use the Datastore parameter ti set the new
location.
• Connect VM to network. Use the NICsEnabled parameter to connect the restored VM to
the network.
• Power on VM automatically. Use the PowerUp parameter to indicate that the VM must be
automatically powered on after restore.
2. Finalize the restore process. 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
one of the following steps:
• Remove the restored VM. You can stop publishing the recovered VM and discard the
changes made to it while it was running from backup. To do this, run Stop-
VBRInstantRecovery.
• Migrate the restored VM to the production. See Quick Migration.
• You can also use the VM Copy or replicating mechanisms to move the VM. See VM Copy
or Backup and Replication Tasks.
3. You can check the session progress by running Get-VBRInstantRecovery.
This example shows the instant recovery of a VMware VM that will be restored to another location and
then migrated to the production site with the Quick Migration.
// Start the Instant Recovery:
PS C:\PS> $restorepoint = Get-VBRBackup -Name "Active
Directory Backup" | Get-VBRRestorePoint | Sort-Object
$_.creationtime -Descending | Select -First 1
PS C:\PS> $server02 = Get-VBRServer -Name "VMware Host 02"
PS C:\PS> $resourcepool = Find-VBRViResourcePool -Server
$server02 -Name "Restored"
PS C:\PS> Start-VBRInstantRecovery -RestorePoint $restorepoint
-Server $server02 -ResourcePool $resourcepool -Folder
"C:\Restored" -PowerUp $TRUE -NICsEnabled $TRUE -Reason "VM
recovery"
// Check the recovery session status:
PS C:\PS> Get-VBRInstantRecovery
VM Name Host Status Restore Point Backup Name
------- ---- ------ ------------- -----------
Active ... VMware... Mounted 1/13/2015 ... Active Dir...
319 | Veeam Backup PowerShell |REFERENCE| REV 2
// Migrate to production site:
PS C:\PS> $AD = Find-VBRViEntity -Server $server02 -Name
"Active Directory Server"
PS C:\PS> $production = Get-VBRServer -Name "VMware Production
Host"
PS C:\PS> Start-VBRQuickMigration -Entity $AD -Server
$production
320 | Veeam Backup PowerShell |REFERENCE| REV 2
Performing Instant Recovery of a Hyper-V VM
This example shows the instant recovery of a Hyper-V VM that will be restored to another location and
then migrated to the production site.
// Start the Instant Recovery:
PS C:\PS> $restorepoint = Get-VBRBackup -Name "Active
Directory Backup" | Get-VBRRestorePoint | Sort-Object
$_.creationtime -Descending | Select -First 1
PS C:\PS> $server02 = Get-VBRServer -Name "Hyper-V Host 02"
PS C:\PS> Start-VBRHvInstantRecovery -RestorePoint
$restorepoint -Server $server02 -Path "C:\Redo" -PreserveVmID
$TRUE -PowerUp $TRUE
// Check the recovery session status:
PS C:\PS> $RecoveryAD = Get-VBRInstantRecovery
VM Name Host Status Restore Point Backup Name
------- ---- ------ ------------- -----------
Active ... Hyper-... Mounted 1/13/2015 ... Active Dir...
// Migrate to production site:
PS C:\PS> Start-VBRHvInstantRecoveryMigration -InstantRecovery
$RecoveryAD
321 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRInstantRecovery
Short Description
Returns running Instant VM Recovery session.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRInstantRecovery [-Full] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet returns the Instant VM Recovery session running at the moment.
You can get the information about the instant recovery sessions in short or detailed view.
Return Type
InstantRecoveryDetails
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the information on
Full sessions and history returned in False Named False False
detailed view.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command gets the list of the instant recovery sessions in short view.
Get-VBRInstantRecovery
Example 2
This command gets the list of the instant recovery sessions in detailed view.
Get-VBRInstantRecovery -Full
322 | Veeam Backup PowerShell |REFERENCE| REV 2
Restart-VBRInstantRecovery
Short Description
Restarts a failed Hyper-V Instant Recovery session.
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Restart-VBRInstantRecovery [-InstantRecovery] <InstantRecovery[]>
[-WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRInstantRecovery
Detailed Description
This cmdlet restarts a failed Hyper-V Instant Recovery session started with Start-
VBRHvInstantRecovery.
Run Get-VBRInstantRecovery to get the status of the Instant Recovery session.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the instant recovery True
Instant session you want to restart. (ByValue,
True 1 False
Recovery You can assign multiple instant ByProperty
recovery sessions to this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
323 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command restarts the last instant recovery session. The needed session object is obtained with
Get-VBRInstantRecovery, selected by order and piped down.
Get-VBRInstantRecovery | Select -Last 1 | Restart-
VBRInstantRecovery
Example 2
This command restarts the instant recovery session represented by the $"Recovery Session" variable.
The needed session object is obtained with Get-VBRInstantRecovery and assigned to the variable
beforehand.
Restart-VBRInstantRecovery -InstantRecovery $"Recovery Session"
324 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRHvInstantRecovery
Short Description
Starts Hyper-V Instant VM Recovery.
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRHvInstantRecovery [-RestorePoint] <COib> [-Server]
<CHost> [-Path] <String> [-VMName <String>][-PreserveVmID
[<Boolean>]] [-PowerUp [<Boolean>]] [-NICsEnabled [<Boolean>]] [-
PreserveMACs [<Boolean>]] [-Reason <String>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Get-VBRServer
Detailed Description
This cmdlet allows to perform Instant Recovery of a Hyper-V VM. The Instant VM Recovery for Hyper-V
process creates a copy of a VM in a target location reading data from the directly from a compressed
and deduplicated backup file.
This cmdlet allows you to use the following options:
• Restore the VM to any available restore point, full or increment. Use the RestorePoint
parameter to indicate the needed restore point.
• Restore the VM to original location or to another location. Use the Server and Path
parameters to indicate the target location where the VM will be restored. You can indicate the
location of the original VM or any other host available with Veeam backup server that will act
as a staging location. If you choose the original location, make sure that the original VM is
powered off to avoid conflicts or restore the VM with a new name. Use the VMName
parameter to set the new name.
• Connect VM to network. Use the NICsEnabled parameter to connect the restored VM to the
network.
• Power on VM automatically. Use the PowerUp parameter to indicate that the VM must be
automatically powered on after restore.
• Restore the VM with the original ID or with a new ID. Note that if the original VM keeps
running, preserving the ID will cause conflict. Preserving the ID is useful in case the original
VM will not be used in future - in this case, Veeam Backup & Replication will recognize the
restored VM as its original and perform all backup and other operations that were scheduled
for the original VM.
325 | Veeam Backup PowerShell |REFERENCE| REV 2
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 one of the following steps:
• Remove the restored VM. You can stop publishing the recovered VM and discard the changes
made to it while it was running from backup. To do this, run Stop-VBRInstantRecovery.
• Migrate the restored VM to the production. To do this, run Start-
VBRHvInstantRecoveryMigration.
Run Restart-VBRInstantRecovery to restart the Instant Recovery session if it failed for some reason.
Run Get-VBRInstantRecovery to view the session status.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True (by Value
Specifies the VM restore
FromPipeline,
RestorePoint point to which you True 1 False
ValueFromPipeline
want to restore the VM.
ByPropertyName)
Specifies the host
Server where you want to True 2 False False
restore the VM.
Used to redirect the
redo logs.
Specifies the path to
Path the folder where you True 3 False False
want to store the
changes made to the
VM during the Instant
Recovery.
Specifies the name you
want to apply to the
VMName restored VM. By default, False Named False False
the original VM name is
applied.
If set to TRUE, the
restored VM will get the
Preserve
ID of the original VM. False Named False False
VmID
Otherwise, the restored
VM will get a new ID.
If set to TRUE, the VM
will be powered up
right after it is restored.
PowerUp False Named False False
Otherwise, you will
need to power up the
VM manually.
If set to TRUE, the
restored VM will be
connected to the
NICsEnabled False Named False False
network. Otherwise the
VM will have no
network connections.
Preserve If set to TRUE, the False Named False False
MACs restored VM will get the
326 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
MAC address of the
original VM. Otherwise,
the restored VM will get
a new MAC address.
Please note that if the
original VM keeps
running, preserving the
MAC address will cause
conflict. Preserving the
MAC address is useful
in case the original VM
will not be used in
future - in this case, the
restored VM will be able
to use the MAC settings
used by its applications,
if any are installed.
Specifies the reason for
performing restore of
the selected VM.
Reason The information you False Named False False
provide will be saved in
the session history so
that you can reference
it later.
Used to access the VMs
stored on shared
folders.
Credentials Specifies the False Named False False
credentials you want to
use to authenticate
with the shared folder.
<CommonParameters>
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 PowerShell |REFERENCE| REV 2
Example
This command starts Instant Recovery of the VM.
• The VM to restore is obtained together with the restore point to which the VM will be
restored with Get-VBRRestorePoint and assigned to the $rpoint variable beforehand.
• The Hyper-V host where the restored VM will be located in obtained with Get-VBRServer and
assigned to the $server variable beforehand.
• The file 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 $server
-Path "c:\Hyper-V\Virtual Hard Disks\Redo" -VMName "New-Exch01" -
PowerUp $True
328 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRHvInstantRecoveryMigration
Short Description
Performs VM migration to a Hyper-V host.
Applies to
Platform: Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRHvInstantRecoveryMigration [-InstantRecovery]
<InstantRecovery[]> [-WarningAction <ActionPreference>][-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRInstantRecovery
Detailed Description
This cmdlet migrates a recovered VM to the production host. You finalize the instant recovery of the
VM initiated with Start-VBRHvInstantRecovery by migrating the VM to production.
Run Stop-VBRInstantRecovery to terminate the recovery session by unpublishing the VM.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the session(s) started
with the Start-
VBRHvInstantRecovery cmdlet to True
Instant finalize migration of a recovered (ByValue,
True 1 False
Recovery VM to a Hyper-V host. ByProperty
Name)
You can assign multiple instant
recovery sessions to this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
329 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command finalizes the current instant recovery session. The session is obtained with Get-
VBRInstantRecovery and piped down.
Get-VBRInstantRecovery | Start-VBRHvInstantRecoveryMigration
Example 2
This command finalizes the instant recovery session represented by the $"Hv Instant Recovery"
variable. The session is obtained with Get-VBRInstantRecovery and assigned to the variable
beforehand.
Start-VBRHvInstantRecoveryMigration -InstantRecovery $"Hv Instant
Recovery"
330 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRInstantRecovery
Short Description
Starts VMware Instant VM Recovery.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRInstantRecovery [-RestorePoint] <COib> [-Server] <CHost>
[[-ResourcePool] <CViResourcePoolItem>] [-VMName <string>] [-
Datastore <CViDatastoreItem>] [-StoragePolicy
<VBRViStoragePolicy>] [-Folder <CViFolderItem>] [-PowerUp] [-
NICsEnabled] [-Reason <string>] [-RunAsync] [<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Get-VBRServer
Find-VBRViResourcePool
Find-VBRViDatastore
Find-VBRViFolder
Detailed Description
This cmdlet starts VM instant recovery.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the restore point to
(ByValue,
RestorePoint which you want to recover the True 1 False
ByProperty
VM.
Name)
Specifies the name you want
to apply to the restored VM.
VMName False Named False False
By default, the original VM
name is applied.
Used to restore the VM to
another location.
Specifies the target ESX(i) host
Server where you want to locate the True 2 False False
restored VM. You must not
specify a vCenter Server in this
parameter.
Used to restore the VM to
ResourcePool False 3 False False
another location.
331 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the resource pool
where you want to locate the
restored VM.
Used to redirect the redo logs.
Specifies the datastore to
Datastore which you want to store the False Named False False
changes made to the VM
during the Instant Recovery.
Specifies the VMware storage
policy profile that must be
StoragePolicy False Named False False
applied to the restored virtual
disks.
Used to restore the VM to
another location.
Folder Specifies the folder where you False Named False False
want to locate the restored
VM.
If set to True, the restored VM
will be powered up
PowerUp immediately after the restore. False Named False False
Otherwise, you will have to
power up the VM manually.
If set to True, the restored VM
will be connected to the
NICsEnabled network. Otherwise the VM False Named False False
will have no network
connections.
Specifies the reason for
performing restore of the
selected VM.
Reason The information you provide False Named False False
will be saved in the session
history so that you can
reference it later.
Indicates that the command
returns immediately without
RunAsync False Named False False
waiting for the task to
complete.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
332 | Veeam Backup PowerShell |REFERENCE| REV 2
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
333 | Veeam Backup PowerShell |REFERENCE| REV 2
Stop-VBRInstantRecovery
Short Description
Stops a running instant VM recovery process.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Stop-VBRInstantRecovery [-InstantRecovery] <InstantRecovery[]> [-
RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
Get-VBRInstantRecovery
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.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the running instant VM
Instant (ByValue,
recovery process that you want True 1 False
Recovery ByProperty
to stop.
Name)
Indicates that the command
RunAsync returns immediately without False Named False False
waiting for the task to complete.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
334 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command stops the last instant recovery session. The needed session object is obtained with Get-
VBRInstantRecovery, selected by order and piped down.
Get-VBRInstantRecovery | Select -Last 1 | Stop-VBRInstantRecovery
Example 2
This command storps the instant recovery session represented by the $"Recovery Session" variable.
The needed session object is obtained with Get-VBRInstantRecovery and assigned to the variable
beforehand.
Stop-VBRInstantRecovery -InstantRecovery $"Recovery Session"
335 | Veeam Backup PowerShell |REFERENCE| REV 2
SureBackup Recovery Verification
SureBackup is a Veeam technology providing verification of virtual machines that need other virtual
machines or services running, i.e. a domain controller, a DSN server or an 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.
With a SureBackup job, you can test VMs as well as replicas.
The SureBackup verification consists of several components: a virtual lab, an application group and a
SureBackup job.
See next:
Virtual Lab
Application Group
SureBackup Job
Note that the SureBackup technology requires Enterprise or Enterprise Plus product edition.
336 | Veeam Backup PowerShell |REFERENCE| REV 2
Virtual Lab
A virtual lab is a component of SureBackup technology that allows you to configure a model of your
production environment in a fenced-off lab.
One virtual lab can be used by several SureBackup jobs.
With Veeam PowerShell, you can create a basic virtual lab with automatically configured settings. The
network settings for the virtual lab will be used the same as configured for the Veeam Backup server.
See also:
Creating VMware Virtual Lab
Creating Hyper-V Virtual Lab
You will need the following cmdlets to create and manage the virtual labs:
Operation VMware Hyper-V
Creates a new virtual lab Add-VSBVirtualLab Add-VSBHvVirtualLab
Looks for virtual labs you manage Get-VSBVirtualLab Get-VSBHvVirtualLab
Find-VSBVirtualLab Find-VSBHvVirtualLab
Looks for virtual labs not
connected to your console (run Connect-VSBVirtualLab (run Connect-VSBHvVirtualLab
to add them) to add them)
Adds an existing virtual lab to
Connect-VSBVirtualLab Connect-VSBHvVirtualLab
your console
Removes a virtual lab Remove-VSBVirtualLab Remove-VSBHvVirtualLab
337 | Veeam Backup PowerShell |REFERENCE| REV 2
Working with VMware Virtual Lab
This example shows how to create a virtual lab and perform other actions on virtual labs from your
command line.
Create a virtual lab
To add a virtual lab, you will need to perform the following steps:
1. Get the VMware host on which you want to create the virtual lab with Get-VBRServer and
save it to a variable.
2. Get the datastore that will be used for storing the redo logs running Find-VBRViDatastore and
save it to a variable.
3. Run Add-VSBVirtualLab with these variables to create the virtual lab.
// Get the host:
PS C:\PS> $host = Get-VBRServer -Type ESXi
// Get a datastore:
PS C:\PS> $datastore = Find-VBRViDatastore -Name "Datastore1"
-Server $host
// Create the virtual lab:
PS C:\PS> Add-VSBVirtualLab -Name "Microsoft Exchange Vlab" -
Server $host -Datastore $datastore
Remove the virtual lab
If you no longer need a virtual lab, you can remove it.
To remove a virtual lab, you will need to perform the following steps:
1. Get the virtual lab that you want to remove with Get-VSBVirtualLab.
2. Run Remove-VSBVirtualLab to remove it.
// Get the virtual lab and pipe it down:
PS C:\PS> Get-VSBVirtualLab -Name "Microsoft Exchange Vlab" |
Remove-VSBVirtualLab
338 | Veeam Backup PowerShell |REFERENCE| REV 2
Connect an existing virtual lab
If you have virtual labs that are not added to your Veeam backup console, you can look for them and
connect them.
You will need to perform the following steps:
1. Run Find-VSBVirtualLab to look for the virtual lab. You will need to get the host where it is
located first.
2. Add them with Connect-VSBVirtualLab.
Note that the Find-VSBVirtualLab cmdlet can be used only to look for the virtual labs that are not
connected to the Veeam backup server. You can use the objects that you obtain with it only with the
Connect-VSBVirtualLab cmdlet. For all other purposes, run Get-VSBVirtualLab.
// Find the virtual lab:
PS C:\PS> $newvlab = Get-VBRServer -Name "ESXi01" | Find-
VSBVirtualLab -Name "Virtual Lab 02"
// Connect the virtual lab:
PS C:\PS> Connect-VSBVirtualLab -VirtualLab $newvlab
339 | Veeam Backup PowerShell |REFERENCE| REV 2
Working with Hyper-V Virtual Lab
This example shows how to create a virtual lab and perform other actions on virtual labs from your
command line.
Create a virtual lab
To add a virtual lab, you will need to perform the following steps:
1. Get the Hyper-V host on which you want to create the virtual lab with Get-VBRServer and
save it to a variable.
2. Run Add-VSBHvVirtualLab with this variable to create the virtual lab.
// Get the host:
PS C:\PS> $host = Get-VBRServer -Type Hyper-V
// Create the virtual lab:
PS C:\PS> Add-VSBHvVirtualLab -Name "Microsoft Exchange Vlab"
-Server $server -Folder "c:\VirtualLabs"
Remove the virtual lab
If you no longer need a virtual lab, you can remove it.
To remove a virtual lab, you will need to perform the following steps:
1. Get the virtual lab that you want to remove with Get-VSBHvVirtualLab.
2. Run Remove-VSBHvVirtualLab to remove it.
// Get the virtual lab and pipe it down:
PS C:\PS> Get-VSBHvVirtualLab -Name "Microsoft Exchange Vlab"
| Remove-VSBHvVirtualLab
Connect an existing virtual lab
If you have virtual labs that are not added to your Veeam backup console, you can look for them and
connect them.
You will need to perform the following steps:
1. Run Find-VSBHvVirtualLab to look for the virtual lab. You will need to get the host where it is
located first.
2. Add them with Connect-VSBHvVirtualLab.
Note that the Find-VSBHvVirtualLab cmdlet can be used only to look for the virtual labs that are not
connected to the Veeam backup server. You can use the objects that you obtain with it only with the
Connect-VSBHvVirtualLab cmdlet. For all other purposes, run Get-VSBHvVirtualLab.
// Find the virtual lab:
PS C:\PS> $newvlab = Get-VBRServer -Type HvServer | Find-
VSBHvVirtualLab -Name "Virtual Lab 02"
// Connect the virtual lab:
PS C:\PS> Connect-VSBHvVirtualLab -VirtualLab $newvlab
340 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VSBHvVirtualLab
Short Description
Creates a Hyper-V virtual lab.
Applies to
Platform: Hyper-V
For VMware, run Add-VSBVirtualLab.
Product Edition: Enterprise, Enterprise Plus
Syntax
Add-VSBHvVirtualLab -Name <String> -Server <CHost> -Folder
<String> [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
Get-VBRServer
Detailed Description
This cmdlet creates a new Hyper-V virtual lab.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you want to
Name True Named False False
assign to the virtual lab.
Specifies the Hyper-V host where
Server True Named False False
the virtual lab should be created.
Specifies the path to the folder
Folder where the redo log files of the True Named False False
virtual lab will be stored.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command creates a new virtual lab named "Exchange VLab 01". The server where the virtual lab
will be located is obtained with Get-VBRServer and assigned to the $server variable beforehand. The
folder path to store the redo files is c:\VirtualLabs.
Add-VSBHvVirtualLab -Name "Exchange VLab 01" -Server $server -
Folder "c:\VirtualLabs"
341 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VSBVirtualLab
Short Description
Creates a VMware virtual lab.
Applies to
Platform: VMware
For Hyper-V, run Add-VSBHvVirtualLab.
Product Edition: Enterprise, Enterprise Plus
Syntax
Add-VSBVirtualLab [-Name] <String> [-Server] <CHost> [-Datastore]
<CViDatastoreItem> [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRServer
Find-VBRViDatastore
Detailed Description
This cmdlet creates a new VMware virtual lab.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the string with the name
Name you want to assign to the virtual True 1 False False
lab.
Specifies the ESX(i) host where the
Server True 2 False False
virtual lab should be created.
Specifies the datastore on which
Datastore redo logs for tested VMs should be True 3 False False
stored.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
342 | Veeam Backup PowerShell |REFERENCE| REV 2
Example
This command creates a new virtual lab named "Exchange VLab 01". The server where the virtual lab
will be located is obtained with Get-VBRServer and assigned to the $server variable beforehand. The
datastore to store the redo files is obtained with Find-VBRViDatastore and assigned to the $datastore
variable beforehand.
Add-VSBVirtualLab -Name "Exchange VLab 01" -Server $server -
Datastore $datastore
343 | Veeam Backup PowerShell |REFERENCE| REV 2
Connect-VSBHvVirtualLab
Short Description
Connects an existing Hyper-V virtual lab.
Applies to
Platform: Hyper-V
For VMware, run Connect-VSBVirtualLab.
Product Edition: Enterprise, Enterprise Plus
Syntax
Connect-VSBHvVirtualLab [-VirtualLab] <CHvLabShortInfo> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Find-VSBHvVirtualLab
Detailed Description
This cmdlet connects an existing Hyper-V virtual lab to Veeam Backup & Replication console.
When you add a new host to your Veeam Backup & Replication console, the virtual labs that are
registered on it are not added automatically. Use this cmdlet to add the virtual labs to your Veeam
Backup & Replication console.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the virtual lab you
(ByValue,
VirtualLab want to connect to your Veeam True 1 False
ByProperty
Backup & Replication console.
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
344 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command connects a virtual lab named "Exchange VLab 01". The virtual lab to connect is
obtained with Find-VSBHvVirtualLab by looking for the specific virtual lab by name on the server
represented by the $server variable. The server object is obtained with Get-VBRServer and assigned to
the variable beforehand.
Find-VSBHvVirtualLab -Server $server -Name "Exchange VLab 01" |
Connect-VSBHvVirtualLab
Example 2
This command connects a virtual lab represented by the $VLab01 variable. The virtual lab object is
obtained with Find-VSBHvVirtualLab and assigned to the variable beforehand.
Connect-VSBHvVirtualLab -VirtualLab $VLab01
345 | Veeam Backup PowerShell |REFERENCE| REV 2
Connect-VSBVirtualLab
Short Description
Connects an existing VMware virtual lab.
Applies to
Platform: VMware
For Hyper-V, run Connect-VSBHvVirtualLab.
Product Edition: Enterprise, Enterprise Plus
Syntax
Connect-VSBVirtualLab [-VirtualLab] <CVirtualLabDescriptor> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Find-VSBVirtualLab
Detailed Description
This cmdlet connects an existing VMware virtual lab to Veeam Backup & Replication console.
When you add a new host to your Veeam Backup & Replication console, the virtual labs that are
registered on it are not added automatically. Use this cmdlet to add the virtual labs to your Veeam
Backup & Replication console.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the virtual lab you (ByValue,
VirtualLab True 1 False
want to connect. ByProperty
Name)
<CommonParameters>
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 PowerShell |REFERENCE| REV 2
Example 1
This command connects a virtual lab named "Exchange VLab 01" to Veeam Backup & Replication. The
server where the virtual lab is located is obtained with Get-VBRServer and assigned to the $server
variable beforehand.
Find-VSBVirtualLab -Server $server -Name "Exchange VLab 01" |
Connect-VSBVirtualLab
Example 2
This command connects a virtual lab represented by the $VLab01 variable. The virtual lab object is
obtained with Find-VSBVirtualLab and assigned to the variable beforehand.
Connect-VSBVirtualLab -VirtualLab $VLab01
347 | Veeam Backup PowerShell |REFERENCE| REV 2
Find-VSBHvVirtualLab
Short Description
Looks for the virtual labs created on the specified Hyper-V host.
Applies to
Platform: Hyper-V
For VMware, run Find-VSBVirtualLab.
Product Edition: Enterprise, Enterprise Plus
Syntax
Find-VSBVirtualLab [-Server] <CHost> [-Name <String[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRServer
Detailed Description
This cmdlet returns a list of all virtual labs created on the specified Hyper-V host, both registered in
Veeam Backup & Replication and not.
You can get the list of all virtual labs on the specified Hyper-V host or look for instances directly by
name.
Run Connect-VSBHvVirtualLab to add the unregistered virtual labs to Veeam Backup & Replication.
Return Type
CHvSbVirtualLab
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the server on which (ByValue,
Server True 1 False
you want to look for virtual labs. ByProperty
Name)
Specifies the name of the
virtual lab or search conditions.
Name False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
348 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the list of all virtual labs created on the Hyper-V server named "Hyper-V Host".
The server object is obtained with Get-VBRServer and piped down.
Get-VBRServer -Name "Hyper-V Host" | Find-VSBHvVirtualLab
Example 2
This command looks for the virtual labs with names starting with "Hv" on the server represented by
the $server variable. The server object is obtained with Get-VBRServer and assigned to the variable
beforehand.
Find-VSBHvVirtualLab -Server $server -Name Hv*
349 | Veeam Backup PowerShell |REFERENCE| REV 2
Find-VSBVirtualLab
Short Description
Looks for virtual labs created on the specified ESX(i) host.
Applies to
Platform: VMware
For Hyper-V, run Find-VSBHvVirtualLab.
Product Edition: Enterprise, Enterprise Plus
Syntax
Find-VSBVirtualLab [-Server] <CHost> [-Name <String[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRServer
Detailed Description
This cmdlet returns a list of all virtual labs created on the specified ESX(i) host, both registered in
Veeam Backup & Replication and not.
You can get the list of all VMware virtual labs on the specified ESX(i) host or look for instances directly
by name.
Run Connect-VSBVirtualLab to add the unregistered virtual labs to Veeam Backup & Replication.
Return Type
CVirtualLabDescriptor
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the server on which (ByValue,
Server True 1 False
you want to look for virtual labs. ByProperty
Name)
Specifies the name of the
resource pool you want to get,
Name or search conditions. False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
350 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the list of all virtual labs located on the ESXi hosts. The servers are obtained
with Get-VBRServer, sorted by "Type" and piped down.
Get-VBRServer -Type ESXi | Find-VSBVirtualLab
Example 2
This command looks for the virtual lab named "MailServer_VLab" connected to the ESXi host named
"ESXiHost". The server is obtained with Get-VBRServer and piped down.
Get-VBRServer -Name "ESXiHost" | Find-VSBVirtualLab -Name
"MailServer_VLab"
351 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VSBHvVirtualLab
Short Description
Returns Hyper-V virtual labs.
Applies to
Platform: Hyper-V
For VMware, run Get-VSBVirtualLab.
Product Edition: Enterprise, Enterprise Plus
Syntax
Get-VSBVirtualLab [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet returns the list of Hyper-V virtual labs that are connected to the Veeam backup console.
Run Find-VSBHvVirtualLab to look for virtual labs that are not managed by Veeam Backup &
Replication.
You can get the list of all virtual labs or search for instances directly by name.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name(s) of the virtual
lab, or search conditions.
Name False 1 False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the 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*
352 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VSBVirtualLab
Short Description
Returns VMware virtual labs.
Applies to
Platform: VMware
For Hyper-V, run Get-VSBHvVirtualLab.
Product Edition: Enterprise, Enterprise Plus
Syntax
Get-VSBVirtualLab [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet returns the list of existing VMware virtual labs.
Run Find-VSBVirtualLab to look for virtual labs that are not managed by Veeam Backup & Replication.
You can get the list of all virtual labs or search for instances directly by name.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the VMware
virtual lab you want to get, or
Name search conditions. False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the 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"
353 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VSBHvVirtualLab
Short Description
Removes a Hyper-V virtual lab.
Applies to
Platform: Hyper-V
For VMware, run Remove-VSBVirtualLab.
Product Edition: Enterprise, Enterprise Plus
Syntax
Remove-VSBHvVirtualLab [-VirtualLab] <CHvSbVirtualLab[]> [-
WarningAction <ActionPreference>][-WarningVariable <String>] [-
WhatIf][-Confirm][<CommonParameters>]
Related Commands
Get-VSBHvVirtualLab
Detailed Description
This cmdlet removes a specified Hyper-V virtual lab from Veeam Backup & Replication console.
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. Note that you cannot remove a virtual
lab from server with Veeam PowerShell.
You can add a removed virtual lab to your console by running Connect-VSBHvVirtualLab.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the virtual lab you
True(ByValue,
want to remove from your
VirtualLab True Named ByProperty False
Veeam Backup & Replication
Name)
console.
Specifies whether the cmdlet
writes a message that
describes the effects of
WhatIf False Named False False
running the cmdlet without
actually performing any
action.
Specifies whether the cmdlet
displays a prompt that asks if
Confirm False Named False False
the user is sure that they want
to continue.
<CommonParameters>
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 PowerShell |REFERENCE| REV 2
Example 1
This command removes a virtual lab named "Virtual Lab 01". The virtual lab object is obtained with
Get-VSBHvVirtualLab and piped down.
Get-VSBHvVirtualLab -Name "Virtual Lab 01" | Remove-
VSBHvVirtualLab
Example 2
This command removes a virtual lab represented by the $vlab variable. The virtual lab object is
obtained with Get-VSBHvVirtualLab and assigned to variable beforehand.
Remove-VSBHvVirtualLab -VirtualLab $vlab
355 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VSBVirtualLab
Short Description
Removes a specified VMware virtual lab.
Applies to
Platform: VMware
For Hyper-V, run Remove-VSBHvVirtualLab.
Product Edition: Enterprise, Enterprise Plus
Syntax
Remove-VSBVirtualLab [-VirtualLab] <CViSbVirtualLab[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VSBVirtualLab
Detailed Description
This cmdlet removes a specified VMware virtual lab from Veeam Backup & Replication.
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. Note that you cannot remove a virtual
lab from server with Veeam PowerShell.
You can add a removed virtual lab to your console by running Connect-VSBVirtualLab.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the virtual lab you True
want to remove. (ByValue,
VirtualLab True 1 False
You can assign multiple virtual ByProperty
labs to this object. Name)
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the False Named False False
cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm False False False False
user is sure that they want to
continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
356 | Veeam Backup PowerShell |REFERENCE| REV 2
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
357 | Veeam Backup PowerShell |REFERENCE| REV 2
Application Group
Application groups are created to set a list of VMs that should be running together during the
verification. It is used with VMs that are dependent on services running on other VMs, such as a
domain controller or a DNS server. The VMs in the application group are started first to ensure the
proper testing environment.
You can set the order in which the VMs will be powered on when the SureBackup job starts. To do this
with Veeam PowerShell, add the VMs to the VM object in order they must boot.
Keep in mind that all VMs from the application group must belong to the same platform — VMware or
Hyper-V, and must have at least one valid restore point created by the time the SureBackup job starts.
The created application group can be reused by several SureBackup jobs.
See also:
Creating VMware Application Group
Creating Hyper-V Application Group
You will need the following cmdlets to create and manage the application groups:
Operation VMware Hyper-V
Work with application groups:
Creates a new application
Add-VSBViApplicationGroup Add-VSBHvApplicationGroup
group
Looks for application groups
Get-VSBApplicationGroup Get-VSBApplicationGroup
you manage
Removes an application group Remove-VSBApplicationGroup Remove-VSBApplicationGroup
358 | Veeam Backup PowerShell |REFERENCE| REV 2
Working with VMware Application Group
This example shows how to create an application group containing a DC server and the DNS server
and perform other actions on it.
Create an application group
You will need to perform the following steps:
1. Get the domain controller server and the DNS server and assign them to a variable. Because
the DC server is first in the search, it will boot first. Run Find-VBRViEntity for this.
2. Create the application group with Add-VSBViApplicationGroup using the created variable.
// Get the VMs:
PS C:\PS> $vms = Find-VBRViEntity -Name "DC", "DNSServer"
// Create the application group:
PS C:\PS> Add-VSBHvApplicationGroup -Name "Production
Application Group" -Vm $vms
Look for the application group
Run Get-VSBApplicationGroup to get the application group.
PS C:\PS> Get-VSBApplicationGroup -Name "Production
Application Group"
Remove the application group
Run Remove-VSBApplicationGroup to remove the application group.
PS C:\PS> Get-VSBApplicationGroup -Name "Production
Application Group"| Remove-VSBApplicationGroup
359 | Veeam Backup PowerShell |REFERENCE| REV 2
Working with Hyper-V Application Group
This example shows how to create an application group containing a DC server and the DNS server
and perform other actions on it.
Create an application group
You will need to perform the following steps:
1. Get the domain controller server and the DNS server and assign them to a variable. Because
the DC server is first in the search, it will boot first. Run Find-VBRHvEntity for this.
2. Create the application group with Add-VSBHvApplicationGroup using the created variable.
// Get the VMs:
PS C:\PS> $vms = Find-VBRHvEntity -Name "DC", "DNSServer"
// Create the application group:
PS C:\PS> Add-VSBHvApplicationGroup -Name "Production
Application Group" -VmFromBackup $vms
Look for the application group
Run Get-VSBApplicationGroup to get the application group.
PS C:\PS> Get-VSBApplicationGroup -Name "Production
Application Group"
Remove the application group
Run Remove-VSBApplicationGroup to remove the application group.
PS C:\PS> Get-VSBApplicationGroup -Name "Production
Application Group"| Remove-VSBApplicationGroup
360 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VSBHvApplicationGroup
Short Description
Creates a Hyper-V application group for SureBackup job.
Applies to
Platform: Hyper-V
For VMware, run Add-VSBViApplicationGroup.
Product Edition: Enterprise, Enterprise Plus
Syntax
Add-VSBHvApplicationGroup [-Name <String>] [-VmFromBackup
<CHvVmItem[]>] [-RestorePoint <COib[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]>]
Related Commands
Find-VBRHvEntity
Get-VBRRestorePoint
Detailed Description
This cmdlet creates a new Hyper-V application group.
This cmdlet provides two scenarios. You can add VMs to your application group either by searching
for existing VMs or by adding a restore point containing the VMs you need.
Note that you can set the order the VMs in the application group will be powered on when the
SureBackup job starts. This may be important if any of the applications must be started prior to other.
The VMs are powered in the order they were added to the VM object in this cmdlet, i.e. in order you
searched for VMs with Find-VBRHvEntity.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you want to
Name False Named False False
assign to the application group.
Specifies the VM(s) you want to True
VmFrom add to the application group. (ByValue,
True Named False
Backup You can assign multiple VMs to ByProperty
this object. Name)
Specifies the restore points of
the VMs you want to add to the True
Restore application group. (ByValue,
True Named False
Point ByProperty
You can assign multiple restore Name)
points to this object.
361 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command creates a new application group named "Microsoft Exchange Appgroup".The VMs that
should be included into the application group are obtained with Find-VBRHvEntity and piped down.
The VMs are obtained in the order they must boot when the SureBackup job starts.
Find-VBRHvEntity -Name "DC", "DNSServer" | Add-
VSBHvApplicationGroup -Name "Microsoft Exchange Appgroup"
Example 2
This command creates a new application group "MailServer Appgroup". The restore point object is
obtained with Get-VBRRestorePoint and assigned to the variable beforehand.
Add-VSBHvApplicationGroup -Name "MailServer Appgroup" -
RestorePoint $restorepoint
362 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VSBViApplicationGroup
Short Description
Creates an application group for SureBackup job.
Applies to
Platform: VMware
For Hyper-V, run Add-VSBHvApplicationGroup.
Product Edition: Enterprise, Enterprise Plus
Syntax
Add-VSBViApplicationGroup [-Name <string>] [-VmFromBackup
<CViVmItem[]>] [-VmFromReplica <CViVmItem[]>] [-RestorePoint
<COib[]>] [<CommonParameters>]
Related Commands
Find-VBRViEntity
Get-VBRRestorePoint
Detailed Description
This cmdlet creates an application group containing virtual machines that the application server is
dependent on.
You can add to the same application groups VMs from backups and VMs from replicas. All VMs from
the application group must have at least one valid restore point created by the time the SureBackup
job starts.
Note that you can set the order the VMs in the application group will be powered on when the
SureBackup job starts. This may be important if any of the applications must be started prior to other.
The VMs are powered in the order they were added to the VM object in this cmdlet, i.e. in order you
searched for VMs with Find-VBRViEntity.
363 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you
Name want to assign to the False Named False False
application group.
Used for adding VMs
from backup.
Specifies the VM(s) that
you want to add to the
application group.
Veeam Backup & True (by Value
VmFrom Replication will search FromPipeline,
False Named False
Backup for backup jobs that ValueFromPipeline
contain the specified ByPropertyName)
VMs and use the most
recent restore points of
them.
You can assign multiple
VMs to this object.
Used for adding VMs
from replicas.
Specifies the VM(s) that
you want to add to the
application group.
Veeam Backup & True (by Value
VmFrom Replication will search FromPipeline,
False Named
Replica for replication jobs that ValueFromPipeline
contain the specified ByPropertyName)
VMs and use the most
recent restore points of
them.
You can assign multiple
VMs to this object.
Specifies the particular
restore points of the
VMs you want to add to True (by Value
Restore the application group. FromPipeline,
False Named False
Point ValueFromPipeline
You can assign multiple ByPropertyName)
restore points to this
object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
364 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command creates a new application group named "Microsoft Exchange Appgroup". The VMs that
should be included into the application group are obtained with Find-VBRViEntity and piped down.
The VMs are obtained in the order they must boot when the SureBackup job starts.
Find-VBRViEntity -Name "DC", "DNSServer" | Add-
VSBHvApplicationGroup -Name "Microsoft Exchange Appgroup"
Example 2
This command creates a new application group "MailServer Appgroup". The restore point object is
obtained with Get-VBRRestorePoint and assigned to the variable beforehand.
Add-VSBViApplicationGroup -Name "MailServer Appgroup" -
RestorePoint $restorepoint
365 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VSBApplicationGroup
Short Description
Returns application groups.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Get-VSBApplicationGroup [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet returns the list of existing application groups.
You can get the list of all application groups, or search for instances directly by name.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the
application group you want to
Name get, or search conditions. False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of all application groups.
Get-VSBApplicationGroup
Example 2
This command looks for the application group named "MailServer Appgroup".
Get-VSBApplicationGroup -Name "MailServer Appgroup"
366 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VSBApplicationGroup
Short Description
Removes a specified application group from Veeam Backup & Replication.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Remove-VSBApplicationGroup [-AppGroup] <CSbAppGroup[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VSBApplicationGroup
Detailed Description
This cmdlet removes a specified application group from Veeam Backup & Replication.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the application group
you want to remove. True
(ByValue,
AppGroup You can assign multiple True 1 False
ByProperty
application groups to this Name)
object.
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the False Named False False
cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm False Named False False
user is sure that they want to
continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
367 | Veeam Backup PowerShell |REFERENCE| REV 2
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
368 | Veeam Backup PowerShell |REFERENCE| REV 2
SureBackup Job
When you create a SureBackup job, you need to indicate a virtual lab where the verification will be
performed, and select the VMs that you want to verify.
The virtual lab is an obligatory component of each SureBackup job. As for the VMs that you want to
verify and the VMs on which they are dependent, you can choose between the following options:
• Reusable application group: if you need to verify different VMs dependent on the same
'surroundings', create an application group that can be reused by several SureBackup jobs,
providing a multi-use copy of their surroundings. Create a SureBackup job for each primary
VM that you want to test, and use the linked job to add the primary VM or a group of VMs that
you want to verify.
• Primary VM as part of application group: if you need to verify a VM or one group of VMs
that are dependent on some services, include the VM(s) you want to verify right into the
application group. Within the application group, you can set the VM boot order.
• No application group: if the VMs you want to verify do not require any specific environment,
select the VM(s) to verify with the linked job, and indicate the virtual lab to use for
verification. You do not need to create an application group in this case.
Note that if you link a job, the SureBackup job will test all VMs processed by it. If you do not want to
verify all VMs in such job, add the needed ones to the application group.
When you create jobs with Veeam PowerShell, the jobs are created in stopped status. To run them,
you need to create a schedule or start them manually. Use dedicated cmdlets to configure job
schedule or edit job settings.
If you have set global email notifications on your Veeam backup server, you will get email notifications
on the SureBackup job results. Note that you cannot set the global notifications settings with Veeam
PowerShell.
You can also view the SureBackup sessions and tasks performed during each session.
See also:
Creating VMware SureBackup Job
Creating Hyper-V SureBackup Job
You will need the following cmdlets to create and manage the SureBackup jobs:
SureBackup jobs: create, start/stop or remove the SureBackup jobs.
SureBackup jobs settings: configure job schedule or edit the advanced job settings.
SureBackup sessions: view the SureBackup sessions or tasks performed during them.
Managing SureBackup jobs
Operation VMware Hyper-V
Work with SureBackup jobs:
Creates a SureBackup job Add-VSBJob Add-VSBHvJob
Looks for created SureBackup
Get-VSBJob Get-VSBJob
jobs
Starts an existing SureBackup job Start-VSBJob Start-VSBJob
Stops a running SureBackup job Stop-VSBJob Stop-VSBJob
Removes a SureBackup job Remove-VSBJob Remove-VSBJob
369 | Veeam Backup PowerShell |REFERENCE| REV 2
Adding options to existing SureBackup jobs
Operation VMware Hyper-V
Set options to SureBackup jobs:
Looks for settings of a specific
Get-VSBJobOptions Get-VSBJobOptions
SureBackup job
Looks for schedule settings of a
Get-VSBJobScheduleOptions Get-VSBJobScheduleOptions
specific SureBackup job
Creates an object with a set of
SureBackup job setting New-VSBJobOptions New-VSBJobOptions
(run Set-VSBJobOptions to apply)
Edits setting of a selected
Set-VSBJobOptions Set-VSBJobOptions
SureBackup job
Sets default settings to a selected
Reset-VSBJobOptions Reset-VSBJobOptions
SureBackup job
Sets schedule to a selected
Set-VSBJobSchedule Set-VSBJobSchedule
SureBackup job
Edits schedule options of a
Set-VSBJobScheduleOptions Set-VSBJobScheduleOptions
selected SureBackup job
Managing SureBackup sessions
Operation VMware Hyper-V
Manage SureBackup sessions:
Looks for SureBackup job
Get-VSBSession Get-VSBSession
sessions
Looks for tasks performed during
Get-VSBTaskSession Get-VSBTaskSession
a specific SureBackup job session
370 | Veeam Backup PowerShell |REFERENCE| REV 2
Administering VMware SureBackup Job
This example shows how to set us a SureBackup job for verifying a Microsoft Exchange server backups.
The SureBackup job will use an application group containing the DC and the DNS server and a linked
job that backs up the Microsoft Exchange server. The virtual lab and the application group are created
in the previous sections: Working with VMware Virtual Lab and Working with VMware Application
Group. The SureBackup job will be scheduled to run after the backup job.
Create a SureBackup Job
To create a SureBackup job, you will need to perform the following steps:
1. Get the 'Microsoft Exchange Vlab' virtual lab with Get-VSBVirtualLab and assign it to a
variable.
2. Get the 'Production Application Group' application group with Get-VSBApplicationGroup and
assign it to a variable.
3. Get the 'Microsoft Exchange Server Backup' backup job with Get-VBRJob and assign it to a
variable.
4. Create the SureBackup job with Add-VSBJob. Set the virtual lab, the application group and
the linked job using the created variables.
5. Configure a job schedule using Set-VSBJobSchedule. Set it to run after the 'Microsoft
Exchange Server Backup' backup job backup job.
// Get the virtual lab:
PS C:\PS> $vlab = Get-VSBVirtualLab -Name "Microsoft Exchange
Vlab"
// Get the application group:
PS C:\PS> $appgroup = Get-VSBApplicationGroup -Name
"Production Application Group"
// Get the backup job:
PS C:\PS> $backupjob = Get-VBRJob -Name "Microsoft Exchange
Server Backup"
// Get the backup job and create the SureBackup job:
PS C:\PS> Add-VSBJob -Name "Microsoft Exchange Verification" -
VirtualLab $vlab -AppGroup $appgroup -LinkedJob $backupjob
// Set the SureBackup job to run after the backup job:
PS C:\PS> Get-VSBJob -Name "Microsoft Exchange Verification" |
Set-VSBJobSchedule -After -AfterJob $backupjob
Look for the SureBackup Job
Run Get-VSBJob to get the created SureBackup job.
PS C:\PS> Get-VSBJob -Name "Microsoft Exchange Verification"
371 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove the SureBackup Job
Run Remove-VSBJob to remove the SureBackup job.
PS C:\PS> Get-VSBJob -Name "Microsoft Exchange Verification"|
Remove-VSBJob
372 | Veeam Backup PowerShell |REFERENCE| REV 2
Adminestering Hyper-V SureBackup Job
This example shows how to set us a SureBackup job for verifying a Microsoft Exchange server backups.
The SureBackup job will use an application group containing the DC and the DNS server and a linked
job that backs up the Microsoft Exchange server. The virtual lab and the application group are created
in the previous sections: Working with Hyper-V Virtual Lab and Working with Hyper-V Application
Group. The SureBackup job will be scheduled to run after the backup job.
Create a SureBackup Job
To create a SureBackup job, you will need to perform the following steps:
1. Get the 'Microsoft Exchange Vlab' virtual lab with Get-VSBHvVirtualLab and assign it to a
variable.
2. Get the 'Production Application Group' application group with Get-VSBApplicationGroup and
assign it to a variable.
3. Get the 'Microsoft Exchange Server Backup' backup job with Get-VBRJob and assign it to a
variable.
4. Create the SureBackup job with Add-VSBHvJob. Set the virtual lab, the application group and
the linked job using the created variables.
5. Configure a job schedule using Set-VSBJobSchedule. Set it to run after the 'Microsoft
Exchange Server Backup' backup job backup job.
// Get the virtual lab:
PS C:\PS> $vlab = Get-VSBHvVirtualLab -Name "Microsoft
Exchange Vlab"
// Get the application group:
PS C:\PS> $appgroup = Get-VSBApplicationGroup -Name
"Production Application Group"
// Get the backup job:
PS C:\PS> $backupjob = Get-VBRJob -Name "Microsoft Exchange
Server Backup"
// Get the backup job and create the SureBackup job:
PS C:\PS> Add-VSBHvJob -Name "Microsoft Exchange Verification"
-VirtualLab $vlab -AppGroup $appgroup -LinkedJob $backupjob
// Get the application group:
PS C:\PS> Get-VSBJob -Name "Microsoft Exchange Verification" |
Set-VSBJobSchedule -After -AfterJob $backupjob
Look for the SureBackup Job
Run Get-VSBJob to get the created SureBackup job.
PS C:\PS> Get-VSBJob -Name "Microsoft Exchange Verification"
373 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove the SureBackup Job
Run Remove-VSBJob to remove the SureBackup job.
PS C:\PS> Get-VSBJob -Name "Microsoft Exchange Verification"|
Remove-VSBJob
374 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VSBHvJob
Short Description
Creates a Hyper-V SureBackup job.
Applies to
Platform: Hyper-V
For VMware, run Add-VSBJob.
Product Edition: Enterprise, Enterprise Plus
Syntax
Add-VSBHvJob [-Name <String>] -VirtualLab <CHvSbVirtualLab> [-
AppGroup <CSbAppGroup>] [-LinkedJob <CBackupJob[]>] [-Description
<String>] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
Get-VSBHvVirtualLab
Get-VSBApplicationGroup
Get-VBRJob
Detailed Description
This cmdlet adds a new Hyper-V SureBackup job.
You can use a linked job to bring the target VM(s) to the job, or an application group containing the
required VMs, or a combination of both according to your virtual infrastructure objectives.
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.
375 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you want to
Name False Named False False
assign to the SureBackup job.
True
Specifies the virtual lab you (ByValue,
VirtualLab True Named False
want to use for verification. ByProperty
Name)
Specifies the application group
you want to use to provide the
copy of the production True
environment of the verified VM. (ByValue,
AppGroup False Named False
ByProperty
If you do not use an application Name)
group, make sure that the -
LinkedJob parameter is set.
Specifies the backup, replication
or copy job containing the VM
you want to verify.
True
If you do not use a linked (ByValue,
LinkedJob False Named False
backup job, make sure that the - ByProperty
AppGroup parameter is set. Name)
You can assign multiple backup
jobs to this object.
Specifies the description of the
Description False Named False False
new SureBackup job.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
376 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command creates a new Sure Backup job named "Exchange SureJob" using a virtual lab, an
application group and a linked job. The VM to verify is obtained by searching for the backup job
named "Exchange Backup Job" with Get-VBRJob, and piped down. The virtual lab and the application
group objects are obtained with Get-VSBHvVirtualLab and Get-VSBApplicationGroup and assigned to
$VLab01 and $"Exchange Appgroup" variables accordingly beforehand.
Get-VBRJob -Name "Exchange Backup Job" | Add-VSBHvJob -Name
"Exchange SureJob" -VirtualLab $VLab01 -AppGroup $"Exchange
Appgroup"
Example 2
This command creates a new Sure Backup job named "Exchange SureJob" using a virtual lab, an
application group and a linked job. The virtual lab and application group objects are obtained with
Get-VSBHvVirtualLab and Get-VSBApplicationGroup and assigned to $VLab01 and $"Exchange
Appgroup" variables accordingly beforehand.
Add-VSBHvJob -Name "Exchange SureJob" -VirtualLab $VLab01 -
AppGroup $"Exchange Appgroup"
Example 3
This command creates a new Sure Backup job named "Exchange SureJob" using a virtual lab and an
application group. The virtual lab object is obtained with Get-VSBHvVirtualLab and piped down. The
VM to verify is included into the application group, the application group object is obtained with Get-
VSBApplicationGroup and assigned to the $"Exchange Appgroup" variable beforehand.
Get-VSBHvVirtualLab -Name "Exchange VLab 01" | Add-VSBHvJob -Name
"Exchange SureJob" -AppGroup $"Exchange Appgroup"
Example 4
This command creates a new Sure Backup job named "Exchange SureJob" using a virtual lab and a
linked job. The virtual lab object is obtained with Get-VSBHvVirtualLab and assigned to $VLab01
variable beforehand. The VM to verify is obtained with Get-VBRJob and assigned to the $"Exchange
Backup" variable beforehand.
Add-VSBHvJob -Name "Exchange SureJob" -VirtualLab $VLab01 -
LinkedJob $"Exchange Backup"
377 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VSBJob
Short Description
Creates a VMware SureBackup job.
Applies to
Platform: VMware
For Hyper-V, run Add-VSBHvJob.
Product Edition: Enterprise, Enterprise Plus
Syntax
Add-VSBJob [[-Name] <String>] -VirtualLab <CViSbVirtualLab> [-
AppGroup <CSbAppGroup>] [-LinkedJob <CBackupJob[]>] [-Description
<String>] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
Get-VSBVirtualLab
Get-VSBApplicationGroup
Get-VBRJob
Detailed Description
This cmdlet creates a new VMware SureBackup job.
To add VMs that you want to verify to the SureBackup job, you can use an application group
containing the list of VMs, or link a backup job which will act as a VM container.
Note that if you link a backup job, the SureBackup job will verify all VMs added to the linked job.
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.
378 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you want to
Name False Named False False
assign to the SureBackup job.
True
Specifies the virtual lab you (ByValue,
VirtualLab True Named False
want to use for verification. ByProperty
Name)
Specifies the application group
you want to use to provide the
copy of the production True
environment of the verified VM. (ByValue,
AppGroup False Named False
ByProperty
If you do not use an application Name)
group, make sure that the -
LinkedJob parameter is set.
Specifies the backup, replication
or copy job containing the VM
you want to verify.
True
If you do not use a linked (ByValue,
LinkedJob False Named False
backup job, make sure that the - ByProperty
AppGroup parameter is set. Name)
You can assign multiple backup
jobs to this object.
Specifies the description of the
Description False Named False False
new SureBackup job.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
379 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command creates a new Sure Backup job named "Exchange SureJob" using a virtual lab, an
application group and a linked job. The VM to verify is obtained by searching for the backup job
named "Exchange Backup Job" with Get-VBRJob, and piped down. The virtual lab and the application
group objects are obtained with Get-VSBVirtualLab and Get-VSBApplicationGroup and assigned to
$VLab01 and $"Exchange Appgroup" variables accordingly beforehand.
Get-VBRJob -Name "Exchange Backup Job" | Add-VSBJob -Name
"Exchange SureJob" -VirtualLab $VLab01 -AppGroup $"Exchange
Appgroup"
Example 2
This command creates a new Sure Backup job named "Exchange SureJob" using a virtual lab, an
application group and a linked job. The virtual lab and application group objects are obtained with
Get-VSBVirtualLab and Get-VSBApplicationGroup and assigned to $VLab01 and $"Exchange
Appgroup" variables accordingly beforehand.
Add-VSBJob -Name "Exchange SureJob" -VirtualLab $VLab01 -AppGroup
$"Exchange Appgroup"
Example 3
This command creates a new Sure Backup job named "Exchange SureJob" using a virtual lab and an
application group. The virtual lab object is obtained with Get-VSBVirtualLab and piped down. The VM
to verify is included into the application group, the application group object is obtained with Get-
VSBApplicationGroup and assigned to the $"Exchange Appgroup" variable beforehand.
Get-VSBVirtualLab -Name "Exchange VLab 01" | Add-VSBJob -Name
"Exchange SureJob" -AppGroup $"Exchange Appgroup"
Example 4
This command creates a new Sure Backup job named "Exchange SureJob" using a virtual lab and a
linked job. The virtual lab object is obtained with Get-VSBVirtualLab and assigned to $VLab01 variable
beforehand. The VM to verify is obtained with Get-VBRJob and assigned to the $"Exchange Backup"
variable beforehand.
Add-VSBJob -Name "Exchange SureJob" -VirtualLab $VLab01 -
LinkedJob $"Exchange Backup"
380 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VSBJob
Short Description
Returns SureBackup jobs.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Get-VSBJob [-Name <String[]>] [-WarningAction <ActionPreference>]
[-WarningVariable <String>] [<CommonParameters>]
Detailed Description
This cmdlet returns the list of created SureBackup jobs.
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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the
SureBackup job you want to get,
Name or search conditions. False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the 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"
381 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VSBJobOptions
Short Description
Returns settings of a selected SureBackup job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Get-VSBJobOptions [-Job] <CSbJob> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VSBJob
Detailed Description
This cmdlet returns the list of job settings for the specified SureBackup job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the SureBackup job (ByValue,
Job True 1 False
you want to get the settings of. ByProperty
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of job settings for the SureBackup job named "SureJob 02". The
SureBackup job is obtained with Get-VSBJob and piped down.
Get-VSBJob -Name "SureJob 02" | Get-VSBJobOptions
Example 2
This command looks for the list of job settings for the SureBackup job represented by the $SureJob
variable. The SureBackup job is obtained with Get-VSBJob and assigned to the variable beforehand.
Get-VSBJobOptions -Job $SureJob
382 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VSBJobScheduleOptions
Short Description
Returns scheduling settings of a selected SureBackup job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Get-VSBJobScheduleOptions [-Job] <CSbJob> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VSBJob
Detailed Description
This cmdlet returns the list of job scheduling options for the specified SureBackup job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the SureBackup job
(ByValue,
Job you want to get the scheduling True 1 False
ByProperty
settings of.
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of job settings for the SureBackup job named "SureJob 02". The
SureBackup job is obtained with Get-VSBJob and piped down.
Get-VSBJob -Name "SureJob 02" | Get-VSBJobScheduleOptions
Example 2
This command looks for the list of job settings for the SureBackup job represented by the $SureJob
variable. The SureBackup job is obtained with Get-VSBJob and assigned to the variable beforehand.
Get-VSBJobScheduleOptions -Job $SureJob
383 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VSBSession
Short Description
Returns SureBackup sessions that have been run.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Get-VSBSession [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet returns the 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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the
SureBackup session you want to
get, or search conditions.
The name of the SureBackup
Name False Named False True
session is a name of the
SureBackup job.
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of all backup sessions.
Get-VSBSession
Example 2
This command looks for the SureBackup session named "Winserver SureJob".
Get-VSBSession -Name *Winserver SureJob*
384 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VSBTaskSession
Short Description
Returns tasks performed during the specified SureBackup session.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Get-VSBTaskSession [-Session] <CSbSession> [-Name <String[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VSBSession
Detailed Description
This cmdlet returns the list of tasks performed during the specified SureBackup session.
Run Get-VBRTaskSession to get the tasks for backup, replication and backup copy sessions.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the SureBackup
(ByValue,
Session session the tasks of which you True 1 False
ByProperty
want to get.
Name)
Specifies the name of the
SureBackup job within the
session you indicated in the
Name Session parameter the tasks for False Named False True
which you want to get.
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
385 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command gets the list of tasks performed for the VMs named "DC" and "DNS" in the SureBackup
job session named "Exchange SureJob". The SureBackup session is obtained with Get-VSBSession and
piped down.
Get-VSBSession -Name "Exchange SureJob" | Get-VBRTaskSession -
Name "DC", "DNS"
Example 2
This command gets the list of tasks performed for the VMs named "DC" and "DNS" in the SureBackup
job session represented by the $"Exchange SureJob" variable. The SureBackup session is obtained
with Get-VSBSession and assigned to the variable beforehand.
Get-VSBTaskSession -Session $"Exchange SureJob" -Name "DC", "DNS"
386 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VSBJobOptions
Short Description
Sets SureBackup job options.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
New-VSBJobOptions [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Detailed Description
This cmdlet lets you edit job settings of SureBackup jobs.
This cmdlet returns the CDRJobOptions object containing the default settings of the SureBackup job
you want to edit. You can customize any setting that you want to apply. This object is then used in the
Set-VSBJobOptions cmdlet.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
387 | Veeam Backup PowerShell |REFERENCE| REV 2
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
LinkWithJobs : False
RunningVmsNumber : 6
Validation : False
SkipValidationForAppGroup : True
388 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VSBJob
Short Description
Removes a specified SureBackup job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Remove-VSBJob [-Job] <CSbJob[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-
Confirm] [<CommonParameters>]
Related Commands
Get-VSBJob
Detailed Description
This cmdlet removes a specified SureBackup job from Veeam Backup & Replication.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the SureBackup job True
you want to remove. (ByValue,
Job True 1 False
You can assign multiple jobs to ByProperty
this object. Name)
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the
cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm
user is sure that they want to
continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
389 | Veeam Backup PowerShell |REFERENCE| REV 2
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
390 | Veeam Backup PowerShell |REFERENCE| REV 2
Reset-VSBJobOptions
Short Description
Sets SureBackup job settings to default.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Reset-VSBJobOptions -Job <CSbJob> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VSBJob
Detailed Description
This cmdlet clears the custom settings of the specified SureBackup job and restores their default
values.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the SureBackup job (ByValue,
Job True Named False
you want to edit. ByProperty
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command sets default settings to SureBackup jobs named "SureBackup Job 1" and "SureBackup
Job 2". The jobs object is obtained with Get-VSBJob and piped down.
Get-VSBJob -Name "SureBackup Job 1", "SureBackup Job 2" | Reset-
VSBJobOptions
Example 2
This command sets default settings to the SureBackup job represented by the $SureJob variable. The
job object is obtained with Get-VSBJob and assigned to the variable beforehand.
Reset-VSBJobOptions -Job $SureJob
391 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VSBJobOptions
Short Description
Applies custom SureBackup job options.
Applies to
Platform: VMware
Product Edition: Enterprise, Enterprise Plus
Syntax
Set-VSBJobOptions [-Job] <CSbJob> [-Options] <CDRJobOptions> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VSBJob
Detailed Description
This cmdlet applies customized job options to SureBackup jobs.
To customize the SureBackup job options you need to first run the New-VSBJobOptions cmdlet. New-
VSBJobOptions returns the CDRJobOptions object containing the set of default SureBackup job
options. You can customize any of these options and apply further to a SureBackup job.
Run Set-VBRJobOptions to edit job options of backup, replication or copy job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the SureBackup job for
which you want to customize True
the job options. (ByValue,
Job True 1 False
ByProperty
You can assign multiple jobs to Name)
this object.
Specifies the custom
Options SureBackup job options. True 2 False False
Accepts CDRJobOptions object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
392 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command applies the customized options to the SUreBackup 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 SureBackup 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"
393 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VSBJobSchedule
Short Description
Sets SureBackup job schedule options.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Set-VSBJobSchedule [-Job] <CSbJob> [-Daily] [-At <DateTime>] [-
DailyKind <DailyOptions+DailyKinds>] [-Days <DayOfWeek[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Set-VSBJobSchedule [-Job] <CSbJob> [-At <DateTime>] [-Days
<DayOfWeek[]>] [-Monthly] [-NumberInMonth <EDayNumberInMonth>] [-
Months <EMonth[]>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Set-VSBJobSchedule [-Job] <CSbJob> [-After] [-AfterJob
<CBackupJob>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VSBJob
Get-VBRJob
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.
394 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the SureBackup job you True
want to set schedule to. You can (ByValue,
Job True Named False
include multiple jobs into this ByProperty
object. Name)
Daily:
Sets SureBackup job schedule to
Daily False Named False False
daily run.
Specifies the SureBackup job
At start time. If not set, the job will False Named False False
start at 10:00 by default.
Specifies the days to run the
SureBackup job:
Everyday: the job will run
everyday,
DailyKind Weekdays: the job will run False Named False False
Monday through Friday,
Selected days: the job will run
on specific days (i.e. Saturdays).
Use the Days parameter to set
the specific days.
Specifies the days of week to run
Days False Named False False
the SureBackup job.
Monthly:
Specifies the SureBackup job
At start time. If not set, the job will False Named False False
start at 10:00 by default.
Specifies the day of week to run
the SureBackup job. Use this
parameter to set the day for -
Days False Named False False
NumberInMonth parameter, i.e.
to run the job on first Saturday
every month.
Specifies the period condition for
the SureBackup job run:
First/Second/Third/Forth/Last.
Number
Use this parameter to set the False Named False False
InMonth
condition for the Days
parameter, i.e. to run the job on
first Saturday every month.
Sets SureBackup job schedule to
Monthly False Named False False
monthly run.
Specifies the months to run the
Months False Named False False
SureBackup job.
395 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
After this job:
Sets SureBackup job schedule to
After False Named False False
run after a specific job.
Specifies the job after which you
AfterJob False Named False False
want to run the SureBackup job.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command schedules the jobs named "SureBackup Job 01" and "SureBackup Job 05" to run daily
at 23:00 on weekdays. The SureBackup jobs object is obtained with Get-VSBJob and piped down.
Get-VSBJob -Name "SureBackup Job 01", "SureBackup Job 05" | Set-
VSBJobSchedule -Daily -At "23:00" -DailyKind Weekdays
Example 2
This command schedules all SureBackup jobs to run every last Saturday at 12:00 in February, May,
August and December. The SureBackup jobs object is obtained with Get-VSBJob and piped down.
Get-VSBJob -Name *SureJob* | Set-VSBJobSchedule -Monthly -At
"12:00" -NumberInMonth Last -Days Saturday -Months February, May,
August, December
Example 3
This command schedules the SureBackup job named "SureBackup Job 01" to run after the job
represented by the $job variable. The SureBackup job object is obtained with Get-VSBJob and piped
down.. The backup job object is obtained with Get-VBRJob and assigned to $job variable beforehand.
Get-VSBJob -Name "SureBackup Job 01" | Set-VSBJobSchedule -After
-AfterJob $job
396 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VSBJobScheduleOptions
Short Description
Applies customized job scheduling options to a selected SureBackup job.
Applies to
Platform: VMware
Product Edition: Enterprise, Enterprise Plus
Syntax
Set-VSBJobScheduleOptions [-Job] <CSbJob> [-Options]
<ScheduleOptions> [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VSBJob
New-VBRJobScheduleOptions
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 set scheduling options of backup, replication or copy job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the SureBackup job for
which you want to change the True
scheduling options. (ByValue,
Job True 1 False
ByProperty
You can assign multiple Name)
SureBackup jobs to this object.
Specifies the custom scheduling
options.
Options True 2 False False
Accepts ScheduleOptions
object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
397 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command applies the customized scheduling options to the SureBackup jobs named "SharePoint
SureJob" and "MailServer SureJob". The jobs are obtained with Get-VSBJob and piped down. The
options to apply are set to the $"Schedule Options" variable beforehand by running New-
VBRJobScheduleOptions.
Get-VSBJob -Name "SharePoint SureJob", "MailServer SureJob" |
Set-VSBJobScheduleOptions -Options $"Schedule Options"
Example 2
This command applies the customized scheduling options to the SureBackup job represented by the
$SureJob variable. The job object is obtained with Get-VSBJob and assigned to the variable
beforehand. The options to apply are set to the $"Schedule Options" variable beforehand by running
New-VBRJobScheduleOptions.
Set-VSBJobScheduleOptions -Job $SureJob -Options $"Schedule
Options"
398 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VSBJob
Short Description
Starts a created SureBackup job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Start-VSBJob [-Job] <CSbJob[]> [-RunAsync] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VSBJob
Detailed Description
This cmdlet allows you to start a created SureBackup job.
When you create a job, you need to run it manually unless you enable a job schedule. Run Set-
VSBJobSchedule to schedule the SureBackup job to run automatically.
Run Stop-VSBJob to stop a running SureBackup job.
Run Start-VBRJob to start a backup, replication or copy job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the SureBackup job True
you want to run. (ByValue,
Job True 1 False
You can assign multiple jobs to ByProperty
this object. Name)
Indicates that the command
RunAsync returns immediately without False Named False False
waiting for the task to complete.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
399 | Veeam Backup PowerShell |REFERENCE| REV 2
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
400 | Veeam Backup PowerShell |REFERENCE| REV 2
Stop-VSBJob
Short Description
Stops running SureBackup job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Stop-VSBJob [-Job] <CSbJob[]> [-RunAsync] [-WarningAction
<ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-
Confirm] [<CommonParameters>]
Related Commands
Get-VSBJob
Detailed Description
This cmdlet stops a running SureBackup job. The job is stopped once, the scheduled SureBackup job
will start the next scheduled time.
Run Start-VSBJob to start the job manually.
Run Stop-VBRJob to stop a backup, replication or copy job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the SureBackup job True
you want to stop. (ByValue,
Job True 1 False
You can assign multiple jobs to ByProperty
this object. Name)
Indicates that the command
RunAsync returns immediately without False Named False False
waiting for the task to complete.
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the False Named False False
cmdlet without actually
performing any action.
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm False Named False False
user is sure that they want to
continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
401 | Veeam Backup PowerShell |REFERENCE| REV 2
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"
402 | Veeam Backup PowerShell |REFERENCE| REV 2
Tapes Device Support
Archiving data to tape is a proven approach to data protection and disaster recovery. Veeam Backup &
Replication allows you to integrate a tape device to your backup infrastructure and fully administrate
tape archiving processes from your console.
As a backup administrator, you can use Veeam PowerShell capabilities to administer archiving to tape
from the command line.
Veeam PowerShell supports administering of the following units and operations:
Tape servers: tape servers are networks appliances that provide connection between the tape
devices and the Veeam Backup server. You can add them to your console and manage them.
Tape vaults: tape vaults are virtual containers that allow you to group information about data
archived to tapes. You can add and manage the vaults.
Tape libraries: the tape libraries that are connected to tape servers are added to the Veeam
Backup console automatically. You can look for the connected devices, rename them or
remove them from the console.
Tape drives: you can enable or disable tape library drives.
Tape media pools: media pools are Veeam logical units that serve as targets to tape jobs and
allow you manage the tapes used for archiving data. You must create media pools to archive
data.
Tapes: all tapes used or intended for archiving are registered in the Veeam database. You can look
for tapes, import or export, erase them or set data protection for them.
Tape jobs: add and manage the tape jobs to archive files or VM backups.
Tape catalogs: update Veeam tape database.
See also:
Tape objects
Note: Veeam PowerShell terminates support for restoring from tape archives. It is recommended to perform
the tape restore operation with Veeam Backup & Replication UI for full functionality. The tape restore
cmdlets remain available in Veeam Backup & Replication v.8.0 but will not be supported in further
versions.
403 | Veeam Backup PowerShell |REFERENCE| REV 2
Tapes Cmdlets
Connect tape libraries to your Veeam Backup & Replication console and archive your files to tape.
Add and manage tape servers
Operation VMware Hyper-V
Adds a tape server Add-VBRTapeServer Add-VBRTapeServer
Looks for tape servers Get-VBRTapeServer Get-VBRTapeServer
Modifies a tape server Set-VBRTapeServer Set-VBRTapeServer
Removes a tape
Remove-VBRTapeServer Remove-VBRTapeServer
server
Add and manage tape vaults
Operation VMware Hyper-V
Creates a tape vault Add-VBRTapeVault Add-VBRTapeVault
Looks for tape vaults Get-VBRTapeVault Get-VBRTapeVault
Modifies a tape vault Set-VBRTapeVault Set-VBRTapeVault
Removes a tape vault Remove-VBRTapeVault Remove-VBRTapeVault
Manage tape libraries
Operation VMware Hyper-V
Looks for tape
Get-VBRTapeLibrary Get-VBRTapeLibrary
libraries
Modifies a tape library Set-VBRTapeLibrary Set-VBRTapeLibrary
Removes a tape
Remove-VBRTapeLibrary Remove-VBRTapeLibrary
library
Manage tape drives
Operation VMware Hyper-V
Looks for tape drives Get-VBRTapeDrive Get-VBRTapeDrive
Enables a tape drive Enable-VBRTapeDrive Enable-VBRTapeDrive
Disables a tape drive Disable-VBRTapeDrive Disable-VBRTapeDrive
404 | Veeam Backup PowerShell |REFERENCE| REV 2
Create and manage media pools
Operation VMware Hyper-V
Creates a media pool Add-VBRTapeMediaPool Add-VBRTapeMediaPool
Modifies a media pool New- New-
retention policy VBRTapeMediaPoolRetentionPolicy VBRTapeMediaPoolRetentionPolicy
Modifies a media pool
New- New-
policy for creating
VBRTapeMediaSetCreationPolicy VBRTapeMediaSetCreationPolicy
media sets
Looks for media pools Get-VBRTapeMediaPool Get-VBRTapeMediaPool
Modifies a media pool Set-VBRTapeMediaPool Set-VBRTapeMediaPool
Removes a media
Remove-VBRTapeMediaPool Remove-VBRTapeMediaPool
pool
Manage tapes
Operation VMware Hyper-V
Looks for tapes
managed by Veeam Get-VBRTapeMedium Get-VBRTapeMedium
Backup & Replication
Imports new tapes to
Import-VBRTapeMedium Import-VBRTapeMedium
a tape library
Exports tapes from a
Export-VBRTapeMedium Export-VBRTapeMedium
tape library
Ejects a tape from
Eject-VBRTapeMedium Eject-VBRTapeMedium
drive
Moves a tape to
Move-VBRTapeMedium Move-VBRTapeMedium
another media pool
Modifies a tape
Set-VBRTapeMedium Set-VBRTapeMedium
description
Erases tape Erase-VBRTapeMedium Erase-VBRTapeMedium
Enables overwrite
Enable-VBRTapeProtection Enable-VBRTapeProtection
protection for a tape
Disables overwrite
Disable-VBRTapeProtection Disable-VBRTapeProtection
protection for a tape
405 | Veeam Backup PowerShell |REFERENCE| REV 2
Create and manage tape jobs
Operation VMware Hyper-V
Creates a backup to
Add-VBRBackupToTapeJob Add-VBRBackupToTapeJob
tape job
Creates a file to tape
Add-VBRFileToTapeJob Add-VBRFileToTapeJob
job
Looks for existing
Get-VBRTapeJob Get-VBRTapeJob
tape jobs
Modifies a backup to
Set-VBRBackupToTapeJob Set-VBRBackupToTapeJob
tape job
Modifies a file to tape
Set-VBRFileToTapeJob Set-VBRFileToTapeJob
job
Modifies a backup to New- New-
tape job schedule VBRBackupToTapeScheduleOptions VBRBackupToTapeScheduleOptions
Modifies a tape job
New-VBRBackupWindowOptions New-VBRBackupWindowOptions
backup window
Modifies a tape job
New-VBRDailyOptions New-VBRDailyOptions
daily schedule
Modifies a tape job
New-VBRMonthlyOptions New-VBRMonthlyOptions
monthly schedule
Modifies a file to tape
job backup creation New-VBRFileToTapeBackupPolicy New-VBRFileToTapeBackupPolicy
policy
Creates a new file to
New-VBRFileToTapeObject New-VBRFileToTapeObject
tape job object
Modifies a file to tape
job synthesized full
New-VBRFullBackupToTapePolicy New-VBRFullBackupToTapePolicy
backup creation
policy
Update information about tapes and files
Operation VMware Hyper-V
Performs tape
Start-VBRTapeCatalog Start-VBRTapeCatalog
catalogization
Performs tape
Start-VBRTapeInventory Start-VBRTapeInventory
inventory
406 | Veeam Backup PowerShell |REFERENCE| REV 2
Tapes Objects
Veeam PowerShell uses the following objects to archive data to tape:
Object Description
VBRTapeServer Contains tape server
VBRTapeVault Contains tape vault
VBRTapeLibrary Contains tape library
VBRTapeDrive Contains tape drive
VBRTapeMediaPool Contains media pool
VBRTapeMedium Contains tape
VBRTapeMediaPoolRetentionPolicy Contains media pool retention settings
VBRTapeMediaSetCreationPolicy Contains media set creation policy
VBRBackupToTapeJob Contains backup to tape job
VBRBackupToTapeScheduleOptions Contains backup to tape job schedule settings
VBRFileToTapeJob Contains file to tape job
VBRFileToTapeBackupPolicy Contains file to tape job policy
Contains files or directories that are source for file
VBRFileToTapeObject
to tape job
VBRFullBackupToTapePolicy Contains file to tape synthesized full backup policy
407 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRBackupToTapeJob
Short Description
Creates backup to tape job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Add-VBRBackupToTapeJob -Name <String> [-Description <String>] [-
EjectCurrentMedium] [-ExportCurrentMediaSet] -FullBackupMediaPool
<VBRTapeMediaPool> [-IncrementalBackupMediaPool
<VBRTapeMediaPool>] [-ExportDays <DayOfWeek[]>] [-
FullBackupPolicy <VBRFullBackupToTapePolicy>] [-ScheduleOptions
<VBRBackupToTapeScheduleOptions>] [-Object <Object[]>] [-
ProcessIncrementalBackup] [-UseHardwareCompression] [-WaitPeriod
<TimeSpan>] [-WaitForBackupJob] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRTapeMediaPool
New-VBRFullBackupToTapePolicy
New-VBRBackupToTapeScheduleOptions
Get-VBRJob
Get-VBREPJob
Get-VBRBackupRepository
Return Type
VBRBackupToTapeJob
Detailed Description
This cmdlet creates a new backup to tape job.
The backup to tape job archives backups that were produced by particular backup or Endpoint jobs or
stored on particular backup repositories. Use the Object parameter to set a backup job or a backup
repository as source to the tape job.
Note: If you choose to archive data from backup repositories, the backup to tape job will process only the
backups that were created with backup jobs configured on this Veeam backup server. Imported
backups and configuration backups will be skipped from processing.
408 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you want to
Name assign to the backup to tape job. True Named False False
Accepts string type.
Specifies the description of the
backup to tape job.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Indicates that the tape(s) will be
Eject automatically ejected from drive
Current after the job finishes. False Named False False
Medium The ejected tape is moved to a
standard library slot.
Indicates that the tapes
belonging to the media set will
be automatically placed to
Import/Export (Mail) slot for
further export. Use the
Export ExportDays parameter to set
Current days on which you want to False Named False False
MediaSet export tapes.
If you use this parameter, but do
not set the ExportDays
parameter, the tapes will be
exported every day.
Specifies the media pool where
Full you want to store full backups
Backup produced by this tape job. True Named False False
Media
Pool Accepts VBRTapeMediaPool
object, GUID or string type.
Used to set media pool for the
ProcessIncrementalBackup
parameter.
Incremental
Specifies the media pool where
Backup
you want to store incremental False Named False False
Media
backups produced by this tape
Pool
job.
Accepts VBRTapeMediaPool
object, GUID or string type.
Used to set days for exporting
tapes for the
ExportCurrentMediaSet
parameter.
ExportDays False Named False False
Specifies days on which the
tapes written by this tape job
will be automatically exported:
Monday, Tuesday, Wednesday,
Thursday, Friday, Saturday,
409 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Sunday.
Specifies virtualized synthetic
full backup for tape settings.
FullBackup
Accepts False Named False False
Policy
VBRFullBackupToTapePolicy
object.
Specifies backup to tape job
schedule.
By default, the following
settings are applied:
Enabled: False
Type: Daily
DailyOptions: Type:
SelectedDays, Period:
18:00, DayOfWeek:
Saturday
MonthlyOptions: Period:
Schedule 22:00, False Named False False
Options DayNumberInMonth:
Fourth, DayOfWeek:
Saturday, Months:
January, February,
March, April, May,
June, July, August,
September, October,
November, December
ScheduleOptions: From
Sunday to Saturday,
from 00:00 to 23:00,
Enabled: true
JobId: null
Specifies the backup job or
backup repository that will be
the source for this tape job.
Accepts CBackupJob,
Object False Named False False
VBREPJob or
CBackupRepository objects.
You can assign multiple jobs or
repositories to this object.
Indicates that this tape job will
archive incremental backups.
Use the
IncrementalBackupMediaPool
parameter to specify a separate
Process
media pool for storing
Incremental False Named False False
incremental backups. If you do
Backup
not set the
IncrementalBackupMediaPool
parameter, incremental backups
will be stored to the media pool
the you set for full backups.
UseHardware Indicates that tape library must False Named False False
410 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Compression perform hardware compression
for archives. Do not use this
option for archiving Veeam
backups or other already
compressed files.
Used to set time period for the
WaitForBackupJob parameter.
Specifies the time period for
which the tape job must wait for
WaitPeriod the source backup jobs to finish. False Named False False
Can be set to 1-777 minutes.
Accepts TipeSpan, integer or
string types.
Indicates that the tape job must
wait for the source backup job
WaitFor
to finish. Use the WaitPeriod False Named False False
BackupJob
parameter to set the time
period.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
411 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRFileToTapeJob
Short Description
Creates file to tape job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRFileToTapeJob -Name <String> [-Description <String>] [-
EjectCurrentMedium] [-ExportCurrentMediaSet] -FullBackupMediaPool
<VBRTapeMediaPool> [-IncrementalBackupMediaPool
<VBRTapeMediaPool>] [-ExportDays <DayOfWeek[]>] [-
FullBackupPolicy <VBRFileToTapeBackupPolicy>] [-
IncrementalBackupPolicy <VBRFileToTapeBackupPolicy>] [-Object
<VBRFileToTapeObject[]>] [-UseVSS] [-UseHardwareCompression] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRTapeMediaPool
New-VBRFileToTapeBackupPolicy
New-VBRFileToTapeObject
Return Type
VBRFileToTapeJob
Detailed Description
This cmdlet creates a new file to tape job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you want to
Name assign to the file to tape job. True Named False False
Accepts string type.
Specifies the description of the
file to tape job.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Indicates that the tape(s) will be
Eject
automatically ejected from drive
Current False Named False False
after the job finishes.
Medium
The ejected tape is moved to a
412 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
standard library slot.
Indicates that the tapes
belonging to the media set will
be automatically placed to
Import/Export (Mail) slot for
further export. Use the
Export ExportDays parameter to set
Current days on which you want to False Named False False
MediaSet export tapes.
If you use this parameter, but do
not set the ExportDays
parameter, the tapes will be
exported every day.
Specifies the media pool where
you want to store full backups
FullBackup produced by this tape job. True Named False False
MediaPool
Accepts VBRTapeMediaPool
object, GUID or string type.
Used to set media pool for the
ProcessIncrementalBackup
parameter.
Specifies the media pool where
you want to store incremental
Incremental backups produced by this tape
Backup job. False Named False False
MediaPool Accepts VBRTapeMediaPool
object, GUID or string type.
If you do not specify a media
pool, incremental backups will
be stored to the media pool the
you set for full backups.
Used to set days for exporting
tapes for the
ExportCurrentMediaSet
parameter.
Export Specifies days on which the False Named False False
Days tapes written by this tape job
will be automatically exported:
Monday, Tuesday, Wednesday,
Thursday, Friday, Saturday,
Sunday.
Specifies virtualized synthetic
full backup for tape settings.
Accepts
VBRFileToTapeBackupPolicy
FullBackup object. False Named False False
Policy
By default, the following
settings are applied:
Type: Daily
DailyOptions: Type:
413 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
SelectedDays, Period:
18:00, DayOfWeek:
Saturday
MonthlyOptions: Period:
22:00,
DayNumberInMonth:
Fourth, DayOfWeek:
Saturday, Months:
January, February,
March, April, May,
June, July, August,
September, October,
November, December
Enabled: False
Specifies incremental backup
settings.
Accepts
VBRFileToTapeBackupPolicy
object.
By default, the following
settings are applied:
Type: Daily.
DailyOptions: Type:
Incremental SelectedDays, Period:
Backup 18:00, DayOfWeek: False Named False False
Policy Saturday.
MonthlyOptions: Period:
22:00,
DayNumberInMonth:
Fourth, DayOfWeek:
Saturday, Months:
January, February,
March, April, May,
June, July, August,
September, October,
November, December.
Enabled: false.
Specifies the source file system
object.
Accepts VBRFileToTapeJob
Object False Named False False
object.
You can assign multiple files to
this object.
Indicates that the VSS (Microsoft
Volume Shadow Copy) must be
UseVSS used. False Named False False
Default: True.
Indicates that tape library must
perform hardware compression
UseHardware for archives. Do not use this
False Named False False
Compression option for archiving Veeam
backups or other already
compressed files.
414 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
415 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRTapeMediaPool
Short Description
Creates a new media pool.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRTapeMediaPool -Name <String> [-Description <String>] -
Library <VBRTapeLibrary> [-Medium <VBRTapeMedium>] [-
MoveFromFreePool] [-MoveOfflineToVault] [-Vault <VBRTapeVault>]
[-EnableEncryption] [-EncryptionKey <VBREncryptionKey>] [-
MediaSetCreationPolicy <VBRTapeMediaSetCreationPolicy>] [-
MediaSetName <String>] [-RetentionPolicy
<VBRTapeMediaPoolRetentionPolicy>]
Related Commands
Get-VBRTapeLibrary
Get-VBRTapeMedium
Get-VBRTapeVault
Get-VBREncryptionKey
New-VBRTapeMediaPoolRetentionPolicy
New-VBRTapeMediaSetCreationPolicy
Return Type
VBRTapeMediaPool
Detailed Description
This cmdlet creates a new custom media pool in a selected tape library.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you
Name want to assign to the media True Named False False
pool.
Specifies the description for
the created media pool.
Description If not set, Veeam Backup & False Named False False
Replication will enter date
and time of creation by
default.
Library Specifies the tape library in True Named True (by False
416 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
which you want to create Value
media pool. FromPipeline
,
Accepts VBRTapeLibrary
ValueFromPi
object, GUID or string type.
peline
ByPropertyN
ame)
Specifies the tape(s) you
want to add to the media
pool.
Medium You can assign multiple False Named False False
tapes to this object.
Accepts VBRTapeMedium
object, GUID or string type.
Indicates that when the
media pool runs out of
MoveFrom
tapes, it can be replenished False Named False False
FreePool
by tapes from the Free
media pool.
Indicates that the tapes
that go offline must be
automatically moved to a
MoveOffline vault.
False Named False False
ToVault Use the Vault parameter to
specify the vault to which
you want to move the
tapes from this media pool.
Used to set vault for the
MoveOfflineToVault
parameter. Specifies the
vault to which you want to
automatically move the
Vault tapes. You can use one False Named False False
vault for several media
pools.
Accepts VBRTapeVault
object, GUID or string type.
Indicates that Veeam
Backup & Replication will
encrypt data archived to
Enable tape.
False Named False False
Encryption Use the EncryptionKey
parameter to specify the
encryption key you want to
use to encrypt the data.
Used to set the encryption
key for the
Encryption EnableEncryption
False Named False False
Key parameter. Specifies the
encryption key you want to
use to encrypt the data.
417 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the settings of
media set you want to
apply to this media pool.
MediaSet If omitted, the media
Creation creation policy will be set to False Named False False
Policy 'Never' by default.
Accepts
VBRTapeMediaSetCreation
Policy object.
Specifies the new name
you want to assign to the
media sets created in this
media pool.
MediaSet
False Named False False
Name If omitted, the media set
name will be set to "Media
set %date%” by default.
Accepts string type.
Specifies the retention
settings you want to apply
to this media pool.
If omitted, the media set
Retention
name will be set to 'Never' False Named False False
Policy
by default.
Accepts
VBRTapeMediaPoolRetenti
onPolicy object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
418 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command creates a media pool named "Monthly Full Backups" with default settings.
• The library in which the media pool is created is obtained with Get-VBRTapeLibrary and piped
down.
• The MoveFromFreePool parameter is used to make the media pool replenishable.
• Other parameters are omitted. The media set policy and retention policy will be set to default.
Get-VBRTapeLibrary -Name "HP MSL G3 Series 3.00" | Add-
VBRTapeMediaPool -Name "Monthly Full Backups" -MoveFromFreePool
Example 2
This command creates a media pool named 'AD Backups Encrypted'. The offline tape will be moved to
the 'Omega' vault. The tape archive will be encrypted with the 'Veeam Administrator' encryption key.
The media set creation policy and the retention policy will be configured beforehand.
• The description of the new media pool is set to 'Active Directory Encrypted Backups'.
• The library in which the media pool is created is obtained with Get-VBRTapeLibrary and
assigned to the '$HPtapelibrary' variable beforehand.
• The tapes that will be included to the media pool are obtained with Get-VBRTapeMedium
and assigned to the '$media' variable beforehand.
• The MoveOfflineToVault parameter is used to move the tapes to vault. The target vault is
obtained with Get-VBRTapeVault and assigned to the '$vault' variable beforehand.
• The EnableEncryption parameter is set to encrypt the data. The encryption key that must be
used is obtained with Get-VBREncryptionKey and assigned to the '$securepassword' variable
beforehand.
• The custom policy for creating media sets is configured with New-
VBRTapeMediaSetCreationPolicy and assigned to the '$mediasetpolicy' variable beforehand.
The media set name is set to "AD Daily %date%".
• The custom retention policy is configured with New-VBRTapeMediaPoolRetentionPolicy and
assigned to the '$retentionpolicy' variable beforehand.
Add-VBRTapeMediaPool -Name "AD Backups Encrypted" -Description
"Active Directory Encrypted Backups" -Library $HPtapelibrary -
Medium $media -MoveOfflineToVault -Vault $vault -EnableEncryption
-EncryptionKey $securepassword -MediaSetCreationPolicy
$mediasetpolicy -MediaSetName "AD Daily %date%" -RetentionPolicy
$retentionpolicy
419 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRTapeServer
Short Description
Adds tape server to Veeam Backup & Replication.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRTapeServer [-Description <string>] [-Server <CHost>]
[<CommonParameters>]
Related Commands
Get-VBRServer
Return Type
VBRTapeServer
Detailed Description
This cmdlet adds a tape server to the Veeam Backup & Replication managing console.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the description
of the tape server.
Description If not set, Veeam Backup False Named False False
& Replication will enter
date and time of creation
by default.
Specifies the server you
want to use as a tape True (by Value
server. FromPipeline,
Server False Named False
ValueFromPipeline
If not set, Veeam backup ByPropertyName)
server will be used.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
420 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command adds a server named 'WindowsServer01' as a tape server. The server is obtained with
Get-VBRServer and piped down. The description is set to "Sydney Office tape server".
Get-VBRServer -Name WindowsServer01 | Add-VBRTapeServer -
Description "Sydney Office tape server"
Example 2
This command adds a server represented by the '$tapeserver' variable as a tape server. The server is
obtained with Get-VBRServer and assigned to the variable beforehand.
Add-VBRTapeServer -Server '$tapeserver'
421 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRTapeVault
Short Description
Creates a tape vault.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Add-VBRTapeVault -Name <String> [-Description <String>] [-
Protect] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
None
Return Type
VBRTapeVault
Detailed Description
This cmdlet creates a new tape vault.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you want to
Name True Named False False
assign to the vault.
Specifies the description of the
vault.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Indicates that all tapes moved to
Protect this media vault automatically get False Named False False
lifelong overwrite protection.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
422 | Veeam Backup PowerShell |REFERENCE| REV 2
Example
This command creates a vault named 'Sydney Remote Storage'.
Add-VBRTapeVault -Name "Sydney Remote Storage" -Description
"Veeam backups offsite"
423 | Veeam Backup PowerShell |REFERENCE| REV 2
Disable-VBRTapeDrive
Short Description
Disables a selected tape library drive.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Disable-VBRTapeDrive -Drive <VBRTapeDrive[]> [-WhatIf] [-Confirm]
[<CommonParameters>]
Related Commands
Get-VBRTapeDrive
Return Type
None
Detailed Description
This cmdlet disables a selected tape library recording drive. When you disable a drive, Veeam Backup
& Replication stops using it for read or write operations. You can disable a drive, for example, for
maintenance.
Run Enable-VBRTapeDrive to enable the drive.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the drive you
want to disable.
True (by Value
Accepts VBRTapeDrive FromPipeline,
Drive True Named False
object. ValueFromPipeline
ByPropertyName)
You can assign multiple
drives to this object.
Specifies whether the
cmdlet writes a message
that describes the effects
WhatIf False Named False False
of running the cmdlet
without actually
performing any action.
Specifies whether the
cmdlet displays a prompt
Confirm that asks if the user is False Named False False
sure that they want to
continue.
424 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command disables a drive represented by the '$drive1' variable. The drive object is obtained with
Get-VBRTapeDrive and assigned to the variable beforehand.
Disable-VBRTapeDrive -Drive $drive1
425 | Veeam Backup PowerShell |REFERENCE| REV 2
Disable-VBRTapeProtection
Short Description
Disables protection set for tapes.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Disable-VBRTapeProtection -Medium <VBRTapeMedium[]> [-PassThru]
[<CommonParameters>]
Related Commands
Get-VBRTapeMedium
Return Type
VBRTapeMedium[]
Detailed Description
This cmdlet disables protection that was previously enabled for tapes.
You can disable protection of tapes that are both online or offline. When you disable protection, the
tape retention period returns to media pool settings.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the tapes for
which you want to
disable protection.
True (by Value
Accepts
FromPipeline,
Medium VBRTapeMedium True Named False
ValueFromPipeline
object, GUID or string
ByPropertyName)
type.
You can assign multiple
tapes to this object.
Indicates that the
command returns the
PassThru output object to the False Named False False
Windows PowerShell
console.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
426 | Veeam Backup PowerShell |REFERENCE| REV 2
Eject-VBRTapeMedium
Short Description
Ejects tape from drive.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Eject-VBRTapeMedium [<CommonParameters>]
-OR-
Eject-VBRTapeMedium -Medium <VBRTapeMedium[]>
[<CommonParameters>]
-OR-
Eject-VBRTapeMedium -Drive <VBRTapeDrive[]> [<CommonParameters>]
Related Commands
Get-VBRTapeMedium
Get-VBRTapeDrive
Return Type
None
Detailed Description
This cmdlet ejects tape that is located in drive. The ejected tape is moved to a standard library slot.
You can eject a tape that is known to be located in drive, or eject a tape located in a selected drive, or
eject tapes in all drives managed by Veeam Backup & Replication. This cmdlet provides three scenarios
for each case.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the tapes
which you want to
eject.
Accepts True (by Value
VBRTapeMedium FromPipeline,
Medium True Named False
object, GUID or string ValueFromPipeline
type. ByPropertyName)
You can assign
multiple tapes to this
object.
Drive Specifies the drive True Named True (by Value False
from which you want FromPipeline,
427 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
to eject tape. ValueFromPipeline
ByPropertyName)
Accepts VBRTapeDrive
object, GUID or string
type.
You can assign
multiple tapes to this
object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
428 | Veeam Backup PowerShell |REFERENCE| REV 2
Enable-VBRTapeDrive
Short Description
Enables a selected tape library drive.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Enable-VBRTapeDrive -Drive <VBRTapeDrive[]> [-WhatIf] [-Confirm]
[<CommonParameters>]
Related Commands
Get-VBRTapeDrive
Return Type
None
Detailed Description
This cmdlet enables a selected tape library recording drive that was previously disabled.
You can disable a tape drive by running Disable-VBRTapeDrive.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the drive you
want to enable.
True (by Value
Accepts VBRTapeDrive FromPipeline,
Drive True Named False
object. ValueFromPipeline
ByPropertyName)
You can assign multiple
drives to this object.
Specifies whether the
cmdlet writes a message
that describes the effects
WhatIf False Named False False
of running the cmdlet
without actually
performing any action.
Specifies whether the
cmdlet displays a prompt
Confirm that asks if the user is False Named False False
sure that they want to
continue.
429 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command enables a drive represented by the '$drive1' variable. The drive object is obtained with
Get-VBRTapeDrive and assigned to the variable beforehand.
Enable-VBRTapeDrive -Drive $drive1
430 | Veeam Backup PowerShell |REFERENCE| REV 2
Enable-VBRTapeProtection
Short Description
Sets overwrite protection for selected tapes.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Enable-VBRTapeProtection -Medium <VBRTapeMedium[]> [-PassThru]
[<CommonParameters>]
Related Commands
Get-VBRTapeMedium
Return Type
VBRTapeMedium[]
Detailed Description
This cmdlet sets software overwrite protection for selected tapes.
Protection sets lifelong retention period for the selected tapes overriding the retention settings of the
media pool.
You can set protection for both online or offline tapes that contain data.
The protection can be switched off at any time. The retention settings will be changed to the value set
for the media pool. Run Disable-VBRTapeProtection to switch off the protection.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the tapes for
which you want to set
protection.
True (by Value
Accepts
FromPipeline,
Medium VBRTapeMedium True Named False
ValueFromPipeline
object, GUID or string
ByPropertyName)
type.
You can assign multiple
tapes to this object.
Indicates that the
command returns the
PassThru output object to the False Named False False
Windows PowerShell
console.
431 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
432 | Veeam Backup PowerShell |REFERENCE| REV 2
Erase-VBRTapeMedium
Short Description
Erases data from tape.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Erase-VBRTapeMedium -Medium <VBRTapeMedium[]> [-Long] [-Wait] [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRTapeMedium
Return Type
VBRBackupSession
Detailed Description
This cmdlet erases data from the selected tapes.
The cmdlet provides two scenarios for erasing options:
Short: only the tape data header is cleared. The tape becomes available for overwriting. Short
erase is a quick procedure.
Long: all data is cleared from tape. This procedure requires more time.
You cannot run erase for the following tapes:
offline tapes
tapes used by any jobs
tapes with software or hardware protection.
433 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the tapes
which you want to
erase.
True (by Value
Accepts
FromPipeline,
Medium VBRTapeMedium True Named False
ValueFromPipeline
object, GUID or string
ByPropertyName)
type.
You can assign multiple
tapes to this object.
If indicated, the long
(full) erase process is
performed. Otherwise,
Long False Named False False
Veeam Backup &
Replication runs the
short erase procedure.
Indicates that the
command waits for the
Wait erase process(es) to False Named False False
complete before
accepting more input.
Specifies whether the
cmdlet writes a message
that describes the
WhatIf False Named False False
effects of running the
cmdlet without actually
performing any action.
Specifies whether the
cmdlet displays a
Confirm prompt that asks if the False Named False False
user is sure that they
want to continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
434 | Veeam Backup PowerShell |REFERENCE| REV 2
Export-VBRTapeMedium
Short Description
Moves tape to Import/Export slot.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Export-VBRTapeMedium -Medium <VBRTapeMedium[]> [-Wait]
[<CommonParameters>]
Related Commands
Get-VBRTapeMedium
Return Type
VBRBackupSession
Detailed Description
This cmdlet exports selected tapes to the Import/Export slot. You need to to run the exporting
procedure if you want to take the tapes out of the tape library.
Note: Import/export commands are available only for the devices that support corresponding operations
and include I/E slot.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the tapes
which you want to
export.
True (by Value
Accepts
FromPipeline,
Medium VBRTapeMedium True Named False
ValueFromPipeline
object, GUID or string
ByPropertyName)
type.
You can assign multiple
tapes to this object.
Indicates that the
command waits for the
Wait import session(s) to False Named False False
complete before
accepting more input.
435 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
436 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRTapeDrive
Short Description
Returns tape drives.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRTapeDrive [-Library <TapeLibrary>] [-Name <String[]>] [-Id
<Guid[]>] [-Address <string[]>] [<CommonParameters>]
Related Commands
Get-VBRTapeLibrary
Return Type
VBRTapeDrive[]
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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True (by Value
Specifies the tape library
FromPipeline,
Library that the tape drive False Named False
ValueFromPipeline
belongs to.
ByPropertyName)
Specifies the tape drive
name(s), or search
conditions.
Name False Named False True
You can specify multiple
names separated by
commas.
Specifies the ID of the
VBRTapeDrive object you
want to get. True (by Value
FromPipeline,
Id Accepts GUID or string False Named False
ValueFromPipeline
type.
ByPropertyName)
You can assign multiple
IDs to this object.
437 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the slot number
Address where the drive in False Named False False
connected.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for a tape drive named "Drive1" in the library named 'HP MSL G3 Series 3.00'. The
library object is obtained with Get-VBRTapeLibrary and piped down.
Get-VBRTapeLibrary -Name "HP MSL G3 Series 3.00" | Get-
VBRTapeDrive –Name "Drive1"
Example 2
This command looks for a tape drive named "Drive1" in the library represented by the $"LibHP3"
variable. The library object is obtained with Get-VBRTapeLibrary and assigned to the variable
beforehand.
Get-VBRTapeDrive -Library $"LibHP3" -Name "Drive1"
Example 3
This command looks for a tape drives with particular slots addresses in a tape library named 'HP MSL
G3 Series 3.00'. The library object is obtained with Get-VBRTapeLibrary and piped down.
Get-VBRTapeLibrary -Name "HP MSL G3 Series 3.00" | Get-
VBRTapeDrive -Address 0,1
438 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRTapeJob
Short Description
Returns tape jobs.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRTapeJob [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Get-VBRTapeJob [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
None
Return Type
VBRBackupToTapeJob or VBRFileToTapeJob
Detailed Description
This cmdlet returns the list of tape jobs created on this Veeam backup server.
You can get backup to tape jobs and file to tape jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name(s)
of the tape job, or
search conditions. True (by Value
FromPipeline,
Name You can specify False Named True
ValueFromPipeline
multiple names ByPropertyName)
separated by
commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
439 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRTapeLibrary
Short Description
Returns tape libraries.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRTapeLibrary [-TapeServer <VBRTapeServer[]>]
[<CommonParameters>]
-OR-
Get-VBRTapeLibrary [-TapeServer <VBRTapeServer[]>] [-Id <guid[]>]
[<CommonParameters>]
-OR-
Get-VBRTapeLibrary [-TapeServer <VBRTapeServer[]>] [-Name
<string[]>] [<CommonParameters>]
Related Commands
Get-VBRTapeServer
Return Type
VBRTapeLibrary[]
Detailed Description
This cmdlet returns the list of tape libraries connected to Veeam Backup & Replication.
You can get the list of all tape libraries, narrow down your search to particular tape servers or search
for instances directly by name or ID.
Note that tape libraries are added to Veeam Backup & Replication automatically when you add tape
server with connected library. Run Add-VBRTapeServer to add tape server.
440 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the tape server
on which you want to
look for tape libraries.
True (by Value
Accepts VBRTapeServer FromPipeline,
TapeServer False Named False
object, GUID or string ValueFromPipeline
type. ByPropertyName)
You can assign multiple
servers to this object.
Specifies the name of the
tape media library, or
search conditions.
Name False Named False True
You can specify multiple
names separated by
commas.
Specifies the ID of the
VBRTapeLibrary object
you want to get. True (by Value
FromPipeline,
Id Accepts GUID or string False Named False
ValueFromPipeline
type.
ByPropertyName)
You can assign multiple
IDs to this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command gets a list of all tape libraries connected to Veeam Backup & Replication.
Get-VBRTapeLibrary
Example 2
This command looks for all tape libraries connected to the tape server named 'Sydney_Tape_Server'.
The tape server is obtained with Get-VBRTapeServer and piped down.
Get-VBRTapeServer -Name "Sydney_Tape_Server" | Get-VBRTapeLibrary
441 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 3
This command looks for a tape library with a particular ID.
1. The ID is obtained by getting the ID property of the tape library object and assigned to the
'$SydneyTapeLibraryId' variable.
PS C:\PS> $SydneyTapeLibrary = Get-VBRTapeLibrary - Name "Sydney
Tape Library"
PS C:\PS> $SydneyTapeLibraryId = $SydneyTapeLibrary.Id
You can view the GUID number of the tape library object:
PS C:\PS> $SydneyTapeLibraryId
Guid
-------
2f1fdc3c-8a97-4fa0-b631-74a039e64d5c
2. The '$SydneyTapeLibraryId' variable is then used in the cmdlet.
PS C:\PS> Get-VBRTapeLibrary -Id $SydneyTapeLibraryId
442 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRTapeMediaPool
Short Description
Returns tape media pools.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRTapeMediaPool [-Library <VBRTapeLibrary[]>]
[<CommonParameters>]
-OR-
Get-VBRTapeLibrary [-Library <VBRTapeLibrary[]>] [-Id <guid[]>]
[<CommonParameters>]
-OR-
Get-VBRTapeLibrary [-Library <VBRTapeLibrary[]>] [-Name
<string[]>] [<CommonParameters>]
Related Commands
Get-VBRTapeLibrary
Return Type
VBRTapeMediaPool[]
Detailed Description
This cmdlet returns the list of media pools managed by Veeam Backup & Replication.
You can get the list of media pools within specified library, or search for instances directly by name or
ID.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the library that
the media pool belongs True (by Value
to. FromPipeline,
Library False Named False
Accepts VBRTapeLibrary ValueFromPipeline
object, GUID or string ByPropertyName)
type.
Specifies the ID of the
VBRTapeMediaPool
object you want to get.
Id False Named False False
Accepts GUID or string
type.
You can assign multiple
443 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
IDs to this object.
Specifies the name of the
media pool you want to
get.
Name False Named False True
You can specify multiple
names separated by
commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of all media pools in Veeam Backup & Replication.
Get-VBRTapeMediaPool
Example 2
This command looks for all media pools in the 'HP MSL G3 Series 3.00' library.
The library is obtained with Get-VBRTapeLibrary and piped down.
Get-VBRTapeLibrary -Name "HP MSL G3 Series 3.00" | Get-
VBRTapeMediaPool
Example 3
This command looks for the media pools named 'AD Full Backup' and 'SharePoint Full Backups' in the
'HP MSL G3 Series 3.00' library.
The library is obtained with Get-VBRTapeLibrary and piped down.
Get-VBRTapeLibrary -Name "HP MSL G3 Series 3.00" | Get-
VBRTapeMediaPool -Name "AD Full Backup", "SharePoint Full
Backups"
444 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRTapeMedium
Short Description
Returns tapes.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRTapeMedium [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Get-VBRTapeMedium -Drive <VBRTapeDrive[]> [-Name <String[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Get-VBRTapeMedium -Id <Guid[]> [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Get-VBRTapeMedium [-Name <String[]>] -Library <VBRTapeLibrary[]>
[-WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Get-VBRTapeMedium [-Name <String[]>] -MediaPool
<VBRTapeMediaPool[]> [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Get-VBRTapeMedium [-Name <String[]>] -Vault <VBRTapeVault[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRBackup
Get-VBRTapeMediaPool
Get-VBRTapeLibrary
Detailed Description
This cmdlet returns the list of tapes managed by Veeam Backup & Replication.
You can get the list of all tapes, or search for instances directly by name or ID, or get the list of tapes in
a particular library, media pool, vault or drive. Use an appropriate scenario for each case.
445 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of
tape you want to get. True (by Value
FromPipeline,
Name You can specify False Named True
ValueFromPipeline
multiple names ByPropertyName)
separated by commas.
Specifies the drive in
which you want to look
for tapes.
Drive True Named False False
Accepts VBRTapeDrive
object, GUID or string
type.
Specifies the ID of the
tape(s) you want to get.
Accepts GUID or string
Id type. True Named False False
You can specify
multiple IDs separated
by commas.
Specifies the library in
which you want to look
for tapes.
Library True Named False False
Accepts
VBRTapeLibrary object,
GUID or string type.
Specifies the media
pool in which you want
to look for tapes.
MediaPool Accepts True Named False False
VBRTapeMediaPool
object, GUID or string
type.
Specifies the vault in
which you want to look
for tapes.
Vault True Named False False
Accepts VBRTapeVault
object, GUID or string
type.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
446 | Veeam Backup PowerShell |REFERENCE| REV 2
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 assigned to the '$IncrementalBackups'
variable beforehand.
Get-VBRTapeMedium -MediaPool $IncrementalBackups
Example 4
This command looks for the expired tapes within the Sydney vault. The vault is obtained with Get-
VBRTapeVault and assigned to the '$Sydney' variable beforehand.
Get-VBRTapeMedium -Vault $Sydney | ?{$_.IsExpired}
447 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRTapeServer
Short Description
Returns tape servers.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRTapeServer [-Server <CHost[]>] [<CommonParameters>]
-OR-
Get-VBRTapeServer [-Name <string[]>] [-Server <CHost[]>]
[<CommonParameters>]
Related Commands
Get-VBRServer
Return Type
VBRTapeServer[]
Detailed Description
This cmdlet returns the list of tape servers connected to Veeam Backup & Replication.
You can get the list of all tape servers or narrow down the output to the servers of specific type, or
search for instances directly by name.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the host on
which you want to look True (by Value
for tape servers. FromPipeline,
Server False Named False
ValueFromPipeline
You can assign multiple ByPropertyName)
servers to this object.
Specifies the name of the
tape server you want to
get, or search conditions.
Name False Named False True
You can specify multiple
names separated by
commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
448 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for all tape servers connected to Veeam Backup & Replication.
Get-VBRTapeServer
Example 2
This command looks for all tape servers connected to the host named 'Host01'. The 'Host01' server is
obtained with Get-VBRServer and piped down.
Get-VBRServer -Name "Host01" | Get-VBRTapeServer
Example 3
This command looks for the tape server named 'Sydney_Tape_Server' on the server represented by
the '$Host01' variable. The 'Host01' server is obtained with Get-VBRServer and assigned to the variable
beforehand.
Get-VBRTapeServer -Name "Sydney_Tape_Server" -Server $Host01
449 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRTapeVault
Short Description
Returns tape vaults.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Get-VBRTapeVault [<CommonParameters>]
-OR-
Get-VBRTapeVault [-Id <guid[]>] [<CommonParameters>]
-OR-
Get-VBRTapeVault [-Name <string[]>] [<CommonParameters>]
Related Commands
None
Return Type
VBRTapeVault[]
Detailed Description
This cmdlet returns the list of existing tape vaults.
You can get the list of all tape vaults or search for instances directly by name or ID.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the True (by Value
vault you want to get. FromPipeline,
Name False Named True
You can assign multiple ValueFromPipeline
names to this object. ByPropertyName)
Specifies the ID of the
VBRTapeVault object you
want to get. True (by Value
FromPipeline,
Id Accepts GUID or string False Named False
ValueFromPipeline
type.
ByPropertyName)
You can assign multiple
IDs to this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
450 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for a list of all existing vaults.
Get-VBRTapeVault
Example 2
This command looks for a vault named 'Sydney Remote Storage'.
Get-VBRTapeVault -Name "Sydney Remote Storage"
Example 3
This command looks for a vault with a particular ID by piping down the variable containing the ID.
1. The ID is obtained by getting the ID property of the vault object and assigned to the
'$SydneyVaultID' variable.
PS C:\PS> $SydneyVault = Get-VBRTapeVault -Name "Sydney Remote
Storage"
PS C:\PS> $SydneyVaultID = SydneyVault.ID
You can view the GUID number of the vault object:
PS C:\PS> $SydneyVaultID
Guid
-------
4be3b4c9-a620-4abd-a68b-b8a697115781
2. The '$SydneyVaultID' variable is then piped down to the cmdlet.
PS C:\PS> $SydneyVaultID | Get-VBRTapeVault
451 | Veeam Backup PowerShell |REFERENCE| REV 2
Import-VBRTapeMedium
Short Description
Imports tapes into library.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Import-VBRTapeMedium -Library <VBRTapeLibrary[]> [-Wait]
[<CommonParameters>]
Related Commands
Get-VBRTapeLibrary
Return Type
VBRBackupSession[]
Detailed Description
This cmdlet imports tapes newly loaded to a tape library.
You need to run importing procedure against all new tapes. Importing moves tapes from I/E slot to
library standard slots.
Note: Import/export commands are available only for the devices that support corresponding operations
and include I/E slot.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the library
from which you want to True (by Value
import tapes. FromPipeline,
Library True Named False
Accepts ValueFromPipeline
VBRTapeLibrary object, ByPropertyName)
GUID or string type.
Indicates that the
command waits for the
Wait import session(s) to False Named False False
complete before
accepting more input.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
452 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command imports tapes to the 'HP MSL G3 Series 3.00' tape library.
The tape library is obtained with item is obtained by Get-VBRTapeLibrary and piped down.
Get-VBRTapeLibrary -Name "HP MSL G3 Series 3.00" | Import-
VBRTapeMedium
Example 2
This command imports tapes to a selected tape library.
The tape library is obtained with item is obtained by Get-VBRTapeLibrary and assigned to the '$library'
variable beforehand.
Import-VBRTapeMedium -Library $library
453 | Veeam Backup PowerShell |REFERENCE| REV 2
Move-VBRTapeMedium
Short Description
Moves tape to media pool or vault.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Move-VBRTapeMedium -Medium <VBRTapeMedium[]> -MediaPool
<VBRTapeMediaPool> [-WhatIf] [-Confirm] [<CommonParameters>]
-OR-
Move-VBRTapeMedium -Medium <VBRTapeMedium[]> -Vault
<VBRTapeVault> [-WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRTapeMedium
Get-VBRTapeMediaPool
Get-VBRTapeVault
Return Type
None
Detailed Description
This cmdlet moves selected tapes to another media pool or media vault.
The cmdlet provides two scenarios for each case:
Moving tapes to another media pool
Note the following limitations:
You cannot move tapes that are used by any tape job.
You cannot move protected tapes.
You cannot move tapes to the Retired media pool.
You cannot move tapes from one tape library to another.
Important! When you move a tape to any media pool, Veeam Backup & Replication marks this tape as free.
Moving tapes to media vault
You can move only offline tapes to media vaults. You can configure automatic move to vault
in the media pool settings. Run Set-VBRTapeMediaPool to configure media pool.
454 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the tape(s) you
want to move.
Accepts True (by Value
VBRTapeMedium FromPipeline,
Medium True Named False
objects, GUID or string ValueFromPipeline
type. ByPropertyName)
You can assign multiple
tapes to this object.
Specifies the media pool
to which you want to
move the tapes.
MediaPool Accepts True Named False False
VBRTapeMediaPool
object, GUID or string
type.
Specifies the media
vault to which you want
to move the tapes.
Vault True Named False False
Accepts VBRTapeVault
object, GUID or string
type.
Specifies whether the
cmdlet writes a message
that describes the
WhatIf False Named False False
effects of running the
cmdlet without actually
performing any action.
Specifies whether the
cmdlet displays a
Confirm prompt that asks if the False Named False False
user is sure that they
want to continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
455 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command moves a tape named '0014001H' to a media pool represented by the '$mediapool'
variable.
• The needed tape is obtained with Get-VBRTapeMedium and piped down.
• The media pool to which you want to move the tape is is obtained with Get-
VBRTapeMediaPool and assigned to the '$mediapool' variable beforehand.
Get-VBRTapeMedium -Name 0014001H | Move-VBRTapeMedium -MediaPool
$mediapool
Example 2
This command moves a tape to the Omega media vault.
• The needed tape is obtained with Get-VBRTapeMedium and assigned to the '$medium'
variable beforehand.
• The vault to which you want to move the tape is is obtained with Get-VBRTapeVault and
assigned to the '$OmegaVault' variable beforehand.
Move-VBRTapeMedium -Medium $medium -Vault $OmegaVault
456 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRBackupToTapeScheduleOptions
Short Description
Creates a new VBRBackupToTapeScheduleOptions object.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
New-VBRBackupToTapeScheduleOptions [-Type
<VBRBackupToTapePolicyType>] [-DailyOptions <VBRDailyOptions>] [-
MonthlyOptions <VBRMonthlyOptions>] [-BackupWindowOptions
<VBRBackupWindowOptions>] [-Job <VBRJob>] [-Enabled][-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
New-VBRDailyOptions
New-VBRMonthlyOptions
New-VBRBackupWindowOptions
Get-VBRJob
Return Type
VBRBackupToTapeScheduleOptions
Detailed Description
This cmdlet creates the VBRBackupToTapeScheduleOptions object. This object contains schedule
settings for backup to tape job and is used further to apply these settings to an existing backup to
tape job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the job schedule type:
AfterJob: the tape job will
wait for the source
backup job to complete.
AfterNewBackup: the tape
job will periodically
Type check the source jobs for False Named False False
new backups and
archive new backups to
tape.
Daily: the tape job will run on
selected days. Use the
DailyOptions parameter
to set the days.
457 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Monthly: the tape job will
run on selected months.
Use the
MonthlyOptions
parameter to set the
months.
Default: Daily.
Used to set days for the Type
parameter (Daily option).
Daily The following settings are used by False Named False False
Options default: Type: SelectedDays,
Period: 18:00, DayOfWeek:
Saturday
Used to set months for the Type
parameter (Monthly option).
The following settings are used by
default: Period: 22:00,
Monthly DayNumberInMonth: Fourth, False Named False False
Options DayOfWeek: Saturday, Months:
January, February, March, April,
May, June, July, August,
September, October, November,
December.
Specifies backup windows: the
tape job will run within the
specified time interval.
Accepts
Backup
VBRBackupWindowOptions
Window False Named False False
object.
Options
The following settings are used by
default: From Sunday to Saturday,
from 00:00 to 23:00, Enabled:
True.
Specifies the source backup job
after which the tape job must run.
Job Accepts VBRJob or CBackupJob False Named False False
objects.
Default: Null.
Indicates if this schedule is
Enabled enabled. False Named False False
Default: False.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
458 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRBackupWindowOptions
Short Description
Creates a new VBRBackupWindowOptions object.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
New-VBRBackupWindowOptions [-FromDay <DayOfWeek>] [-FromHour
<Int32>] [-ToDay <DayOfWeek>] [-ToHour <Int32>] [-Enabled] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
None
Return Type
VBRBackupWindowOptions
Detailed Description
This cmdlet creates the VBRBackupWindowOptions object. This object contains the backup window
settings. The backup window sets a time period within which the job is allowed to run. The
VBRBackupWindowOptions object is used further to apply these settings to existing jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the day of
week on which the
backup window opens.
FromDay False Named False False
Accepts DayOfWeek
enumeration.
Default: Sunday.
Specifies the hour on
which the backup
window opens.
FromHour False Named False False
Accepts int32 type.
Default: 0.
Specifies the day of
week on which the
ToDay backup window ends. False Named False False
Accepts DayOfWeek
enumeration.
459 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Default: Saturday.
Specifies the hour on
which the backup
window ends.
ToHour False Named False False
Accepts int32 type.
Default: 23.
Indicates if this backup
window is enabled or
disabled:
Enabled: jobs are
allowed to
run within True (by Value
the specified FromPipeline,
Enabled False Named False
interval. ValueFromPipeline
Disabled: jobs are ByPropertyName)
prohibited to
run within
the specified
interval.
Default: False.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
460 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRDailyOptions
Short Description
Creates a new VBRDailyOptions object.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
New-VBRDailyOptions [-DayOfWeek <DayOfWeek[]>] [-Period
<TimeSpan>] [-Type <VBRDailyOptionsType>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
None
Return Type
VBRDailyOptions
Detailed Description
This cmdlet creates the VBRDailyOptions object. This object contains the daily schedule settings and is
used further to apply these settings to existing jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Used to set days for the Type
Day parameter (SelectedDays option). False Named False False
OfWeek
Default: Saturday.
Specifies the time when the job
will run.
Period False Named False False
Accepts TimeSpan type.
Default: 18:00.
Specifies the job schedule type:
Everyday: the job will run
daily.
WeekDays: the job will run
Type on week days. False Named False False
SelectedDays: the job will
run on selected days.
Use the DaysOfWeek
parameter to set the
days.
461 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
462 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRFileToTapeBackupPolicy
Short Description
Creates a new VBRFileToTapeBackupPolicy object.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
New-VBRFileToTapeBackupPolicy [-Type
<VBRFileToTapeBackupPolicyType>] [-DailyOptions
<VBRDailyOptions>] [-MonthlyOptions <VBRMonthlyOptions>] [-
Enabled] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
New-VBRDailyOptions
New-VBRMonthlyOptions
Return Type
VBRFileToTapeBackupPolicy
Detailed Description
This cmdlet creates the VBRFileToTapeBackupPolicy object. This object contains backup creation
schedule settings for file to tape job and is used further to apply these settings to an existing file to
tape job.
463 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the backup creation
schedule type:
Daily: the target files will be
archived on selected
days. Use the
DailyOptions parameter
to set the days.
Type False Named False False
Monthly: the target files will
be archived on selected
months. Use the
MonthlyOptions
parameter to set the
months.
Default: Daily.
Used to set days for the Type
parameter (Daily option).
Daily The following settings are used by False Named False False
Options default: Type: SelectedDays,
Period: 18:00, DayOfWeek:
Saturday
Used to set months for the Type
parameter (Monthly option).
The following settings are used by
default: Period: 22:00,
Monthly DayNumberInMonth: Fourth, False Named False False
Options DayOfWeek: Saturday, Months:
January, February, March, April,
May, June, July, August,
September, October, November,
December.
Indicates if this schedule is
Enabled enabled. False Named False False
Default: False.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
464 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRFileToTapeObject
Short Description
Creates a new VBRFileToTapeObject object.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
New-VBRFileToTapeObject [-Server <CHost>] -Path <String> [-
IncludeMask <String>] [-Credentials <CCredentials>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRServer
Get-VBRCredentials
Return Type
VBRFileToTapeObject
Detailed Description
This cmdlet creates a VBRFileToTapeObject object. This object contains files or directories that you
want to add to a file to tape job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the host where the files
Server reside. False Named False False
Default: Local.
Specifies the string with the target
Path False Named False False
file path.
Used to select files by mask if a
directory is set as a source.
Include
Specifies the string with the mask False Named False False
Mask
by which you want to select files
from the directory.
Specifies the credentials you want
Credentials to use to authenticate with the False Named False False
host.
465 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
466 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRFullBackupToTapePolicy
Short Description
Creates a new VBRFullBackupToTapePolicy object.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
New-VBRFullBackupToTapePolicy [-Type
<VBRFullBackupToTapePolicyType>] [-MonthlyOptions
<VBRMonthlyOptions>] [-WeeklyOnDays <DayOfWeek[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
New-VBRMonthlyOptions
Return Type
VBRFullBackupToTapePolicy
Detailed Description
This cmdlet creates the VBRFullBackupToTapePolicy object. This object contains schedule settings for
creating virtual synthesized full backup for tape and is used further to apply these settings to an
existing backup to tape job.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the virtual synthesized
full backup creation type:
Monthly: the virtual
synthesized full backup
is created on selected
months. Use the
MonthlyOptions
parameter to set the
Type months. False Named False False
WeeklyOnDays: the virtual
synthesized full backup
is created on selected
days of week. Use the
WeeklyOnDays
parameter to set the
days.
Default: WeeklyOnDays.
Monthly Used to set months for the Type False Named False False
467 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Options parameter (Monthly option).
The following settings are used by
default: Period: 22:00,
DayNumberInMonth: Fourth,
DayOfWeek: Saturday, Months:
January, February, March, April,
May, June, July, August,
September, October, November,
December.
Used to set days of week for the
Weekly
Type parameter (WeeklyOnDays False Named False False
OnDays
option).
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
468 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRMonthlyOptions
Short Description
Creates a new VBRMonthlyOptions object.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
New-VBRMonthlyOptions [-Period <TimeSpan>] [-DayNumberInMonth
<VBRDayNumberInMonth>] [-DayOfWeek <DayOfWeek>] [-Months
<VBRMonth[]>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
None
Return Type
VBRMonthlyOptions
Detailed Description
This cmdlet creates the VBRMonthlyOptions object. This object contains the job monthly schedule
settings and is used further to apply these settings to existing jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the time when the job
will run.
Period False Named False False
Accepts TimeSpan type.
Default: 22:00.
Specifies the number of week day
in month when the job will run:
First, Second, Third, Fourth, Last,
Day OnDay.
Number False Named False False
Use the DayOfWeek parameter to
InMonth
specify the week day for this
parameter.
Default: Forth.
Used to set the week day for the
Day DayNumberInMonth parameter. False Named False False
OfWeek
Default: Saturday.
Specifies the months on which the
Months job will run: January, February, False Named False False
March, April, May, June, July,
469 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
August, September, October,
November, December.
Default: January, February, March,
April, May, June, July, August,
September, October, November,
December.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
470 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRTapeMediaPoolRetentionPolicy
Short Description
Creates a new VBRTapeMediaPoolRetentionPolicy object.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
New-VBRTapeMediaPoolRetentionPolicy [-Period
<VBRTapeMediaPoolPeriod> {None | Days | Weeks | Months}] [-Type
<VBRTapeMediaPoolRetentionType> {Never | Period | Cyclic}] [-
Value <int>] [<CommonParameters>]
Related Commands
None
Return Type
VBRTapeMediaPoolRetentionPolicy
Detailed Description
This cmdlet creates the VBRTapeMediaPoolRetentionPolicy object. This object contains the retention
settings of media pool.
Retention policy sets overwrite protection rules. The rules are set to media pool and are applied to all
tapes belonging to this media pool. After the retention period ends, the tape is queued for
overwriting.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the data retention type:
Never: the data is never
overwritten. This option
sets a lifelong protection
for tapes.
Period: the data is protected
for an indicated period.
Type Use the Period and the False Named False False
Value parameters to
indicate the period
settings.
Cyclic: the data is not
protected. The tapes are
overwritten according to
the tape rotation
settings.
Period Specifies the data retention False Named False False
period. Use this parameter to
471 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
indicate the time period for the
Type parameter:
None: data is not protected.
Tapes are overwritten
according to the tape
rotation settings.
Days: indicates that the data
retention period is
measured in days. Use
the Value parameter to
indicate the number of
days to protect the data.
Weeks: indicates that the
data retention period is
measured in weeks. Use
the Value parameter to
indicate the number of
weeks to protect the
data.
Months: indicates that the
data retention period is
measured in months.
Use the Value parameter
to indicate the number
of months to protect the
data.
Sets the number of days, weeks or
month to protect the data. You
can enter value between 1 and
Value 999. Use this parameter to False Named False False
indicate the value if you set
Period to Days, Weeks or
Months.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
472 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command creates a set of retention rules setting retention period to 14 days. The new settings are
assigned to a variable that can be further used in Set-VBRTapeMediaPool to apply them.
• The new retention settings are assigned to the '$newretention' variable.
• The Type is set to 'Period', the Period is set to 'Days', and the Value is set to '14'.
$newretention = New-VBRTapeMediaPoolRetentionPolicy -Type Period
-Period Days -Value 14
Example 2
This command switches off the retention. The new settings are assigned to a variable that can be
further used in Set-VBRTapeMediaPool to apply them.
• The new retention settings are assigned to the '$noretention' variable.
• The Type is set to 'Cyclic'.
$noretention = New-VBRTapeMediaPoolRetentionPolicy -Type Cyclic
473 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRTapeMediaSetCreationPolicy
Short Description
Creates a new VBRTapeMediaSetCreationPolicy object.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
New-VBRTapeMediaSetCreationPolicy [-DailyOptions
<VBRDailyOptions>] [-Type <VBRTapeMediaSetCreationPolicyType>
{Never | Always | Daily | Monthly}] [<CommonParameters>]
Related Commands
New-VBRDailyOptions
Return Type
VBRTapeMediaSetCreationPolicy
Detailed Description
This cmdlet creates a new VBRTapeMediaSetCreationPolicy object. This object contains the set of rules
for creating media sets. The media set creation policy in applied to media pools configuration.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the schedule settings
you want to apply to the media
set.
DailyOptions False Named False False
Accepts VBRDailyOptions object.
Default: Selected Days, 18 hours,
Saturday.
Specifies the type of policy for
creating media sets:
Never: new media sets are
not created. All data
archived to tape is
written to the same
media set.
Type False Named False False
Always: new media set is
created for each tape
job session.
Daily: new media set is
created on particular
days. Use the
DailyOptions
parameter to set days
474 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
on which you want the
media sets to be
created.
Monthly: not supported.
Default: Never.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command creates a set of media set creation rules allowing to create a new media set for every
backup session.
New-VBRTapeMediaSetCreationPolicy -Type Always
Example 2
This command creates a set of media set creation rules. A new media set will be created every Sunday
at 22:00.
• First, the schedule for creating media sets are configured with New-VBRDailyOptions. The
schedule is assigned to the '$dailyoptions' variable.
• Second, the media sets creation rules are set. The Type parameter is set to Daily.
PS C:\PS> $dailyoptions = New-VBRDailyOptions -DayOfWeek Sunday -
Period 22:00 -Type SelectedDays
PS C:\Users\Administrator> New-VBRTapeMediaSetCreationPolicy -
DailyOptions $dailyoptions -Type Daily
475 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRTapeLibrary
Short Description
Removes a specified tape library from Veeam Backup & Replication.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBRTapeLibrary -Library <VBRTapeLibrary[]> [-WhatIf] [-
Confirm] [<CommonParameters>]
Related Commands
Get-VBRTapeLibrary
Return Type
None
Detailed Description
This cmdlet removes a specified tape library from Veeam Backup & Replication.
When you remove a tape library, you stop managing it with your Veeam Backup & Replication console.
To remove a tape library, mind the following limitations:
• Only the libraries in the offline status can be removed. To remove a tape library, you need to
physically disconnect it from the tape server first. Alternatively, you can remove the tape
server to which the tape library is connected.
• You can remove the tape devices that are not used by any tape jobs. If any jobs are using the
media pools assigned to the tape device, first redirect these jobs to other media pools.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the tape library
you want to remove.
True (by Value
Accepts VBRTapeLibrary FromPipeline,
Library True Named False
object. ValueFromPipeline
ByPropertyName)
You can assign multiple
libraries to this object.
Specifies whether the
cmdlet writes a message
that describes the effects
WhatIf False Named False False
of running the cmdlet
without actually
performing any action.
Confirm Specifies whether the False Named False False
476 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
cmdlet displays a prompt
that asks if the user is
sure that they want to
continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes a tape library named 'HP MSL G3 Series 3.00'. The library object is obtained
with Get-VBRTapeLibrary and piped down.
Get-VBRTapeLibrary -Name "HP MSL G3 Series 3.00" | Remove-
VBRTapeLibrary
Example 2
This command removes a tape library represented by '$SydneyTapeLibrary' variable. The library object
is obtained with Get-VBRTapeLibrary and assigned to the variable beforehand.
Remove-VBRTapeLibrary -Library $SydneyTapeLibrary
477 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRTapeMediaPool
Short Description
Removes media pool.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBRTapeMediaPool -MediaPool <VBRTapeMediaPool[]> [-WhatIf]
[-Confirm] [<CommonParameters>]
Related Commands
Get-VBRTapeMediaPool
Return Type
None
Detailed Description
This cmdlet removes a selected media pool from Veeam Backup & Replication.
Important! You can only delete custom media pools; predefined media pools cannot be deleted.
You cannot delete a media pool that contains tapes. To be able to delete such a pool, first move tapes
from this pool to other media pools.
You cannot delete media pools used by an existing backup/files to tape copy job. In case you
definitely have to disable this pool, you should first modify the corresponding job to target another
media pool.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the media
pool(s) you want to
remove.
You can assign multiple True (by Value
media pools to this FromPipeline,
MediaPool True Named False
object. ValueFromPipeline
ByPropertyName)
Accepts
VBRTapeMediaPool
object, GUID or string
type.
Specifies whether the
WhatIf cmdlet writes a message False Named False False
that describes the effects
of running the cmdlet
478 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
without actually
performing any action.
Specifies whether the
cmdlet displays a prompt
Confirm that asks if the user is False Named False False
sure that they want to
continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes the media pool named "Winserver MediaPool". The media pool is obtained
with Get-VBRTapeMediaPool and piped down.
Get-VBRTapeMediaPool -Name "Winserver MediaPool" | Remove-
VBRTapeMediaPool
Example 2
This command removes the media pool represented by the $pool variable. The media pool is
obtained with Get-VBRTapeMediaPool and assigned to $pool variable beforehand.
Remove-VBRTapeMediaPool -MediaPool $pool
479 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRTapeServer
Short Description
Removes a specified tape server from Veeam Backup & Replication.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBRTapeServer -TapeServer <VBRTapeServer[]> [-WhatIf] [-
Confirm] [<CommonParameters>]
Related Commands
Get-VBRTapeServer
Return Type
None
Detailed Description
This cmdlet removes a specified tape server from Veeam Backup & Replication.
When you remove a tape server, Veeam Backup & Replication unassigns the tape server role from the
server, so it is no longer used as a tape server. The actual server remains connected to Veeam Backup
& Replication.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the tape server
you want to remove.
True (by Value
Accepts VBRTapeServer FromPipeline,
TapeServer True Named False
objects. ValueFromPipeline
ByPropertyName)
You can assign multiple
servers to this object.
Specifies whether the
cmdlet writes a message
that describes the effects
WhatIf False Named False False
of running the cmdlet
without actually
performing any action.
Specifies whether the
cmdlet displays a prompt
Confirm that asks if the user is False Named False False
sure that they want to
continue.
480 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes a tape server named "Sydney_Tape_Server". The tape server is obtained with
Get-VBRTapeServer and piped down.
Get-VBRTapeServer -Name "Sydney_Tape_Server" | Remove-
VBRTapeServer
Example 2
This command removes tape servers represented by '$SydneyTapeServer' and '$NewYorkTapeServer'
variables. The tape servers are obtained with Get-VBRTapeServer and assigned to the variables
beforehand.
Remove-VBRTapeServer -TapeServer $SydneyTapeServer,
$NewYorkTapeServer
481 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRTapeVault
Short Description
Removes a specified tape vault from Veeam Backup & Replication.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Remove-VBRTapeVault -Vault <VBRTapeVault[]> [-WhatIf] [-Confirm]
[<CommonParameters>]
Related Commands
Get-VBRTapeVault
Return Type
None
Detailed Description
This cmdlet removes a specified tape vault from Veeam Backup & Replication.
When you remove a vault, you do not remove the tapes stored in it.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the vault you
want to remove.
True (by Value
Accepts VBRTapeVault FromPipeline,
Vault True Named False
object. ValueFromPipeline
ByPropertyName)
You can assign multiple
vaults to this object.
Specifies whether the
cmdlet writes a message
that describes the effects
WhatIf False Named False False
of running the cmdlet
without actually
performing any action.
Specifies whether the
cmdlet displays a prompt
Confirm that asks if the user is False Named False False
sure that they want to
continue.
482 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes a tape vault named 'Sydney Remote Storage'. The vault object is obtained
with Get-VBRTapeVault and piped down.
Get-VBRTapeVault -Name "Sydney Remote Storage" | Remove-
VBRTapeVault
Example 2
This command removes tape vaults represented by '$SydneyRemoteStorage' and
'$NewYorkRemoteStorage' variables. The vaults objects are obtained with Get-VBRTapeVault and
assigned to the variables beforehand.
Remove-VBRTapeVault -Vault $SydneyRemoteStorage,
$NewYorkRemoteStorage
483 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRBackupToTapeJob
Short Description
Modifies backup to tape job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Set-VBRBackupToTapeJob -Job <VBRBackupToTapeJob> [-Name <String>]
[-Description <String>] [-EjectCurrentMedium] [-
ExportCurrentMediaSet] [-FullBackupMediaPool <VBRTapeMediaPool>]
[-IncrementalBackupMediaPool <VBRTapeMediaPool>] [-ExportDays
<DayOfWeek[]>] [-FullBackupPolicy <VBRFullBackupToTapePolicy>] [-
ScheduleOptions <VBRBackupToTapeScheduleOptions>] [-Object
<Object[]>] [-ProcessIncrementalBackup] [-UseHardwareCompression]
[-WaitPeriod <TimeSpan>] [-WaitForBackupJob] [-PassThru] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Get-VBREPJob
Get-VBRBackupRepository
Get-VBRTapeMediaPool
New-VBRFullBackupToTapePolicy
New-VBRBackupToTapeScheduleOptions
Get-VBRBackupRepository
Return Type
VBRBackupToTapeJob
Detailed Description
This cmdlet modifies a selected backup to tape job that was created before. To modify settings, you
need to enter the corresponding parameters with new values. The parameters that you omit will
remain unchanged.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the backup to True (by Value
tape job to which you FromPipeline,
Job want to apply new True Named ValueFromPip False
settings. eline
Accepts ByPropertyNa
484 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
VBRBackupToTapeJob or me)
TapeJob objects, GUID or
string type.
Specifies the name you
want to assign to the
Name backup to tape job. True Named False False
Accepts string type.
Specifies the description
of the backup to tape job.
Description If not set, Veeam Backup False Named False False
& Replication will enter
date and time of creation
by default.
Indicates that the tape(s)
will be automatically
Eject ejected from drive after
Current the job finishes. False Named False False
Medium The ejected tape is
moved to a standard
library slot.
Indicates that the tapes
belonging to the media
set will be automatically
placed to Import/Export
(Mail) slot for further
export. Use the
Export ExportDays parameter to
Current set days on which you False Named False False
MediaSet want to export tapes.
If you use this parameter,
but do not set the
ExportDays parameter,
the tapes will be exported
every day.
Specifies the media pool
where you want to store
full backups produced by
FullBackup this tape job.
True Named False False
MediaPool Accepts
VBRTapeMediaPool
object, GUID or string
type.
Used to set media pool
for the
ProcessIncrementalBac
Incremental kup parameter.
Backup Specifies the media pool False Named False False
MediaPool where you want to store
incremental backups
produced by this tape
job.
485 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Accepts
VBRTapeMediaPool
object, GUID or string
type.
Used to set days for
exporting tapes for the
ExportCurrentMediaSet
parameter.
Specifies days on which
ExportDays the tapes written by this False Named False False
tape job will be
automatically exported:
Monday, Tuesday,
Wednesday, Thursday,
Friday, Saturday, Sunday.
Specifies virtualized
synthetic full backup for
FullBackup tape settings.
False Named False False
Policy Accepts
VBRFullBackupToTapePoli
cy object.
Specifies backup to tape
job schedule.
Accepts
VBRBackupToTapeSched
uleOptions object.
By default, the following
settings are applied:
Enabled: False
Type: Daily
DailyOptions: Type:
SelectedDays,
Period: 18:00,
DayOfWeek:
Saturday
Schedule MonthlyOptions:
Period: 22:00, False Named False False
Options
DayNumberInM
onth: Fourth,
DayOfWeek:
Saturday,
Months:
January,
February,
March, April,
May, June, July,
August,
September,
October,
November,
December
ScheduleOptions:
From Sunday to
Saturday, from
486 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
00:00 to 23:00,
Enabled: true
JobId: null
Specifies the backup job
or backup repository that
will be the source for this
tape job.
Accepts CBackupJob,
Object VBREPJob or False Named False False
CBackupRepository
objects.
You can assign multiple
jobs or repositories to this
object.
Indicates that this tape
job will archive
incremental backups. Use
the
IncrementalBackupMed
iaPool parameter to
specify a separate media
Process
pool for storing
Incremental False Named False False
incremental backups. If
Backup
you do not set the
IncrementalBackupMed
iaPool parameter,
incremental backups will
be stored to the media
pool the you set for full
backups.
Indicates that tape library
must perform hardware
compression for archives.
UseHardware
Do not use this option for False Named False False
Compression
archiving Veeam backups
or other already
compressed files.
Used to set time period
for the
WaitForBackupJob
parameter.
Specifies the time period
for which the tape job
WaitPeriod must wait for the source False Named False False
backup jobs to finish.
Can be set to 1-777
minutes.
Accepts TipeSpan, integer
or string types.
Indicates that the tape
WaitFor job must wait for the False Named False False
BackupJob source backup job to
finish. Use the
487 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
WaitPeriod parameter to
set the time period.
Indicates that the
command returns the
PassThru output object to the False Named False False
Windows PowerShell
console.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
488 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRBackupWindowOptions
Short Description
Modifies the VBRBackupWindowOptions object.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRBackupWindowOptions -Options <VBRBackupWindowOptions> -
FromDay <DayOfWeek> -FromHour <Int32> -ToDay <DayOfWeek> -ToHour
<Int32> -Enabled [-PassThru] [-WarningAction <ActionPreference>]
[-WarningVariable <String>] [<CommonParameters>]
Related Commands
None
Return Type
VBRBackupWindowOptions
Detailed Description
This cmdlet modifies the VBRBackupWindowOptions object that was created earlier. To modify
settings, you need to enter the corresponding parameters with new values. The parameters that you
omit will remain unchanged.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True (by Value
Specifies the FromPipeline,
VBRBackupWindowOp ValueFromPipe
Options True Named False
tions you want to line
modify. ByPropertyNa
me)
Specifies the day of week
on which the backup
window opens.
FromDay False Named False False
Accepts DayOfWeek
enumeration.
Default: Sunday.
Specifies the hour on
which the backup
window opens.
FromHour False Named False False
Accepts int32 type.
Default: 0.
489 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the day of week
on which the backup
window ends.
ToDay False Named False False
Accepts DayOfWeek
enumeration.
Default: Saturday.
Specifies the hour on
which the backup
window ends.
ToHour False Named False False
Accepts int32 type.
Default: 23.
Indicates if this backup
window is enabled or
disabled.
Enabled: jobs are
allowed to run
within the
specified
Enabled False Named False False
interval.
Disabled: jobs are
prohibited to
run within the
specified
interval.
Default: False.
Indicates that the
command returns the
PassThru output object to the False Named False False
Windows PowerShell
console.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
490 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRFileToTapeJob
Short Description
Modifies file to tape job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRFileToTapeJob -Job <VBRFileToTapeJob> [-Name <String>] [-
Description <String>] [-EjectCurrentMedium] [-
ExportCurrentMediaSet] [-FullBackupMediaPool <VBRTapeMediaPool>]
[-IncrementalBackupMediaPool <VBRTapeMediaPool>] [-ExportDays
<DayOfWeek[]>] [-FullBackupPolicy <VBRFileToTapeBackupPolicy>] [-
IncrementalBackupPolicy <VBRFileToTapeBackupPolicy>] [-Object
<VBRFileToTapeObject[]>] [-UseVSS] [-UseHardwareCompression] [-
PassThru] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
Get-VBRTapeJob
Get-VBRTapeMediaPool
New-VBRFileToTapeBackupPolicy
New-VBRFileToTapeObject
Return Type
VBRFileToTapeJob
Detailed Description
This cmdlet modifies a selected file to tape job that was created before. To modify settings, you need
to enter the corresponding parameters with new values. The parameters that you omit will remain
unchanged.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the file to tape
job to which you want True (by Value
to apply new settings. FromPipeline,
ValueFrom
Job Accepts True Named False
Pipeline
VBRFileToTapeJob or ByProperty
TapeJob objects, GUID Name)
or string type.
Specifies the name you
Name want to assign to the True Named False False
file to tape job.
491 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Accepts string type.
Specifies the
description of the file to
tape job.
Description If not set, Veeam False Named False False
Backup & Replication
will enter date and time
of creation by default.
Indicates that the
tape(s) will be
automatically ejected
Eject from drive after the job
Current finishes. False Named False False
Medium
The ejected tape is
moved to a standard
library slot.
Indicates that the tapes
belonging to the media
set will be automatically
placed to Import/Export
(Mail) slot for further
export. Use the
ExportDays parameter
Export to set days on which
Current you want to export False Named False False
MediaSet tapes.
If you use this
parameter, but do not
set the ExportDays
parameter, the tapes
will be exported every
day.
Specifies the media
pool where you want to
store full backups
produced by this tape
FullBackup job. True Named False False
MediaPool
Accepts
VBRTapeMediaPool
object, GUID or string
type.
Used to set media pool
for the
ProcessIncrementalBa
ckup parameter.
Incremental Specifies the media
Backup pool where you want to False Named False False
MediaPool store incremental
backups produced by
this tape job.
Accepts
VBRTapeMediaPool
492 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
object, GUID or string
type.
If you do not specify a
media pool,
incremental backups
will be stored to the
media pool the you set
for full backups.
Used to set days for
exporting tapes for the
ExportCurrentMediaS
et parameter.
Specifies days on which
ExportDays the tapes written by this False Named False False
tape job will be
automatically exported:
Monday, Tuesday,
Wednesday, Thursday,
Friday, Saturday,
Sunday.
Specifies virtualized
synthetic full backup for
tape settings.
Accepts
VBRFileToTapeBackupP
olicy object.
By default, the
following settings are
applied:
Type: Daily
DailyOptions:
Type:
SelectedDays,
Period: 18:00,
DayOfWeek:
FullBackup Saturday
False Named False False
Policy MonthlyOptions:
Period: 22:00,
DayNumberIn
Month:
Fourth,
DayOfWeek:
Saturday,
Months:
January,
February,
March, April,
May, June,
July, August,
September,
October,
November,
December
Enabled: false
493 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies incremental
backup settings.
Accepts
VBRFileToTapeBackupP
olicy object.
By default, the
following settings are
applied:
Type: Daily.
DailyOptions:
Type:
SelectedDays,
Period: 18:00,
DayOfWeek:
Saturday.
Incremental
MonthlyOptions: False Named False False
BackupPolicy
Period: 22:00,
DayNumberIn
Month:
Fourth,
DayOfWeek:
Saturday,
Months:
January,
February,
March, April,
May, June,
July, August,
September,
October,
November,
December.
Enabled: false.
Specifies the source file
system object.
Accepts
Object VBRFileToTapeObject False Named False False
object.
You can assign multiple
files to this object.
Indicates that the VSS
(Microsoft Volume
UseVSS Shadow Copy) must be False Named False False
used.
Default: true.
Indicates that tape
library must perform
hardware compression
Use
for archives. Do not use
Hardware False Named False False
this option for archiving
Compression
Veeam backups or other
already compressed
files.
494 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
495 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRTapeLibrary
Short Description
Modifies tape library.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRTapeLibrary -TapeLibrary <VBRTapeLibrary> -Name <string>
[-PassThru] [<CommonParameters>]
Related Commands
Get-VBRTapeLibrary
Return Type
None, VBRTapeLibrary (use -PassThru to obtain output object)
Detailed Description
This cmdlet modifies the name of the selected tape library.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the tape library True (by Value
you want to modify. FromPipeline,
TapeLibrary True Named False
Accepts VBRTapeLibrary ValueFromPipeline
object. ByPropertyName)
Specifies the new name
Name you want to assign to False Named False False
the library.
Indicates that the
command returns the
PassThru output object to the False Named False False
Windows PowerShell
console.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
496 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command modifies the name of the tape library named 'HP MSL G3 Series 3.00' to 'New York
Remote Tape'. The library object is obtained with Get-VBRTapeLibrary and piped down. The PassThru
parameter is set to get the output and view the details.
PS C:\PS> Get-VBRTapeLibrary -Name "HP MSL G3 Series 3.00" | Set-
VBRTapeLibrary -Name "New York Remote Tape" -PassThru
Drives : {Tape0, Tape1}
Enabled : True
Model : MSL G3 Series
Slots : 24
TapeServerId : 00000000-0000-0000-0000-000000000000
Type : Automated
State : Online
Id : 2f1fdc3c-8a97-4fa0-b631-74a039e64d5c
Name : New York Remote Tape
Description : New York office Tape Library
Example 2
This command modifies the name of the tape library represented by the '$NYTapeLibrary' variable.
The tape library object is obtained by running Get-VBRTapeLibrary and assigned to the variable
beforehand.
Set-VBRTapeLibrary -TapeLibrary $NYTapeLibrary -Name "New York
Remote Tape"
497 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRTapeMediaPool
Short Description
Modifies media pool.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRTapeMediaPool -MediaPool <VBRTapeMediaPool> [-Name
<string>] [-Description <string>] [-MoveFromFreePool] [-
MoveOfflineToVault] [-Vault <VBRTapeVault>] [-EnableEncryption]
[-EncryptionKey <VBREncryptionKey>] [-MediaSetCreationPolicy
<VBRTapeMediaSetCreationPolicy>] [-MediaSetName <string>] [-
RetentionPolicy <VBRTapeMediaPoolRetentionPolicy>] [-PassThru]
[<CommonParameters>]
Related Commands
Get-VBRTapeMediaPool
Get-VBRTapeLibrary
Get-VBRTapeMedium
Get-VBRTapeVault
Get-VBREncryptionKey
New-VBRTapeMediaPoolRetentionPolicy
New-VBRTapeMediaSetCreationPolicy
Return Type
VBRTapeMediaPool
Detailed Description
This cmdlet modifies media pool that was created before. To modify settings, you need to enter the
corresponding parameters with new values. The parameters that you omit will remain unchanged.
498 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the media pool True (by Value
to which you want to FromPipeline,
apply new settings. ValueFrom
MediaPool True Named False
Accepts Pipeline
VBRTapeMediaPool ByProperty
object. Name)
Specifies the new name
you want to assign to the
Name media pool. False Named False False
Accepts string type.
Specifies the new
description you want to
Description assign to the media pool. False Named False False
Accepts string type.
Indicates that when the
media pool runs out of
MoveFrom tapes, it can be
False Named False False
FreePool replenished by tapes
from the Free media
pool.
Indicates that the tapes
that go offline must be
automatically moved to a
MoveOffline vault. Use the Vault
False Named False False
ToVault parameter to specify the
vault to which you want
to move the tapes from
this media pool.
Used to set vault for the
MoveOfflineToVault
parameter. Specifies the
vault to which you want
to automatically move
Vault the tapes. You can specify False Named False False
one vault for several
media pools.
Accepts VBRTapeVault
object.
Indicates that Veeam
Backup & Replication will
encrypt data archived to
Enable tape. Use the
False Named False False
Encryption EncryptionKey
parameter to specify the
password you want to
use to encrypt the data.
Encryption Used to set password for
the EnableEncryption False Named False False
Key
parameter. Specifies the
499 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
password you want to
use to encrypt the data.
Accepts
VBREncryptionKey object.
Specifies the media set
creation settings you
MediaSet want to apply to this
Creation media pool. False Named False False
Policy Accepts
VBRTapeMediaSetCreatio
nPolicy object.
Specifies the new name
you want to assign to the
MediaSet media sets created in this False Named False False
Name media pool.
Accepts string type.
Specifies the retention
settings you want to
Retention apply to this media pool.
False Named False False
Policy Accepts
VBRTapeMediaPoolReten
tionPolicy object.
Indicates that the
command returns the
PassThru output object to the False Named False False
Windows PowerShell
console.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
500 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command instructs the selected media pool to move the offline tapes to a particular tape vault.
• The media pool that is modified is obtained with Get-VBRTapeMediaPool and assigned to
'$mediapool' variable beforehand.
• The -MoveOfflineToVault parameter is used to instruct the media pool to move the offline
tapes to a vault.
• The vault to which the tapes must be moved is obtained with Get-VBRTapeVault and
assigned to '$vault' variable beforehand.
Set-VBRTapeMediaPool -MediaPool $mediapool -MoveOfflineToVault -
Vault $vault
Example 2
This command adds encryption settings to a selected media pool.
• The media pool that is modified is obtained with Get-VBRTapeMediaPool and assigned to
'$mediapool' variable beforehand.
• The -EnableEncryption parameter is used to instruct the media pool to encrypt the archived
data.
• The encryption key that must be used is obtained with Get-VBREncryptionKey and assigned
to '$encryptionkey' variable beforehand.
Set-VBRTapeMediaPool -MediaPool $mediapool -EnableEncryption -
EncryptionKey $encryptionkey
501 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRTapeMedium
Short Description
Modifies tape properties.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRTapeMedium -Medium <VBRTapeMedium> [-Name <String>] [-
Description <String>] [-PassThru] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRTapeMedium
Return Type
VBRTapeMedium
Detailed Description
This cmdlet modifies properties of a selected tape. You can modify name and/or description of the
tape. To modify settings, you need to enter the corresponding parameters with new values. The
parameters that you omit will remain unchanged.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies tape you want
True (by Value
to modify.
FromPipeline,
Medium Accepts True Named ValueFromPipeline False
VBRTapeMedium ByPropertyName)
object, GUID or string
or False
type.
Specifies the new name
you want to assign to
Name the tape. False Named False False
Accepts string type.
Specifies the new
description you want to
Description assign to the tape. False Named False False
Accepts string type.
Indicates that the
PassThru command returns the False Named False False
output object to the
Windows PowerShell
502 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
console.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command renames the '0014001F' tape into 'SQL 9/2014' and sets a description for it.
The tape is obtained with Get-VBRTapeMedium and piped down.
Get-VBRTapeMedium -Name "0014001F" | Set-VBRTapeMedium -Name "SQL
9/2014" -Description "SQL DB monthly full backups: Sept/2014"
Example 2
This command renames a selected tape into 'SQL encrypted'.
The tape is obtained with Get-VBRTapeMedium and assigned to the '$tape' variable beforehand.
Set-VBRTapeMedium -Medium $tape -Name "SQL encrypted"
503 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRTapeServer
Short Description
Modifies tape server.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRTapeServer -TapeServer <VBRTapeServer> [-Description
<string>] [-PassThru] [<CommonParameters>]
Related Commands
Get-VBRTapeServer
Return Type
None, VBRTapeServer (use -PassThru to obtain output object)
Detailed Description
This cmdlet modifies tape server that was created before.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the tape server True (by Value
you want to modify. FromPipeline,
TapeServer True Named False
Accepts VBRTapeServer ValueFromPipeline
objects. ByPropertyName)
Specifies the new
Description description you want to False Named False False
apply to the tape server.
Indicates that the
command returns the
PassThru output object to the False Named False False
Windows PowerShell
console.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
504 | Veeam Backup PowerShell |REFERENCE| REV 2
Example
This command modifies the description of the tape server named "Sydney_Tape_Server". The tape
server is obtained by running Get-VBRTapeServer and piped down. The description is changed to
"Sydney_Remote_Tape_Server". The PassThru parameter is set to get the output and view the details.
Get-VBRTapeServer -Name "Sydney_Tape_Server" | Set-VBRTapeServer
-Description "Sydney_Remote_Tape_Server" -PassThru
ServerId : 937f3556-e684-4b33-a8a9-d87d243948f6
IsAvailable : True
Id : 6d3c4fd8-9d0a-454b-9ef0-32f72d577069
Name : Sydney_Tape_Server
Description : Sydney Remote Tape Server
505 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRTapeVault
Short Description
Modifies tape vault.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise, Enterprise Plus
Syntax
Set-VBRTapeVault -Vault <VBRTapeVault> [-Name <String>] [-
Description <String>] [-Protect] [-PassThru] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRTapeVault
Return Type
None, VBRTapeVault (use -PassThru to obtain output object)
Detailed Description
This cmdlet modifies tape vault that was created before. To modify settings, you need to enter the
corresponding parameters with new values. The parameters that you omit will remain unchanged.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the vault you
want to modify. True (by Value
FromPipeline,
Vault Accepts VBRTapeVault True Named False
ValueFromPipeline
object, GUID or string ByPropertyName)
type.
Specifies the name you
Name want to assign to the True Named False False
vault.
Specifies the description
of the vault.
Description If not set, Veeam Backup False Named False False
& Replication will enter
date and time of creation
by default.
Indicates that all tapes
moved to this media
Protect False Named False False
vault are automatically
protected.
506 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command modifies the name and the description of the vault named 'Sydney Remote Storage'.
The vault object is obtained by running Get-VBRTapeVault and piped down. The PassThru parameter
is set to get the output and view the details.
PS C:\PS> Get-VBRTapeVault -Name "Sydney Remote Storage" | Set-
VBRTapeVault -Name "Sydney Remote Storage 02" -Description
"Secondary Sydney Remote Storage" -PassThru
Location : Sydney Offsite Storage
Medium : {}
Id : 4be3b4c9-a620-4abd-a68b-b8a697115781
Name : Sydney Remote Storage 02
Description : Secondary Sydney Remote Storage
Example 2
This command modifies the name of the vault represented by the '$SydneyRemoteStorage' variable.
The vault object is obtained by running Get-VBRTapeVault and assigned to the variable beforehand.
Set-VBRTapeVault -Vault $SydneyRemoteStorage -Name "Sydney Remote
Storage 02"
507 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRTapeCatalog
Short Description
Starts tape catalog process.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRTapeCatalog -Library <VBRTapeLibrary[]> [-Wait]
[<CommonParameters>]
-OR-
Start-VBRTapeCatalog -Medium <VBRTapeMedium[]> [-Wait]
[<CommonParameters>]
Related Commands
Get-VBRTapeLibrary
Get-VBRTapeMedium
Return Type
VBRBackupSession
Detailed Description
This cmdlet starts catalog process. Catalog process scans tape contents and registers tapes in the
Veeam Backup & Replication database after which Veeam Backup & Replication is able to administrate
tape allocation and consumption and track data written to tapes.
You can run catalog job for selected libraries or for selected tapes.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the tape library
which you want to
catalog.
True (by Value
Accepts VBRTapeLibrary FromPipeline,
Library True Named False
object, GUID or string ValueFromPipeline
type. ByPropertyName)
You can assign multiple
libraries to this object.
Specifies the tape(s) you
want to catalog. True (by Value
FromPipeline,
Medium Accepts True Named False
ValueFromPipeline
VBRTapeMedium object, ByPropertyName)
GUID or string type.
508 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
You can assign multiple
tapes to this object.
Indicates that the
command waits for the
Wait process to complete False Named False False
before accepting more
input.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
509 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRTapeInventory
Short Description
Starts tape inventory.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRTapeInventory -Library <VBRTapeLibrary[]> [-Wait]
[<CommonParameters>]
-OR-
Start-VBRTapeInventory -Medium <VBRTapeMedium[]> [-Wait]
[<CommonParameters>]
Related Commands
Get-VBRTapeLibrary
Get-VBRTapeMedium
Return Type
VBRBackupSession
Detailed Description
This cmdlet starts inventory process.
You can run inventory job for selected libraries or for selected tapes.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the tape library
which you want to
inventory.
True (by Value
Accepts VBRTapeLibrary FromPipeline,
Library True Named False
object, GUID or string ValueFromPipeline
type. ByPropertyName)
You can assign multiple
libraries to this object.
Specifies the tape(s) you
want to inventory.
True (by Value
Accepts
FromPipeline,
Medium VBRTapeMedium object, True Named False
ValueFromPipeline
GUID or string type.
ByPropertyName)
You can assign multiple
tapes to this object.
510 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Indicates that the
command waits for the
Wait process to complete False Named False False
before accepting more
input.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
511 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRBackupToTapeJob
This object contains backup to tape job.
Created by
Add-VBRBackupToTapeJob
Passed to
Set-VBRBackupToTapeJob
Properties
Property Type Description
The synthesized full backup
FullBackupPolicy VBRFullBackupToTapePolicy
creation policy.
CBackupJob[]
The backup job or backup
Object or repository set as the source for
the tape job.
CBackupRepository[]
Indicates if the incremental
ProcessIncrementalBackup bool
backups must be archived.
VBRBackupToTapeScheduleOptio
ScheduleOptions The job schedule.
ns
Indicates if the tape job must
WaitForBackupJobs bool
wait for the source backup job.
The time period for which the
WaitPeriod TimeSpan tape job waits for the source
backup job.
Indicates if the tape currently
EjectCurrentMedium bool used by the tape job must be
ejected.
Indicates if the current media set
ExportCurrentMediaSet bool created by the tape job must be
exported when it is complete.
Days on which the media sets
ExportDays DayOfWeek[]
must be exported.
FullBackupMediaPool VBRTapeMediaPool The media pool for full backups.
The media pool for incremental
IncrementalBackupMediaPool VBRTapeMediaPool
backups.
Indicates if the tape library
UseHardwareCompression bool hardware compression must be
used.
The date and time of the next run
NextRun DateTime?
of the job.
Target Object The media pool used by the job.
Type VBRJobType The job type: BackupToTape.
LastResult VBRSessionResult The last result of the job:
512 | Veeam Backup PowerShell |REFERENCE| REV 2
Property Type Description
None/Success/Warning/Failed.
The last job state: Stopped,
Starting, Stopping, Working,
LastState VBRSessionState Pausing, Resuming, WaitingTape,
Idle, Postprocessing,
WaitingRepository.
Id GUID The unique identifier of the job.
Name string The name of the job.
Description string The description of the job.
513 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRBackupToTapeScheduleOptions
This object contains schedule settings for backup to tape job.
Created by
New-VBRBackupToTapeScheduleOptions
Passed to
Add-VBRBackupToTapeJob
Set-VBRBackupToTapeJob
VBRBackupToTapeJob
Properties
Property Type Description
The type of the job schedule:
Type VBRBackupToTapePolicyType AfterJob, AfterNewBackup, Daily,
Monthly.
DailyOptions VBRDailyOptions The job daily schedule settings.
The job monthly schedule
MonthlyOptions VBRMonthlyOptions
settings.
BackupWindowOptions VBRBackupWindowOptions The job backup window settings.
The ID of the job after which this
JobId GUID?
job must run.
The job schedule status:
Enabled bool
(enabled) True/False.
514 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRFileToTapeBackupPolicy
This object contains schedule settings for file to tape job.
Created by
New-VBRFileToTapeBackupPolicy
Passed to
Add-VBRFileToTapeJob
Set-VBRFileToTapeJob
VBRFileToTapeJob
Properties
Property Type Description
The type of the job schedule:
Type VBRFileToTapeBackupPolicyType
Daily, Monthly.
DailyOptions VBRDailyOptions The job daily schedule settings.
The job monthly schedule
MonthlyOptions VBRMonthlyOptions
settings.
The job schedule status:
Enabled bool
(enabled) True/False.
515 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRFileToTapeJob
This object contains file to tape job.
Created by
Add-VBRFileToTapeJob
Passed to
Set-VBRFileToTapeJob
Properties
Property Type Description
The synthesized full backup
FullBackupPolicy VBRFullBackupToTapePolicy
creation policy.
The job schedule for creating
IncrementalBackupPolicy VBRFileToTapeBackupPolicy
incremental backups.
The file system object set as the
Object VBRFileToTapeObject[]
source for the tape job.
Indicates that Microsoft VSS must
be used to place the files that are
UseVss bool
locked by running applications to
tape in a consistent state.
Indicates if the tape currently
EjectCurrentMedium bool used by the tape job must be
ejected.
Indicates if the current media set
ExportCurrentMediaSet bool created by the tape job must be
exported when it is complete.
Days on which the media sets
ExportDays DayOfWeek[]
must be exported.
FullBackupMediaPool VBRTapeMediaPool The media pool for full backups.
The media pool for incremental
IncrementalBackupMediaPool VBRTapeMediaPool
backups.
Indicates if the tape library
UseHardwareCompression bool hardware compression must be
used.
The date and time of the next run
NextRun DateTime?
of the job.
Target Object The media pool used by the job.
Type VBRJobType The job type: FileToTape.
The last result of the job: None,
LastResult VBRSessionResult
Success, Warning, Failed.
The last job state: Stopped,
Starting, Stopping, Working,
LastState VBRSessionState Pausing, Resuming, WaitingTape,
Idle, Postprocessing,
WaitingRepository.
516 | Veeam Backup PowerShell |REFERENCE| REV 2
Property Type Description
Id GUID The unique identifier of the job.
Name string The name of the job.
Description string The description of the job.
517 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRFileToTapeObject
This object contains file system objects passed to the file to tape jobs.
Created by
New-VBRFileToTapeObject
Passed to
Add-VBRFileToTapeJob
Set-VBRFileToTapeJob
VBRFileToTapeJob
Properties
Property Type Description
The mask for selecting files from
IncludeMask string
a directory.
Path string The file or directory path.
Indicates that the source data is a
IsDirectory bool
directory (True) or file (False).
The host where the source files
Server CHost
reside.
The credentials to authenticate
Credentials CCredentials
with the host.
518 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRFullBackupToTapePolicy
This object contains schedule settings for creating synthesized full backups for backup to tape job.
Created by
New-VBRFullBackupToTapePolicy
Passed to
Add-VBRBackupToTapeJob
Set-VBRBackupToTapeJob
Properties
Property Type Description
The type of the synthesized full backups
Type VBRFullBackupToTapePolicyType
creation policy: Monthly, WeeklyOnDays.
The days on which the synthesized full backups for
WeeklyOnDays DayOfWeek[]
tapes are created.
MonthlyOptions VBRMonthlyOptions The job monthly schedule settings.
519 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRTapeDrive
This object contains a tape library drive.
Created by
None
Passed to
Get-VBRTapeDrive
Disable-VBRTapeDrive
Enable-VBRTapeDrive
Get-VBRTapeMedium
Eject-VBRTapeMedium
Properties
Property Type Description
Number of slot where the drive is
Address int
connected.
Tape library to which the drive
Device string
belongs.
Enabled bool Indicates if the drive is enabled.
Indicates if the drive is locked by
IsLocked bool
read/write operations.
Unique identifier of the tape
LibraryId GUID library to which the drive
belongs.
Name of the tape currently
Medium VBRTapeMedium
located in the drive.
Model string Drive model name.
SerialNumber string Drive serial number.
Current drive state: Loaded,
State VBRTapeDriveState
Empty.
Id GUID Unique identifier of the drive.
Name string Drive name.
Description string Drive description.
520 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRTapeLibrary
This object contains a tape library.
Created by
None
Passed to
Rescan-VBREntity
Get-VBRTapeDrive
Start-VBRTapeCatalog
Start-VBRTapeInventory
Get-VBRTapeLibrary
Remove-VBRTapeLibrary
Set-VBRTapeLibrary
Add-VBRTapeMediaPool
Get-VBRTapeMediaPool
Get-VBRTapeMedium
Import-VBRTapeMedium
Properties
Property Type Description
Drives VBRTapeDrive[] Tape library drives.
Indicates if the drives are
Enabled bool
enabled.
Model string Model names of the drives.
Number of tape slots in the tape
Slots int
library.
Unique identifier of the tape
TapeServerId GUID server to which the tape library is
connected.
Type of the tape library:
Type VBRTapeLibraryType
Automated, StandaloneDrive.
Current tape library state: Online,
State VBRTapeLibraryState
Offline.
Unique identifier of the tape
Id GUID
library.
Name string Tape library name.
Description string Tape library description.
521 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRTapeMediaPool
This object contains media pool.
Created by
Add-VBRTapeMediaPool
Passed to
Add-VBRBackupToTapeJob
Add-VBRFileToTapeJob
Set-VBRBackupToTapeJob
Set-VBRFileToTapeJob
Get-VBRTapeMediaPool
Remove-VBRTapeMediaPool
Set-VBRTapeMediaPool
Get-VBRTapeMedium
Move-VBRTapeMedium
Properties
Property Type Description
Total capacity of tapes that
Capacity int64 belong to the media pool (in
bytes).
Data encryption options applied
to the media pool; contains
EncryptionOptions VBREncryptionOptions
'Enabled' flag and PSCryptoKey
object.
Total free capacity of tapes that
FreeSpace int64 belong to the media pool (in
bytes).
Unique identifier of the tape
LibraryId GUID library to which the media pool
belongs.
Media sets creation policy
MediaSetCreationPolicy VBRTapeMediaSetCreationPolicy
applied to this media pool.
Name of media sets cretated in
MediaSetName string
this media pool.
Tapes that belong to this media
Medium VBRTapeMedium
pool.
Indicates if the media pool can be
MoveFromFreePool bool replenished from Free media
pool.
Indicates if the offline are moved
MoveOfflineToVault bool
to a vault.
VBRTapeMediaPoolRetentionPoli Retention policy applied to the
RetentionPolicy
cy media pool.
522 | Veeam Backup PowerShell |REFERENCE| REV 2
Property Type Description
Vault to which the offline tapes
Vault VBRTapeVault
are moved.
Media pool type: Unrecognized,
Type VBRTapeMediaPoolType
Free, Retired, Custom, Imported.
523 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRTapeMediaPoolRetentionPolicy
This object contains the retention settings of media pool.
Created by
New-VBRTapeMediaPoolRetentionPolicy
Passed to
Add-VBRTapeMediaPool
Set-VBRTapeMediaPool
VBRTapeMediaPool
Properties
Property Type Description
VBRTapeMediaPoolRetentionTyp The type of the retention period:
Type
e Never, Period, Cyclic.
The retention period unit: None,
Period VBRTapeMediaPooPeriod
Days, Weeks, Months.
Value int32 The value of the retention period.
524 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRTapeMediaSetCreationPolicy
This object contains the set of rules for creating media sets.
Created by
New-VBRTapeMediaSetCreationPolicy
Passed to
Add-VBRTapeMediaPool
Set-VBRTapeMediaPool
VBRTapeMediaPool
Properties
Property Type Description
The type of the media set
VBRTapeMediaPoolRetentionTyp
Type creation schedule: Never, Always,
e
Daily, Monthly.
DailyOptions VBRDailyOptions The daily schedule settings.
525 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRTapeMedium
This object contains tape.
Created by
None
Passed to
Start-VBRTapeCatalog
Start-VBRTapeInventory
Add-VBRTapeMediaPool
Enable-VBRTapeProtection
Disable-VBRTapeProtection
Eject-VBRTapeMedium
Erase-VBRTapeMedium
Export-VBRTapeMedium
Get-VBRTapeMedium
Move-VBRTapeMedium
Set-VBRTapeMedium
VBRTapeDrive
VBRTapeMediaPool
VBRTapeVault
Properties
The "?" mark indicates that the type property accepts zero values.
Property Type Description
Barcode string Tape barcode.
Capacity int64 Tape capacity (in bytes).
Description string Tape description.
Tape expiration date. Tape
ExpirationDate DateTime? expires when all backup sets
written to it expires.
Free int64 Tape free capacity (in bytes).
HasBarcode bool Indicates if the tape has barcode.
Id GUID Unique tape identifier.
Indicates if the tape is expired
IsExpired bool
and can be rewritten.
Indicates if the tape is marked as
IsFree bool
free.
IsFull bool Indicates if the tape is full.
526 | Veeam Backup PowerShell |REFERENCE| REV 2
Property Type Description
Indicates if the tape is locked in
IsLocked bool
drive, for example, by a tape job.
Indicates if the tape is retired:
tapes are retired when they
IsRetired bool
achieve maximum rewrite time or
has mechanical breakdowns.
Date and time of last write
LastWriteTime DateTime?
session.
Unique identifier of the tape
LibraryId GUID
library to which the tape belongs.
Tape current location: ID and
Location VBRTapeMediumLocation address of drive, ID and address
of library slot, ID of vault.
Unique identifier of the media
MediaPoolId GUID
pool to which the tape belongs.
Media set to which the tape
MediaSet VBRTapeMediaSet
belongs.
Name string Tape name.
Unique identifier of the library to
PreviousLibraryId GUID?
which the tape belongs.
Unique identifier of the library to
PreviousMediaPoolId GUID?
which the tape belongs.
Indicates if the tape is hardware
ProtectedByHardware bool
protected.
Indicates if the tape is software
ProtectedBySoftware bool
protected.
Sequence number of the tape in
SequenceNumber int?
media set.
527 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRTapeServer
This object contains a tape server.
Created by
Add-VBRTapeServer
Passed to
Rescan-VBREntity
Get-VBRTapeLibrary
Get-VBRTapeServer
Remove-VBRTapeServer
Set-VBRTapeServer
Properties
Property Type Description
Unique identifier of the tape
Id GUID
server.
Name string Tape server name.
Description string Tape server description.
Unique identifier of the server to
ServerId GUID which the tape server role is
assigned.
IsAvailable bool Tape server availability attribute.
528 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRTapeVault
This object contains a tape vault.
Created by
Add-VBRTapeVault
Passed to
Add-VBRTapeMediaPool
Set-VBRTapeMediaPool
Get-VBRTapeMedium
Move-VBRTapeMedium
Get-VBRTapeVault
Remove-VBRTapeVault
Set-VBRTapeVault
VBRTapeMediaPool
Properties
Property Type Description
Unique identifier of the tape
Id GUID
vault.
Name string Tape vault name.
Description string Tape vault description.
Location of the physical storage
Location string
that the vault is mirroring.
Medium VBRTapeMedium[] Tapes stored in the vault.
529 | Veeam Backup PowerShell |REFERENCE| REV 2
vCloud Director
Veeam Backup & Replication allows you to back up VMs managed by VMware vCloud Director.
Veeam PowerShell provides all means to add the vCloud Director server to your console and manage
back up and recovery of the VMs.
Add vCloud Director entities to your Veeam Backup & Replication console and administrate backup
and recovery.
Operation VMware Hyper-V
Add and remove vCloud Director servers:
Adds a vCloud Director server Add-VBRvCloud —
Adds vCenter Server managed by
Add-VBRvCloudVC —
vCloud Director
Removes a vCloud server Remove-VBRServer —
Look for vCloud infrastructure objects:
Looks for any kinds of vCloud objects Find-VBRvCloudEntity —
Backup and restore vCloud objects:
Creates a vCloud backup job Add-VBRvCloudJob —
Creates a vCloud backup copy job Add-VBRvCloudBackupCopyJob —
Starts instant recovery of a vCloud VM Start-VBRvCloudInstantRecovery —
Creates an object with a set of restore
parameters for a vApp restore (run New-VBRvCloudVAppRestoreSettings —
Start-VBRvCloudRestoreVApp to apply)
Restores vCloud vApp Start-VBRvCloudRestoreVApp —
Restores a vCloud VM Start-VBRvCloudRestoreVm —
530 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRvCloud
Short Description
Adds a vCloud Director server to Veeam Backup & Replication.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRvCloud [-Name] <string> [-User] <string> [-Password]
<string> [-Url <string>] [-Description
<string>][<CommonParameters>]
-OR-
Add-VBRvCloud [-Name] <string> -Credentials <CCredentials> [-Url
<string>] [-Description <string>][<CommonParameters>]
Related Commands
Get-VBRCredentials
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
credentials. This cmdlet provides syntax for both scenarios accordingly.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the full DNS name or IP
address of the vCloud Director
Name True 0 False False
server or any cell in the vCloud
Director infrastructure.
Specifies the user name you want
to use for authenticating with the
vCloud Director server.
User True 1 False False
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.
Password True 2 False False
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Credentials Specifies the credentials you want True Named False False
to use for authenticating with the
531 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
vCloud Director server.
If you use the Credentials scenario,
the -User and -Password
parameters must be omitted.
Specifies the URL you want to
Url connect to the vCloud Director False Named False False
Web API with.
Specifies the description of the
new vCloud Director server. If not
set, the user name who created
Description False Named False False
the server and the date and time
of creation will be added by
default.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command creates a new server named "vCloudDirectorServer" having the
https://vclouddirectorserver:443 URL address. The username is "Administrator" and the password is
"password".
Add-VBRvCloud -Name "vCloudDirectorServer" -User Administrator -
Password password -Url https://vclouddirectorserver:443 -
Description "vCloud Director Server"
Example 2
This command creates a new server named "vCloudDirectorServer" 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 "vCloudDirectorServer" -Credentials
$Administrator -Url https://vclouddirectorserver:443
532 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRvCloudBackupCopyJob
Short Description
Creates a vCloud backup copy job.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRvCloudBackupCopyJob [-Name <String>] [-Entity <IItem[]>]
[-Backup <CBackup[]>] [-BackupJob <CBackupJob[]>][-Repository
<CBackupRepository>] -SourceAccelerator <CWanAccelerator> -
TargetAccelerator <CWanAccelerator> [-Description <String>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Add-VBRvCloudBackupCopyJob [-Name <String>] [-Entity <IItem[]>]
[-Backup <CBackup[]>] [-BackupJob <CBackupJob[]>][-Repository
<CBackupRepository>] -DirectOperation [-Description <String>] [-
WarningAction <ActionPreference>][-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRBackup
Get-VBRJob
Get-VBRBackupRepository
Get-VBRWANAccelerator
Detailed Description
This cmdlet creates a new vCloud backup copy job.
The backup copy job is copying backup files from the source backup repository to the target backup
repository. The backup copy job runs continuously synchronizing the backup repositories in user-
defined time periods.
The cmdlet provides two scenarios that can be used for on-site and off-site modes:
• To transfer the data efficiently to to the off-site location, you can use the WAN accelerator
technology. WAN accelerator is a backup infrastructure component that optimizes file
transfer via WAN by means of data deduplication. The role of a WAN accelerator can be
assigned to a dedicated Windows-based machine (physical or virtual). You should always use
a pair of WAN accelerators set on 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. WAN optimization is available
only in Veeam Backup & Replication Enterprise Plus Edition.
• 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.
533 | Veeam Backup PowerShell |REFERENCE| REV 2
Note that the backup copy job is created in disabled state. Run Enable-VBRJob to start the job running
on the defined schedule.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you want to
assign to the backup copy job.
Name False Named False False
You can input string up to 255
symbols.
Specifies the VM(s) you want to True
copy. (ByValue,
Entity False Named False
You can assign multiple VMs to ByProperty
this object. Name)
Specifies the existing backup
from where the VMs to copy are True
derived. (ByValue,
Backup False Named False
ByProperty
You can assign multiple backups Name)
to this object.
Specifies the existing backup job
from where the VMs to copy are True
derived. (ByValue,
BackupJob False Named False
ByProperty
You can assign multiple backup Name)
jobs to this object.
Specifies the target backup
repository to where you want to
copy the VM data.
Repository False Named False False
If not set, Veeam Backup &
Replication will use the default
backup repository.
Specifies the WAN accelerator
on the source side.
Source If you select the mode using True Named False False
Accelerator WAN accelerators, the -
DirectOperation parameter
should be omitted.
Specifies the WAN accelerator
on the target side.
Target If you select the mode using True Named False False
Accelerator WAN accelerators, the -
DirectOperation parameter
should be omitted.
Specifies the description of the
backup copy job.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Direct Enables the direst operation False Named False False
Operation method sending the data
534 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
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.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command creates a backup copy job named "vCloud CopyJob1" with the following parameters:
• The source and target WAN accelerators are obtained with Get-VBRWANAccelerator and
assigned to $wansource and $wantarget variables accordingly beforehand,
• The VMs to copy are obtained with Find-VBRvCloudEntity and assigned to the $vms variable
beforehand,
• The repository to where the VM data will be copied is obtained with Get-
VBRBackupRepository and assigned to the $repository variable beforehand.
Add-VBRvCloudBackupCopyJob -SourceAccelerator $wansource -
TargetAccelerator $wantarget -Name CopyJob1 -Entity $vms -
Repository $repository
Example 2
This command creates a direct backup copy job with the following parameters:
• The name of the job is "DC CopyJob",
• The backup job named "DC Backup" with the VMs to be copied is obtained with Get-
VBRBackup and piped down,
• The -Repository parameter is not set to copy the VMs to the default backup repository.
Get-VBRBackup -Name "DC Backup" | Add-VBRvCloudBackupCopyJob -
DirectOperation -Name "DC CopyJob"
535 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRvCloudJob
Short Description
Creates a vCloud Director backup job.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRvCloudJob -Entity <IItem[]> [-Name <string>] [-
BackupRepository <CBackupRepository>] [-Description <string>]
[<CommonParameters>]
Related Commands
Find-VBRvCloudEntity
Get-VBRBackupRepository
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.
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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the VM(s) you want to
backup.
Entity True Named True False
You can assign multiple VMs to
this object.
Specifies the name you want to
Name False Named False False
assign to the backup job.
Specifies the backup repository
object where the backup files will
Backup be stored. If not set, the files will
False Named False False
Repository be stored in Veeam Backup &
Replication default backup
repository.
536 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the description of the
Description False Named False False
new backup job.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 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 obtained with Find-VBRvCloudEntity and piped down.
• 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"
537 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRvCloudVC
Short Description
Adds vCenter Server managed by vCloud Director to Veeam Backup & Replication.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRvCloudVC [-vCloudServer] <CHost> [-VCInfo] <CVcdVcInfo> [-
User] <string> [-Password] <string> [-Name <string>] [-Port
<int>] [-Description <string>] [<CommonParameters>]
-OR-
Add-VBRvCloudVC [-vCloudServer] <CHost> [-VCInfo] <CVcdVcInfo> -
Credentials <CCredentials> [-Name <string>] [-Port <int>] [-
Description <string>] [<CommonParameters>]
Related Commands
Get-VBRServer
Find-VBRvCloudEntity ([-Vc])
Get-VBRCredentials
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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the vCloud server
(ByValue,
vCloudServer you want to connect a vCenter True 0 False
ByProperty
to.
Name)
Specifies the vCenter server
VCInfo you want to connect to the True 1 False False
vCloud.
Specifies the user name you
want to use for authenticating
with the vCenter server.
User True 2 False False
If you use the
Username/Password scenario,
the -Credentials parameter
538 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
must be omitted.
Specifies the password you
want to use for authenticating
with the vCenter server.
Password If you use the True 3 False False
Username/Password scenario,
the -Credentials parameter
must be omitted.
Specifies the credentials you
want to use for authenticating
with the vCenter server.
Credentials If you use the Credentials True Named False False
scenario, the -User and -
Password parameters must be
omitted.
Specifies the DNS name or IP
Name address of the vCenter server False Named False False
you want to connect.
Specifies the web-service port
number. If not set, the default
port number 443 will be used.
Port IMPORTANT: When you False Named False False
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
Description the username of the user who False Named False False
created the record and date
and time of creation will be
used.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
539 | Veeam Backup PowerShell |REFERENCE| REV 2
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 new vCenter server is obtained with Find-VBRvCloudEntity ([-Vc]) and assigned to $vc
variable beforehand.
• The username is "Administrator" and the password is "Password".
• The new vCenter name is "vCenter Server 1".
• The -Port parameter is not set to enable the default 443 web-service port number.
• The -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 new vCenter server is obtained with Find-VBRvCloudEntity ([-Vc]) and assigned to $vc
variable beforehand.
• 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
540 | Veeam Backup PowerShell |REFERENCE| REV 2
Find-VBRvCloudEntity
Short Description
Looks for vCloud Director entities.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Find-VBRvCloudEntity [-Server <CHost[]>][-Full][-Name <string[]>]
[<CommonParameters>]
Find-VBRvCloudEntity [-Server <CHost[]>][-VApp][-Name <string[]>]
[<CommonParameters>]
Find-VBRvCloudEntity [-Server <CHost[]>][-Template][-Name
<string[]>] [<CommonParameters>]
Find-VBRvCloudEntity [-Server <CHost[]>][-VmTemplate][-Name
<string[]>] [<CommonParameters>]
Find-VBRvCloudEntity [-Server <CHost[]>][-OrganizationVdc][-Name
<string[]>] [<CommonParameters>]
Find-VBRvCloudEntity [-Server <CHost[]>][-StorageProfile][-Name
<string[]>] [<CommonParameters>]
Find-VBRvCloudEntity [-Server <CHost[]>][-Datastore][-Name
<string[]>] [<CommonParameters>]
Find-VBRvCloudEntity [-Server <CHost[]>][-Vc][-Name <string[]>]
[<CommonParameters>]
Related Commands
Get-VBRServer
Detailed Description
This cmdlet looks for a certain entity of vCloud Director.
You can get the whole list of vCloud entities, or the list of specified entities (i.e. vApps), or narrow
down the output by filtering by name.
Return Type
CVcdSystemItem
CVcdOrganizationItem
CVcdOrganizationVdcItem
CVcdVappItem
CVcdVmItem
CVcdOrgVdcStorageProfile
CVcdDatastoreRestoreInfo
CVcdVcInfo
541 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the server(s) where
the entity to look for is True
located. (ByValue,
Server False Named False
ByProperty
You can assign multiple Name)
servers to this object.
View results as the list of all
Full False Named False False
vCloud entities.
VApp View results as vApps. False Named False False
View results as vApp
Template False Named False False
templates.
View results as VM
VmTemplate False Named False False
templates.
Organization View results as Organization
False Named False False
Vdc vDCs.
View results as storage
StorageProfile False Named False False
profiles.
Datastore View results as datastores. False Named False False
Vc View results as vClouds. False Named False False
Specifies the name(s) of the
entity.
Name You can specify multiple False Named False True
names separated by
commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
542 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for all vCloud entities registered on the server represented by $server variable.
The server object is obtained with Get-VBRServer and assigned to the variable beforehand.
Find-VBRvCloudEntity -Server $server -Full
Example 2
This command looks for the vCloud entities registered on the server with 172.16.1.13 IP address. The
server object is obtained with Get-VBRServer and piped down. The output is filtered by name
containing "SQL".
Get-VBRServer -Name "172.16.1.13" | Find-VBRvCloudEntity -Name
*SQL*
Example 3
This command looks for the vApps registered on the server named "vCloud Server". The server object
is obtained with Get-VBRServer and piped down.
Get-VBRServer -Name "vCloud Server" | Find-VBRvCloudEntity -VApp
Example 4
This command looks for the datastore named "Datastore 04" registered on the server represented by
$server variable. The server object is obtained with Get-VBRServer and assigned to the variable
beforehand.
Find-VBRvCloudEntity -Server $server -Datastore -Name "Datastore
04"
543 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRvCloudVAppRestoreSettings
Short Description
Creates a set of vApp restore parameters.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
New-VBRvCloudVAppRestoreSettings [-RestorePoint] <COib> [-
vAppName <String>] [-OrgVdc <IVcdItem>] [-PowerUp] [-Reason
<String>] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Find-VBRvCloudEntity ([-OrganizationVdc])
Detailed Description
This cmdlet is an assistant command creating a CVcdVAppRestoreSettings object that is further
used in the 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.
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.
544 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the restore point of
(ByValue,
RestorePoint the vApp you want to restore True 1 False
ByProperty
the vApp to.
Name)
Specifies the name of the
restored vApp. Use this
vAppName parameter in case you want to False Named False False
restore the vApp with different
name.
Specifies the Organization vDC
you want to restore the vApp
OrgVdc to. If not set, the vApp will be False Named False False
restored to the original
Organization vDC.
If set to True, the vApp will be
powered up right after it is
PowerUp restored. Otherwise, you will False Named False False
need to power up the vApp
manually.
Specifies the reason for
performing restore of the
selected vApp.
Reason The information you provide False Named False False
will be saved in the session
history so that you can
reference it later.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
545 | Veeam Backup PowerShell |REFERENCE| REV 2
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 restore point is
obtained with Get-VBRRestorePoint and assigned to the variable beforehand.
• The $vdc variable contains the Organization vDC object where the vApp will be restored. The
vDC object is obtained with Find-VBRvCloudEntity ([-OrganizationVdc]) and assigned to the
variable beforehand.
• 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 in the
Start-VBRvCloudRestoreVApp cmdlet.
546 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRvCloudInstantRecovery
Short Description
Starts a vCloud VM instant recovery.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRvCloudInstantRecovery [-RestorePoint] <COib> [-vApp
<CVcdVappItem>] [-VmName <String>] [-Datastore
<CVcdDatastoreRestoreInfo>] [-PowerOn] [-Reason <String>] [-
RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Find-VBRvCloudEntity
Detailed Description
This cmdlet performs instant recovery of the selected vCloud 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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the restore point of (ByValue,
RestorePoint True 1 False
the VM. ByProperty
Name)
Specifies the vApp you want to
restore the VM to. If omitted,
vApp False Named False False
the VM will be restored to the
original vApp.
Specifies the name under
which the VM should be
restored and registered. By
default, the original name of
VmName the VM is used. If you are False Named False False
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
547 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
the VM name to avoid conflicts.
Specifies the datastore you
want to connect the restored
VM to. If ommited, the VM will
be connected to the original
datastore.
Datastore Note: If you restore the VM to False Named False False
another vApp, make sure that
the datastore is available in the
Organization VCD hosting the
vApp to which the VM is
restored.
If set, the VM will be powered
up right after it is restored.
PowerOn False Named False False
Otherwise you will need to
power up the VM manually.
Specifies the reason for
performing restore of the
selected VM.
Reason The information you provide False Named False False
will be saved in the session
history so that you can
reference it later.
Indicates that the command
returns immediately without
RunAsync False Named False False
waiting for the task to
complete.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
548 | Veeam Backup PowerShell |REFERENCE| REV 2
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 obtained with Get-VBRRestorePoint and assigned to
the $rpoint variable beforehand.
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 obtained with Get-VBRRestorePoint and piped down. The most resent
restore point is selected with Select method,
• The VM is restored to a new vApp represented by the $vapp variable, the vApp is obtained
with Find-VBRvCloudEntity ([-VApp] option) and assigned to the variable beforehand,
• 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
datastore is obtained with Find-VBRDatastore and assigned to the variable beforehand,
• 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
549 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRvCloudRestoreVApp
Short Description
Starts a vApp restore.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRvCloudRestoreVApp [-RestoreParams]
<CVcdVAppRestoreSettings> [-PowerUp][-Reason <string>][-
RunAsync][<CommonParameters>]
-OR-
Start-VBRvCloudRestoreVApp [-RestorePoint] <COib> [-PowerUp] [-
Reason <string>][-RunAsync][<CommonParameters>]
Related Commands
New-VBRvCloudVAppRestoreSettings
Get-VBRRestorePoint
Detailed Description
This cmdlet starts a restore session for 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 & Replication gets all the information needed for restore from the restore point
data.
To run restore to another location or with different settings you need to first create a
CVcdVAppRestoreSettings object which unifies all the settings options required for restore. The
CVcdVAppRestoreSettings object is created with the help of the New-
VBRvCloudVAppRestoreSettings cmdlet. See the New-VBRvCloudVAppRestoreSettings topic for
detailed instructions for advanced setup options.
This cmdlet provides two scenarios for each case.
550 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the
True
CVcdVAppRestoreSettings
(ByValue,
RestoreParams object containing all settings True 1 False
ByProperty
required for the vApp
Name)
restore.
Specifies the restore point of
the vApp. Used to restore
RestorePoint False Named False False
vApp with all the same
settings unchanged.
If set, the vApp will be
powered up right after it is
PowerUp restored. Otherwise you will False Named False False
need to power up the vApp
manually.
Specifies the reason for
performing restore of the
selected vApp.
Reason The information you provide False Named False False
will be saved in the session
history so that you can
reference it later.
Indicates that the command
returns immediately without
RunAsync False Named False False
waiting for the task to
complete.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
551 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command starts a vApp restore. The vApp named "vApp_01" is restored to the original location
and with all settings unchanged. The vApp restore point is obtained with Get-VBRRestorePoint and
assigned to the $restorepoint variable beforehand.
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 restore the vApp to another organization, you need to first customize the
CVcdVAppRestoreSettings object The CVcdVAppRestoreSettings object is obtained with New-
VBRvCloudVAppRestoreSettings:
The restore point of the vApp is obtained with Get-VBRRestorePoint by selecting the vApp named
"vApp_01" from the backup objects using the Where method. The restore point is piped down to the
New-VBRvCloudVAppRestoreSettings cmdlet. The obtained CVcdVAppRestoreSettings object is
assigned to the $restoreparams variable.
$restoreparams=Get-VBRRestorePoint -Backup $backup | Where
{$_.Name -eq "vApp_01"} | New-VBRvCloudVAppRestoreSettings
Further you need to change the organization in the CVcdVAppRestoreSettings object:
The Org.Vdc property of the $restoreparams variable is changed to the target organization named
"Org_02". The needed organization is obtained with Find-VBRvCloudEntity ([-OrganizationVdc]
option).
$restoreparams.OrgVdc=Find-VBRvCloudEntity -OrganizationVdc -Name
"Org_02"
Now you need to run Start-VBRvCloudRestoreVApp with the customized $restoreparams variable. The
RunAcync parameter is set to bring the process to the background:
Start-VBRvCloudRestoreVApp -RestoreParams $restoreparams -
RunAsync
552 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRvCloudRestoreVm
Short Description
Starts a vCloud VM restore.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRvCloudRestoreVm [-RestorePoint] <COib> [-vApp
<CVcdVappItem>] [-StorageProfile <CVcdOrgVdcStorageProfile>] [-
vCloudDatastore <CVcdDatastoreRestoreInfo>] [-VmTemplate
<IVcdItem>] [-VMName <String>] [-PowerUp] [-Reason <String>] [-
RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Find-VBRvCloudEntity
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 & Replication 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.
553 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the restore point of
the VM. If you specify no other
parameters of the VM, it will be True
restored with its initial settings, (ByValue,
RestorePoint i.e. the datastore or VM True 1 False
ByProperty
template. Name)
A multiple VMs object is not
valid in this cmdlet.
Specifies the vApp where to
vApp False Named False False
you want to restore the VM.
Specifies the storage profile
Storage
you want to apply to the False Named False False
Profile
restored VM.
Specifies the datastore you
vCloud
want to use with the restored False Named False False
Datastore
VM.
Specifies the template you
VmTemplate want to apply to the restored False Named False False
VM.
Specifies the VM name you
VMName want to apply to the restored False Named False False
VM.
If set, the VM will be powered
up right after it is restored.
PowerUp False Named False False
Otherwise you will need to
power up the VM manually.
Specifies the reason for
performing restore of the
selected VM.
Reason The information you provide False Named False False
will be saved in the session
history so that you can
reference it later.
Indicates that the command
returns immediately without
RunAsync False Named False False
waiting for the task to
complete.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
554 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command starts a vCloud VM restore. The VM is restored to the original location and with all
settings unchanged.
All the information needed for restore is taken from the restore point represented by the
$restorepoint variable. The restore point object is obtained with Get-VBRRestorePoint and assigned to
the variable beforehand.
Start-VBRvCloudRestoreVm -RestorePoint $restorepoint
Example 2
This command restores a VM to another vApp and with another storage profile.
• The VM to restore and the restore point to which it should be restored is represented by the
$restorepoint variable. The restore point object is obtained with Get-VBRRestorePoint and
assigned to the variable beforehand,
• The vApp object to where the VM will be restored is represented by the $vapp variable. The
vApp object is obtained with Find-VBRvCloudEntity ([-VApp] option) and assigned to the
variable beforehand.
• The storage profile object that will be applied to the restored VM is represented by the
$profile variable. The storage profile object is obtained with Find-VBRvCloudEntity ([-
StorageProfile] option) and assigned to the variable beforehand.
Start-VBRvCloudRestoreVm -RestorePoint $restorepoint -vApp $vapp
-StorageProfile $profile
555 | Veeam Backup PowerShell |REFERENCE| REV 2
Veeam Cloud Connect
With Veeam Backup & Replication, you can use the Veeam Cloud Connect to backup your data to
cloud repositories.
You can perform all Cloud Connect administration operations from your command line.
Create the Cloud Connect infrastructure in your Veeam Backup & Replication console.
You will need the following groups of cmdlets:
Performing operations as a cloud provider: deploy the Cloud Connect infrastructure and manage
user accounts.
Performing operations as a cloud user: add cloud providers to Veeam backup console and route
your backup jobs to the cloud repositories.
See also:
Cloud Connect objects
Note that operations with Veeam Cloud Connect requires a cloud provider license.
As a cloud service provider:
Operation VMware Hyper-V
Create and manage cloud gateways:
Creates a cloud gateway Add-VBRCloudGateway Add-VBRCloudGateway
Looks for existing cloud
Get-VBRCloudGateway Get-VBRCloudGateway
gateways
Modifies a cloud gateway Set-VBRCloudGateway Set-VBRCloudGateway
Removes a cloud gateway Remove-VBRCloudGateway Remove-VBRCloudGateway
Enables a cloud gateway Enable-VBRCloudGateway Enable-VBRCloudGateway
Disables a cloud gateway Disable-VBRCloudGateway Disable-VBRCloudGateway
Create and manage cloud user accounts:
Creates settings for a cloud
New-VBRCloudTenantResource New-VBRCloudTenantResource
user account
Modifies cloud user account
Set-VBRCloudTenantResource Set-VBRCloudTenantResource
settings
Creates a cloud user account Add-VBRCloudTenant Add-VBRCloudTenant
Looks for existing cloud user
Get-VBRCloudTenant Get-VBRCloudTenant
accounts
Modifies a cloud user account Set-VBRCloudTenant Set-VBRCloudTenant
Removes a cloud user account Remove-VBRCloudTenant Remove-VBRCloudTenant
Enables a cloud user account Enable-VBRCloudTenant Enable-VBRCloudTenant
Disables a cloud user account Disable-VBRCloudTenant Disable-VBRCloudTenant
Resets a cloud user account
Reset-VBRCloudTenant Reset-VBRCloudTenant
license
556 | Veeam Backup PowerShell |REFERENCE| REV 2
As a cloud user:
Operation VMware Hyper-V
Add and manage cloud providers:
Adds a cloud provider Add-VBRCloudProvider Add-VBRCloudProvider
Looks for existing cloud providers Get-VBRCloudProvider Get-VBRCloudProvider
Modifies a cloud provider Set-VBRCloudProvider Set-VBRCloudProvider
Removes a cloud provider Remove-VBRCloudProvider Remove-VBRCloudProvider
Cloud Connect Objects
Veeam PowerShell uses the following objects to manage the operations with Cloud Connect:
Object Description
VBRCloudGateway Contains cloud gateway
VBRCloudProvider Contains cloud provider
VBRCloudProviderResource Contains cloud provider resources
VBRCloudTenant Contains cloud user
VBRCloudTenantResource Contains cloud user resources
557 | Veeam Backup PowerShell |REFERENCE| REV 2
Configuring Cloud Connect Infrastructure as a Service Provider
As a service provider, you need to set up a cloud connect backup infrastructure and set user accounts.
To do this, you need to perform the following steps:
1. Create a cloud gateway with Add-VBRCloudGateway. To do this, you need to assign the cloud
gateway role to a Microsoft Windows server or to the Veeam backup server itself.
2. [Optional] Configure a target WAN accelerator by running Add-VBRWANAccelerator.
3. Create user accounts:
a. Run New-VBRCloudTenantResource to create a VBRCloudTenantResource object containing
user quota.
b. Pass this object to Add-VBRCloudTenant to create a cloud user account and apply the quota
to it.
The following example demonstrates how to configure a cloud gateway and two user accounts. The
cloud gateway is connected directly to the Internet. The user accounts use a common WAN
accelerator and backup repository and have different quotas.
// Create cloud gateway:
PS C:\PS> $server = Get-VBRServer -Type Windows -Name
"WinServer01"
PS C:\PS> Add-VBRCloudGateway -Server $server -Description
"Omega cloud gateway" -IpAddress "104.45.95.227" -IncomingPort
6260 -NetworkMode Direct
// Create a WAN accelerator:
PS C:\PS> Get-VBRLocalhost | Add-VBRWANAccelerator -
Description "Omega Cloud WAN" -CachePath "c:\WAN" -CacheSize
100 -CacheSizeUnit GB
// Set cloud user account quotas. You will need a backup repository and a WAN
accelerator.
PS C:\PS> $repo = Get-VBRBackupRepository -Name "Omega
Repository"
PS C:\PS> $wan = Get-VBRWANAccelerator -Name "Omega Cloud WAN"
PS C:\PS> $golden = New-VBRCloudTenantResource -Repository
$repo -RepositoryFriendlyName "Golden Tier Repository 01" -
Quota 100 -EnableWanAccelerator -WanAccelerator $wan
PS C:\PS> $standard = New-VBRCloudTenantResource -Repository
$repo -RepositoryFriendlyName "Standard Tier Repository 01" -
Quota 10 -EnableWanAccelerator -WanAccelerator $wan
// Create the user accounts:
PS C:\PS> Add-VBRCloudTenant -Name "ABC Company" -Description
"Golden tier account for ABC company" -EnableLeaseExpiration -
LeaseExpirationDate "12/30/2018" -Password "Pass111" -
Resources $golden
PS C:\PS> Add-VBRCloudTenant -Name "XYZ Company" -Description
"Standard tier account for XYZ company" -EnableLeaseExpiration
-LeaseExpirationDate "12/30/2015" -Password "Pass222" -
Resources $standard
558 | Veeam Backup PowerShell |REFERENCE| REV 2
Configuring Cloud Connect Infrastructure as a User
If you are a Veeam cloud connect user, you need to set up the Cloud Connect infrastructure in the
user's side to back up your data to the cloud repositories.
To do this, run Add-VBRCloudProvider to add cloud service providers to your Veeam backup console.
You will need the address of the cloud gateway configured by the service provider. Also you can
optionally use SSL certificate verification.
The following example shows how to add a service provider using the SSL certificate:
// Add service provider:
PS C:\PS> $credentials = Get-VBRCredentials -Name "SP
credentials"
PS C:\PS> Add-VBRCloudProvider -Address "104.45.95.227" -
Description "Cloud gateway for SP" -Port 6252 -
VerifyCertificate -CertificateThumbprint "e6 c0 e5 1a db 73 0c
13 b3 c3 74 d4 ee 93 ab d0 08 3f 7a a8"
559 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRCloudGateway
Short Description
Creates a new cloud gateway.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Add-VBRCloudGateway [-Description <String>] [-Server <CHost>] [-
IpAddress <IPAddress>] [-IncomingPort <Int32>] [-NATPort <Int32>]
[-NetworkMode <VBRGatewayNetworkMode>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRServer
Return Type
VBRCloudGateway
Detailed Description
This cmdlet creates a cloud gateway.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the description of the
cloud gateway.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Specifies server that will perform
the role of a cloud gateway. You
can select any server added to
Veeam Backup & Replication on
assign the cloud gateway role to
Server the Veeam backup server itself. False Named False False
Accepts CHost object.
Accepted server types: Windows,
Local.
Default: Local.
IpAddress Specifies an external IP address of False Named False False
the NAT or network interface
560 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
gateway.
Accepts IPAddress object or string
type.
Specifies a port that will be used
by the Veeam backup server to
connect to the gateway.
Incoming
Accepts int type. False Named False False
Port
Permitted values: 1 to 65535.
Default: 6180.
Specifies a port on the NAT
gateway used for listening to
connections from users and
passing cloud commands from
users to the SP Veeam backup
NATPort server. False Named False False
Accepts int type.
Permitted values: 1 to 65535.
Default: (for Direct) null, (for NAT)
8080.
Network Specifies network mode: Direct,
False Named False False
Mode NAT.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
561 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command adds a new cloud gateway with a direct network connection.
• The server that will be used as the cloud gateway is obtained with Get-VBRServer and
assigned to the '$server' variable beforehand.
• The external network gateway IP is 104.45.95.227.
• The port that will be used by Veeam Backup & Replication to connect to the gateway server is
'6260'.
• The network mode is set to 'Direct'.
Add-VBRCloudGateway -Server $server -Description "Gateway
directly connected to Internet" -IpAddress 104.45.85.123 -
IncomingPort 6260 -NetworkMode Direct
Example 2
This command adds a new cloud gateway in the local network behind the NAT gateway.
• The server that will be used as the cloud gateway is obtained with Get-VBRServer and
assigned to the '$server' variable beforehand.
• The external NAT gateway IP is 104.45.95.227.
• The port that will be used by Veeam Backup & Replication to connect to the gateway server is
'6180'.
• The port that will be used by the NAT gateway is '7180'.
• The network mode is set to 'NAT'.
Add-VBRCloudGateway -Server $server -Description "Gateway behind
NAT" -IpAddress 104.45.95.227 -IncomingPort 6180 -NATPort 7180 -
NetworkMode NAT
562 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRCloudProvider
Short Description
Adds a new service provider.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Add-VBRCloudProvider -Address <String> [-Description <String>] [-
Port <Int32>] -Credentials <CCredentials> [-VerifyCertificate] [-
CertificateThumbprint <String>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-
Confirm] [<CommonParameters>]
Related Commands
Get-VBRCredentials
Return Type
VBRCloudProvider
Detailed Description
This cmdlet adds a new service provider to Veeam Backup & Replication.
You can add several providers using one cloud gateway to your Veeam backup console. The providers'
credentials must have different user names.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies a full DNS name or IP
address of the cloud gateway
Address configured on the service True Named False False
provider side.
Accepts string type.
Specifies the description of the
service provider.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Specifies the port over which
user’s Veeam backup server will
Port communicate with the cloud False Named False False
gateway.
Accepts int type.
563 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Permitted values: 1 to 65535.
Default: 6180.
Specifies credentials for the user
account registered on the service
Credentials provider Veeam backup server. True Named False False
Accepts CCredentials object.
Indicates if the SSL certificate
must be verified by the
thumbprints.
Verify
Use the CertificateTumbprint False Named False False
Certificate
parameter to set the thumbprint
that will be compared to the SSL
certificate thumbprint.
Specifies the thumbprint that will
Certificate be compared to the SSL certificate
thumbprint. False Named False False
Thumbprint
Accepts string type.
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the cmdlet False Named False False
without actually performing any
action.
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm False Named False False
user is sure that they want to
continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
564 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command adds a cloud service provider to Veeam Backup & Replication using default settings.
• The service provider IP address is '172.16.12.45'.
• The credentials record to authenticate with the user account is obtained with Get-
VBRCredentials and assigned to the '$credentials' variable beforehand.
Add-VBRCloudProvider -Address "172.16.12.45" -Credentials
$credentials
Example 2
This command adds a cloud service provider. A custom port is used for connection and the SSL
certificate thumbprint verification is enabled for the service provider.
• The service provider IP address is '104.45.95.227'.
• The description is "Cloud gateway for SP".
• The port that will be used for enabling connection between the user's Veeam backup server
and the cloud gateway is set to '6252'.
• The credentials used to authenticate with the service provider is obtained with Get-
VBRCredentials and assigned to the '$credentials' variable beforehand.
• The VerifyCertificate parameter is used to enable the SSL certificate verification with
thumbprints. The thumbprint is 'e6 c0 e5 1a db 73 0c 13 b3 c3 74 d4 ee 93 ab d0 08 3f 7a a8'.
Add-VBRCloudProvider -Address "104.45.95.227" -Description "Cloud
gateway for SP" -Port 6252 -Credentials $credentials -
VerifyCertificate -CertificateThumbprint "e6 c0 e5 1a db 73 0c 13
b3 c3 74 d4 ee 93 ab d0 08 3f 7a a8"
565 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRCloudTenant
Short Description
Creates a new cloud user account.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Add-VBRCloudTenant -Name <String> [-Description <String>] [-
EnableLeaseExpiration] [-LeaseExpirationDate <DateTime>] -
Password <String> -Resources <VBRCloudTenantResource[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
New-VBRCloudTenantResource
Return Type
VBRCloudTenant
Detailed Description
This cmdlet creates a new cloud user account.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name you want to
assign to the user account.
Accepts string type.
The user name must meet the
following requirements:
• The maximum length of
the user name is 128
characters. It is
Name recommended that you True Named False False
create short user names
to avoid problems with
long paths to backup
files on the cloud
repository.
• The user name may
contain space
characters.
• The user name must not
contain the following
566 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
characters: \/:*?\"<>|=; as
well as Unicode
characters.
• The user name must not
end with the period
character [.].
Specifies the description of the
user account.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Indicates that the user account
Enable must use lease expiration settings.
Lease Use LeaseExpirationDate False Named False False
Expiration parameter to set the lease
expiration date.
Used to specify the lease
expiration date for the
EnableLeaseExpiration
Lease
parameter.
Expiration False Named False False
Date Accepts DateTime structure.
Default: 23:59:59.9999999,
31.12.9999.
Specifies the password you want
Password to set to the user account. True Named False False
Accepts string type.
Specifies the resources settings for
the created user account.
Accepts the
VBRCloudTenantResource object.
You can assign multiple resources
Resources settings to this object. True Named False False
NOTE: When you assign multiple
resources settings to one user
account, the resources must have
unique Repository Friendly Names
and they must use different
repositories.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
567 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command adds a user account with lease expiration settings enabled.
• The user name is "ABC Company" and the description is the "User account for ABC company".
• The EnableLeaseExpiration parameter is used to enable the lease expiration settings. The
lease expiration date is set to 12.30.2015.
• The password is set to "pass123".
• The resources settings object is created with New-VBRCloudTenantResource and assigned to
the '$resources1' variable beforehand.
Add-VBRCloudTenant -Name "ABC Company" -Description "User account
for ABC company" -EnableLeaseExpiration -LeaseExpirationDate
"12/30/2015" -Password pass123 -Resources $resources1
Example 2
This command adds a user account without lease expiration settings.
• The user name is "ABC Company" and the description is the "User account for ABC company".
• The password is set to "pass123".
• The resources settings object is created with New-VBRCloudTenantResource and assigned to
the '$resources2' variable beforehand.
Add-VBRCloudTenant -Name "ABC Company" -Description "User account
for ABC company" -Password pass123 -Resources $resources2
568 | Veeam Backup PowerShell |REFERENCE| REV 2
Disable-VBRCloudGateway
Short Description
Disables a cloud gateway.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Disable-VBRCloudGateway -CloudGateway <VBRCloudGateway[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRCloudGateway
Return Type
VBRCloudGateway
Detailed Description
This cmdlet disables a selected cloud gateway. Disabling a gateway temporarily suspends all
operations on it. Run Enable-VBRCloudGateway to enable a disabled cloud gateway.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies a cloud
gateway you want to
disable. True (by Value
FromPipeline,
Cloud Accepts ValueFromPipeline
True Named False
Gateway VBRCloudGateway ByPropertyName)
object.
or False
You can assign multiple
gateways to this object.
Specifies whether the
cmdlet writes a message
that describes the
WhatIf False Named False False
effects of running the
cmdlet without actually
performing any action.
Specifies whether the
cmdlet displays a
Confirm prompt that asks if the False Named False False
user is sure that they
want to continue.
569 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command disables a cloud gateway represented by the '$cloudgateway' variable.
The cloud gateway is obtained with Get-VBRCloudGateway and assigned to the variable beforehand.
Disable-VBRCloudGateway -CloudGateway $cloudgateway
Example 2
This command disables a cloud gateway with the 172.16.12.45 IP address.
The cloud gateway is obtained with Get-VBRCloudGateway and piped down.
Get-VBRCloudGateway -Name "172.16.12.45" | Disable-
VBRCloudGatewaya
570 | Veeam Backup PowerShell |REFERENCE| REV 2
Disable-VBRCloudTenant
Short Description
Disables a cloud user account.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Disable-VBRCloudTenant -CloudTenant <VBRCloudTenant[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRCloudTenant
Return Type
None
Detailed Description
This cmdlet disables a cloud user account. Disabling a user account temporarily prevents the user
from using their account recourses. Run Enable-VBRCloudTenant to enable a disabled account.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the user
account you want to
disable. True (by Value
Cloud FromPipeline,
Accepts True Named False
Tenant ValueFromPipeline
VBRCloudTenant object.
ByPropertyName)
You can assign multiple
accounts to this object.
Specifies whether the
cmdlet writes a
message that describes
WhatIf the effects of running False Named False False
the cmdlet without
actually performing any
action.
Specifies whether the
cmdlet displays a
Confirm prompt that asks if the False Named False False
user is sure that they
want to continue.
571 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command disables two cloud user accounts represented by the '$CloudUser1' and '$CloudUser2'
variables.
The cloud user accounts are obtained by Get-VBRCloudTenant and assigned to the variables
beforehand.
Disable-VBRCloudTenant -CloudTenant $CloudUser1, $CloudUser2
Example 2
This command disables the ABC company cloud user account.
The cloud user account is obtained by running Get-VBRCloudTenant and piped down.
Get-VBRCloudTenant -Name "ABC Company" | Disable-VBRCloudTenant
572 | Veeam Backup PowerShell |REFERENCE| REV 2
Enable-VBRCloudGateway
Short Description
Enables a disabled cloud gateway.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Enable-VBRCloudGateway -CloudGateway <VBRCloudGateway[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRCloudGateway
Return Type
VBRCloudGateway
Detailed Description
This cmdlet enables a selected cloud gateway that was previously disabled.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies a cloud
gateway you want to
enable. True (by Value
FromPipeline,
Cloud Accepts ValueFromPipeline
True Named False
Gateway VBRCloudGateway ByPropertyName)
object.
or False
You can assign multiple
gateways to this object.
Specifies whether the
cmdlet writes a message
that describes the
WhatIf False Named False False
effects of running the
cmdlet without actually
performing any action.
Specifies whether the
cmdlet displays a
Confirm prompt that asks if the False Named False False
user is sure that they
want to continue.
573 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command enables a cloud gateway represented by the '$cloudgateway' variable.
The cloud gateway is obtained with Get-VBRCloudGateway and assigned to the variable beforehand.
Enable-VBRCloudGateway -CloudGateway $cloudgateway
Example 2
This command enables two cloud gateways with the 172.16.12.45 and 172.16.12.46 IP addresses.
The cloud gateways are obtained with Get-VBRCloudGateway and piped down.
Get-VBRCloudGateway -Name "172.16.12.45", "172.16.12.45" |
Enable-VBRCloudGateway
574 | Veeam Backup PowerShell |REFERENCE| REV 2
Enable-VBRCloudTenant
Short Description
Enables disabled cloud user accounts.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Enable-VBRCloudTenant -CloudTenant <VBRCloudTenant[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRCloudTenant
Return Type
None
Detailed Description
This cmdlet enables selected cloud user accounts that were previously disabled.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the user
account you want to
enable. True (by Value
Cloud FromPipeline,
Accepts True Named False
Tenant ValueFromPipeline
VBRCloudTenant object.
ByPropertyName)
You can assign multiple
accounts to this object.
Specifies whether the
cmdlet writes a
message that describes
WhatIf the effects of running False Named False False
the cmdlet without
actually performing any
action.
Specifies whether the
cmdlet displays a
Confirm prompt that asks if the False Named False False
user is sure that they
want to continue.
575 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command enables two cloud user accounts represented by the '$CloudUser1' and '$CloudUser2'
variables.
The cloud user accounts are obtained by Get-VBRCloudTenant and assigned to the variables
beforehand.
Enable-VBRCloudTenant -CloudTenant $CloudUser1, $CloudUser2
Example 2
This command enables the ABC company cloud user account.
The cloud user account is obtained by running Get-VBRCloudTenant and piped down.
Get-VBRCloudTenant -Name "ABC Company" | Enable-VBRCloudTenant
576 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRCloudGateway
Short Description
Returns cloud gateways.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Get-VBRCloudGateway [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Get-VBRCloudGateway [-Id <Guid[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Get-VBRCloudGateway [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
None
Return Type
VBRCloudGateway[]
Detailed Description
This cmdlet returns the list of existing cloud gateways.
You can get the list of all existing cloud gateways or search for instances directly by name or ID. This
cmdlet provides syntax for three scenarios accordingly.
577 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the ID of the
VBRCloudGateway
object you want to get. True (by Value
FromPipeline,
Id Accepts GUID or string False Named False
ValueFromPipeline
type.
ByPropertyName)
You can assign multiple
IDs to this object.
Specifies the name of
the cloud gateway you True (by Value
want to get or search FromPipeline,
Name conditions. False Named True
ValueFromPipeline
You can assign multiple ByPropertyName)
names to this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command returns all cloud gateways configured in Veeam Backup & Replication.
Get-VBRCloudGateway
Example 2
This command gets the cloud gateway with the 172.16.12.45 IP address.
Get-VBRCloudGateway -Name "172.16.12.45"
578 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRCloudProvider
Short Description
Returns service providers.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Get-VBRCloudProvider [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Get-VBRCloudProvider [-Id <Guid[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Get-VBRCloudProvider [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
None
Return Type
VBRCloudProvider[]
Detailed Description
This cmdlet returns the list of service providers added to Veeam Backup & Replication.
You can get the list of all existing service providers or search for instances directly by name or ID.
579 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the ID of the
VBRCloudProvider
object you want to get. True (by Value
FromPipeline,
Id Accepts GUID or string False Named False
ValueFromPipeline
type.
ByPropertyName)
You can assign multiple
IDs to this object.
Specifies the name of
the service provider you True (by Value
want to get or search FromPipeline,
Name conditions. False Named True
ValueFromPipeline
You can assign multiple ByPropertyName)
names to this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for all cloud service providers added to Veeam Backup & Replication.
Get-VBRCloudProvider
Example 2
This command looks for the cloud service provider with the 104.45.95.227 IP address.
Get-VBRCloudProvider -Name "104.45.95.227"
580 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRCloudTenant
Short Description
Returns cloud user accounts.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Get-VBRCloudTenant [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
-OR-
Get-VBRCloudTenant [-Id <Guid[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Get-VBRCloudTenant [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Get-VBRCloudTenant [-Repository <CBackupRepository[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRBackupRepository
Return Type
VBRCloudTenant[]
Detailed Description
This cmdlet returns the list of cloud user accounts.
You can get the list of all existing user accounts, search for instances directly by name or ID or get loud
users accounts using a particular backup repository. Use an appropriate scenario for each case.
581 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the ID of the
VBRCloudTenant object
you want to get. True (by Value
FromPipeline,
Id Accepts GUID or string False Named False
ValueFromPipeline
type.
ByPropertyName)
You can assign multiple
IDs to this object.
Specifies the name of
the user account you True (by Value
want to get or search FromPipeline,
Name conditions. False Named False
ValueFromPipeline
You can assign multiple ByPropertyName)
names to this object.
Specifies the backup
repository for which
you want to get the
user account.
True (by Value
Accepts FromPipeline,
Repository False Named False
CBackupRepository ValueFromPipeline
object. ByPropertyName)
You can assign multiple
repositories to this
object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for all cloud user accounts.
Get-VBRCloudTenant
Example 2
This command looks for the ABC company cloud user account by name.
Get-VBRCloudTenant -Name "ABC Company"
Example 3
This command looks for the cloud user accounts using the 'Backups Vol2' backup repository.
The backup repository is obtained with Get-VBRBackupRepository and piped down.
Get-VBRBackupRepository -Name "Backups Vol2" | Get-VBRCloudTenant
582 | Veeam Backup PowerShell |REFERENCE| REV 2
New-VBRCloudTenantResource
Short Description
Creates a new VBRCloudTenantResource object containing cloud resources settings.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
New-VBRCloudTenantResource -Repository <CBackupRepository> -
RepositoryFriendlyName <String> -Quota <Int32> [-
EnableWanAccelerator] [-WanAccelerator <CWanAccelerator>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRBackupRepository
Get-VBRWANAccelerator
Return Type
VBRCloudTenantResource
Detailed Description
This cmdlet creates a new VBRCloudTenantResource object. This object contains the cloud resources
settings and is used further to apply these settings to a cloud user account.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies a backup repository in
your backup infrastructure whose
space resources must be allocated
to the user.
Repository True Named False False
Accepts CBackupRepository
object.
You cannot use cloud repositories.
Specifies a friendly name for the
cloud repository you want to
Repository present to the user. The name you
Friendly enter will be displayed in the list of True Named False False
Name backup repositories at user’s side.
Accepts string type.
Quota Specifies the amount of space you True Named False False
want to allocate to the user on the
583 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
selected backup repository.
Permitted value: 1 to 2097151
(GB).
Indicates that the backup jobs can
use WAN accelerators for
Enable transferring data to cloud
Wan repositories. False Named False False
Accelerator Use the WanAccelerator
parameter to set the WAN
accelerator.
Specifies the WAN accelerator for
Wan the EnableWanAccelerator
parameter. False Named False False
Accelerator
Accepts CWanAccelerator object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command creates an object containing a 10 GB repository quota. The created object is assigned
to the '$standard1' variable.
• The backup repository from which the cloud resources will be allocated is obtained with Get-
VBRBackupRepository and assigned to the '$repo1' variable.
• The cloud repository is named 'Standard Tier Repository'.
• The user quota is set to 10 GB.
$standard1 = New-VBRCloudTenantResource -Repository $repo1 -
RepositoryFriendlyName "Standard Tier Repository" -Quota 10
Example 2
This command creates an object containing a 100 GB repository quota. The WAN acceleration is
allowed. The created object is assigned to the '$golden2' variable.
• The backup repository from which the cloud resources will be allocated is obtained with Get-
VBRBackupRepository and assigned to the '$repo2' variable.
• The cloud repository is named 'Golden Tier Repository'.
• The user quota is set to 100 GB.
• The EnableWanAcceleration parameter is used to enable using WAN acceleration for data
transfer. The WAN accelerator that will be used is obtained with Get-VBRWANAccelerator and
assigned to the '$wan' variable beforehand.
$golden2 = New-VBRCloudTenantResource -Repository $repo2 -
RepositoryFriendlyName "Golden Tier Repository" -Quota 100 -
EnableWanAccelerator -WanAccelerator $wan
584 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRCloudGateway
Short Description
Removes a selected cloud gateway.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Remove-VBRCloudGateway -CloudGateway <VBRCloudGateway[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRCloudGateway
Return Type
None
Detailed Description
This cmdlet removes a selected cloud gateway from Veeam Backup & Replication console.
When you remove a cloud gateway, Veeam Backup & Replication unassigns the gateway role from the
server, so it is no longer used as a cloud gateway. The actual server remains connected to Veeam
Backup & Replication.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the cloud
gateway you want to
remove. True (by Value
FromPipeline,
Cloud Accepts ValueFromPipeline
True Named False
Gateway VBRCloudGateway ByPropertyName)
object.
or False
You can assign multiple
gateways to this object.
Specifies whether the
cmdlet writes a message
that describes the
WhatIf False Named False False
effects of running the
cmdlet without actually
performing any action.
Confirm Specifies whether the False Named False False
cmdlet displays a
585 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
prompt that asks if the
user is sure that they
want to continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes a cloud gateway represented by the '$cloudgateway' variable.
The cloud gateway is obtained with Get-VBRCloudGateway and assigned to the variable beforehand.
Remove-VBRCloudGateway -CloudGateway $cloudgateway
Example 2
This command removes a cloud gateway with the 172.16.12.45 IP address.
The cloud gateway is obtained with Get-VBRCloudGateway and piped down.
Get-VBRCloudGateway -Name "172.16.12.45" | Remove-VBRCloudGateway
586 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRCloudProvider
Short Description
Removes service provider.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Remove-VBRCloudProvider -CloudProvider <VBRCloudProvider[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRCloudProvider
Return Type
None
Detailed Description
This cmdlet removes service provider from Veeam Backup & Replication.
When you remove a service provider, you become unable to reach your cloud repository. The data
stored on the cloud repository remains. You can access it if you add the service provider to the Veeam
backup console again.
Important! You cannot remove a service provider if its cloud repositories are used by any backup jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the cloud
provider you want to
remove.
True (by Value
Accepts
Cloud FromPipeline,
VBRCloudProvider True Named False
Provider ValueFromPipeline
object.
ByPropertyName)
You can assign multiple
service providers to this
object.
Specifies whether the
cmdlet writes a message
WhatIf that describes the False Named False False
effects of running the
cmdlet without actually
587 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
performing any action.
Specifies whether the
cmdlet displays a
Confirm prompt that asks if the False Named False False
user is sure that they
want to continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes all cloud service providers added to Veeam Backup & Replication.
The service providers are obtained by Get-VBRCloudProvider and piped down.
Get-VBRCloudProvider | Remove-VBRCloudProvider
Example 2
This command removes a service provider represented by the '$CloudProvider1' variable.
The service provider is obtained by Get-VBRCloudProvider and assigned to the variable beforehand.
Remove-VBRCloudProvider -CloudProvider $CloudProvider1
Example 3
This command removes the service provider with the 104.45.95.227 IP address.
The service provider is obtained by Get-VBRCloudProvider and piped down.
Get-VBRCloudProvider -Name "104.45.95.227" | Remove-
VBRCloudProvider
588 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRCloudTenant
Short Description
Removes cloud user account.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Remove-VBRCloudTenant -CloudTenant <VBRCloudTenant[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRCloudTenant
Return Type
None
Detailed Description
This cmdlet removes a selected cloud user account from Veeam Backup & Replication.
The user account is removed permanently. The service provider cannot undo this operation.
When you remove a cloud user account that was using WAN accelerators, the WAN accelerators' cache
is cleared automatically.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the user
accounts you want to
remove. True (by Value
Cloud FromPipeline,
Accepts True Named False
Tenant ValueFromPipeline
VBRCloudTenant object.
ByPropertyName)
You can assign multiple
accounts to this object.
Specifies whether the
cmdlet writes a
message that describes
WhatIf the effects of running False Named False False
the cmdlet without
actually performing any
action.
Confirm Specifies whether the False Named False False
cmdlet displays a
589 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
prompt that asks if the
user is sure that they
want to continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes all cloud user profiles registered in Veeam Backup & Replication.
Get-VBRCloudTenant
Example 2
This command removes two cloud user accounts represented by the '$CloudUser1' and '$CloudUser2'
variables.
The cloud user accounts are obtained by Get-VBRCloudTenant and assigned to the variables
beforehand.
Remove-VBRCloudTenant -CloudTenant $CloudUser1, $CloudUser2
Example 3
This command removes the ABC company cloud user account.
The cloud user account is obtained by running Get-VBRCloudTenant and piped down.
Get-VBRCloudTenant -Name "ABC Company" | Remove-VBRCloudTenant
Example 4
This command removes all cloud user accounts using the 'Backup Vol2' backup repository.
The backup repository is obtained by Get-VBRBackupRepository and piped down to Get-
VBRCloudTenant. The obtained cloud user account are piped down to Remove-VBRCloudTenant.
Get-VBRBackupRepository -Name "Backups Vol2" | Get-VBRCloudTenant
| Remove-VBRCloudTenant
590 | Veeam Backup PowerShell |REFERENCE| REV 2
Reset-VBRCloudTenant
Short Description
Resets cloud account user license.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Reset-VBRCloudTenant -CloudTenant <VBRCloudTenant[]> [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRCloudTenant
Return Type
None
Detailed Description
This cmdlet resets cloud account user license.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the user
accounts for which you
want to reset the user
True (by Value
license.
Cloud FromPipeline,
True Named False
Tenant Accepts ValueFromPipeline
VBRCloudTenant object. ByPropertyName)
You can assign multiple
accounts to this object.
Specifies whether the
cmdlet writes a
message that describes
WhatIf the effects of running False Named False False
the cmdlet without
actually performing any
action.
Specifies whether the
cmdlet displays a
Confirm prompt that asks if the False Named False False
user is sure that they
want to continue.
591 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command resets licenses for two cloud user accounts represented by the '$CloudUser1' and
'$CloudUser2' variables.
The cloud user accounts are obtained by Get-VBRCloudTenant and assigned to the variables
beforehand.
Reset-VBRCloudTenant -CloudTenant $CloudUser1, $CloudUser2
Example 2
This command resets the ABC company license.
The cloud user account is obtained by running Get-VBRCloudTenant and piped down.
Get-VBRCloudTenant -Name "ABC Company" | Reset-VBRCloudTenant
592 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRCloudGateway
Short Description
Modifies cloud gateway.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Set-VBRCloudGateway -CloudGateway <VBRCloudGateway> [-Description
<String>] [-IpAddress <String>] [-IncomingPort <Int32>] [-NATPort
<Int32>] [-PassThru] [-NetworkMode <VBRGatewayNetworkMode>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
links to related references
Return Type
Get-VBRCloudGateway
Detailed Description
This cmdlet modifies existing cloud gateway. To modify settings, you need to enter the corresponding
parameters with new values. The parameters that you omit will remain unchanged.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the cloud
gateway you want to True (by Value
Cloud modify. FromPipeline,
True Named False
Gateway Accepts ValueFromPipeline
VBRCloudGateway ByPropertyName)
object.
Specifies the description
of the cloud gateway.
Description If not set, Veeam Backup False Named False False
& Replication will enter
date and time of
creation by default.
Specifies an external IP
address of the NAT or
Ip
network interface False Named False False
Address
gateway.
Accepts IPAddress
593 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
object or string type.
Specifies a port that will
be used by the Veeam
backup server to
connect to the gateway.
Incoming
Accepts int type. False Named False False
Port
Permitted values: 1 to
65535.
Default: 6180.
Specifies a port on the
NAT gateway used for
listening to connections
from users and passing
cloud commands from
users to the SP Veeam
NAT backup server. False Named False False
Port
Accepts int type.
Permitted values: 1 to
65535.
Default: (for Direct) null,
(for NAT) 8080.
Network Specifies network mode:
False Named False False
Mode Direct, NAT.
Indicates that the
command returns the
PassThru output object to the False Named False False
Windows PowerShell
console.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
594 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command sets a new port for the cloud gateway to connect to Veeam Backup & Replication.
• The cloud gateway is obtained by Get-VBRCloudGateway and assigned to the
'$cloudgateway' variable beforehand.
• The new port number is set to '9012'.
Set-VBRCloudGateway -CloudGateway $cloudgateway -IncomingPort
9012
Example 2
This command sets a new cloud gateway IP address and port to connect to Veeam Backup &
Replication.
• The cloud gateway is obtained by Get-VBRCloudGateway and piped down.
• The IP address is set to '172.16.10.20' and the port is set to '8062'.
Get-VBRCloudGateway | Set-VBRCloudGateway -IpAddress 172.16.10.20
-IncomingPort 8062
595 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRCloudProvider
Short Description
Modifies service provider.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Set-VBRCloudProvider [-Address <String>] [-Description <String>]
[-Port <Int32>] [-Credentials <CCredentials>] [-PassThru] [-
VerifyCertificate] [-CertificateThumbprint <String>] -
CloudProvider <VBRCloudProvider> [-WarningAction
<ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-
Confirm] [<CommonParameters>]
Related Commands
Get-VBRCredentials
Get-VBRCloudProvider
Return Type
VBRCloudProvider
Detailed Description
This cmdlet modifies service provider added to Veeam Backup & Replication. To modify settings, you
need to enter the corresponding parameters with new values. The parameters that you omit will
remain unchanged.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies a full DNS
name or IP address of
the cloud gateway
Address configured on the False Named False False
service provider side.
Accepts string type.
Specifies the description
of the service provider.
Description If not set, Veeam Backup False Named False False
& Replication will enter
date and time of
creation by default.
Port Specifies the port over False Named False False
which user’s Veeam
596 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
backup server will
communicate with the
cloud gateway.
Accepts int type.
Permitted values: 1 to
65535.
Default: 6180.
Specifies credentials for
the user account
registered on the
Credentials service provider Veeam False Named False False
backup server.
Accepts CCredentials
object.
Indicates that the
command returns the
PassThru output object to the False Named False False
Windows PowerShell
console.
Indicates if the SSL
certificate must be
verified by the
thumbprints.
Verify Use the False Named False False
Certificate CertificateTumbprint
parameter to set the
thumbprint that will be
compared to the SSL
certificate thumbprint.
Specifies the
thumbprint that will be
Certificate compared to the SSL False Named False False
Thumbprint certificate thumbprint.
Accepts string type.
Specifies the service
provider you want to True (by Value
Cloud modify. FromPipeline,
True Named False
Provider Accepts ValueFromPipeline
VBRCloudProvider ByPropertyName)
object.
Specifies whether the
cmdlet writes a message
that describes the
WhatIf False Named False False
effects of running the
cmdlet without actually
performing any action.
Specifies whether the
Confirm cmdlet displays a False Named False False
prompt that asks if the
user is sure that they
597 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
want to continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command enables the SSL certificate verification for a service provider represented by the
'$CloudProvider1' variable.
• The service provider is obtained with Get-VBRCloudProvider and assigned to the
'$CloudProvider1' variable beforehand.
• The VerifyCertificate parameter is used to enable the SSL certificate verification with
thumbprints. The thumbprint is 'e6 c0 e5 1a db 73 0c 13 b3 c3 74 d4 ee 93 ab d0 08 3f 7a a8'.
Set-VBRCloudProvider -CloudProvider $CloudProvider1 -
VerifyCertificate -CertificateThumbprint "e6 c0 e5 1a db 73 0c 13
b3 c3 74 d4 ee 93 ab d0 08 3f 7a a8"
Example 2
This command sets the cloud gateway port to the default value.
• The service provider is obtained with Get-VBRCloudProvider and piped down.
• The Port parameter is set to '6180'.
Get-VBRCloudProvider -Name "104.45.95.227" | Set-VBRCloudProvider
-Port 6180
598 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRCloudTenant
Short Description
Modifies cloud user account settings.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Requires a cloud provider license.
Syntax
Set-VBRCloudTenant -CloudTenant <VBRCloudTenant> [-Name <String>]
[-Description <String>] [-EnableLeaseExpiration] [-
LeaseExpirationDate <DateTime>] [-Password <String>] [-Resources
<VBRCloudTenantResource[]>] [-PassThru] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRCloudTenant
New-VBRCloudTenantResource
Return Type
VBRCloudTenant
Detailed Description
This cmdlet modifies user account settings.
To modify settings, you need to enter the corresponding parameters with new values. The parameters
that you omit will remain unchanged.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True (by Value
Cloud Specifies the user account FromPipeline,
True Named False
Tenant you want to modify. ValueFromPipeline
ByPropertyName)
Specifies the name you
want to assign to the user
account.
Accepts string type.
Name False Named False False
The user name must meet
the following
requirements:
• The maximum
length of the
599 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
user name is 128
characters. It is
recommended
that you create
short user
names to avoid
problems with
long paths to
backup files on
the cloud
repository.
• The user name
may contain
space
characters.
• The user name
must not
contain the
following
characters:
\/:*?\"<>|=; as
well as Unicode
characters.
• The user name
must not end
with the period
character [.].
Specifies the description
of the user account.
Description If not set, Veeam Backup False Named False False
& Replication will enter
date and time of creation
by default.
Indicates that the user
account must use lease
Enable
expiration settings. Use
Lease False Named False False
LeaseExpirationDate
Expiration
parameter to set the lease
expiration date.
Used to specify the lease
expiration date for the
EnableLeaseExpiration
parameter.
Lease
Expiration Accepts DateTime False Named False False
Date structure.
Default:
23:59:59.9999999,
31.12.9999.
Specifies the password
you want to set to the
Password user account. False Named False False
Accepts string type.
Resources Specifies the resources False Named False False
600 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
settings for the created
user account.
Accepts the
VBRCloudTenantResource
object.
You can assign multiple
resources settings to this
object.
NOTE: When you assign
multiple resources
settings to one user
account, the resources
must have unique
Repository Friendly
Names and they must use
different repositories.
Indicates that the
command returns the
PassThru output object to the False Named False False
Windows PowerShell
console.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
601 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command sets a new password for the cloud user account represented by the '$CloudUser1'
variable.
• The cloud user account is obtained by Get-VBRCloudTenant and assigned to the
'$CloudUser1' variable beforehand.
• The Password parameter is set to a new value.
Set-VBRCloudTenant -CloudTenant $CloudUser1 -Password NewPassword
Example 2
This command disables lease expiration settings for the ABC company user account.
• The cloud user account is obtained by Get-VBRCloudTenant and piped down.
• The EnableLeaseExpiration parameter is set to false to discard the set lease period.
Get-VBRCloudTenant -Name "ABC Company"| Set-VBRCloudTenant -
EnableLeaseExpiration: $false
602 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRCloudTenantResource
Short Description
Modifies cloud account user quota settings.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRCloudTenantResource -CloudTenantResource
<VBRCloudTenantResource> [-Repository <CBackupRepository>] [-
RepositoryFriendlyName <string>] [-Quota <int>] [-
EnableWanAccelerator] [-WanAccelerator <CWanAccelerator>]
[<CommonParameters>]
Related Commands
Get-VBRBackupRepository
Get-VBRWANAccelerator
Return Type
VBRCloudTenantResource
Detailed Description
This cmdlet modifies the VBRCloudTenantResource object containing the quota settings for a selected
cloud account user. To modify settings, you need to enter the corresponding parameters with new
values. The parameters that you omit will remain unchanged.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the cloud account user
quota settings you want to
Cloud modify.
Tenant True Named False False
Resource Accepts
VBRCloudTenantResource
object.
Specifies a backup repository in
your backup infrastructure whose
space resources must be allocated
to the user.
Repository True Named False False
Accepts CBackupRepository
object.
You cannot use cloud repositories.
Specifies a friendly name for the
Repository True Named False False
cloud repository you want to
Friendly
present to the user. The name you
603 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Name enter will be displayed in the list of
backup repositories at user’s side.
Accepts string type.
Specifies the amount of space you
want to allocate to the user on the
Quota selected backup repository. True Named False False
Permitted value: 1 to 2097151
(GB).
Indicates that the backup jobs can
use WAN accelerators for
Enable transferring data to cloud
Wan repositories. False Named False False
Accelerator Use the WanAccelerator
parameter to set the WAN
accelerator.
Specifies the WAN accelerator for
Wan the EnableWanAccelerator
parameter. False Named False False
Accelerator
Accepts CWanAccelerator object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
604 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRCloudGateway
This object contains cloud gateway.
Created by
Add-VBRCloudGateway
Obtained with
Get-VBRCloudGateway
Passed to
Set-VBRCloudGateway
Remove-VBRCloudGateway
Enable-VBRCloudGateway
Disable-VBRCloudGateway
Properties
Property Type Description
The windows server used as the
Host CWinServer
cloud gateway.
The gateway status:
Enabled bool
Enabled/Disabled.
The port on the NAT gateway
used for listening to connections
NATPort int from users and passing cloud
commands from users to the SP
Veeam backup server.
The port used by the Veeam
IncomingPort int backup server to connect to the
gateway.
The external IP address of the
IPAddress string NAT or network interface
gateway.
NetworkMode VBRGatewayNetworkMode The network mode: Direct, NAT.
The unique cloud gateway
Id GUID
identifier.
Name string The cloud gateway name.
Description string The cloud gateway description.
605 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRCloudProvider
This object contains cloud provider.
Created by
Add-VBRCloudProvider
Obtained with
Get-VBRCloudProvider
Passed to
Set-VBRCloudProvider
Remove-VBRCloudProvider
Rescan-VBREntity
Properties
Property Type Description
The IP address of the cloud
IpAddress IPAddress gateway configured on the
service provider side.
DNSName The DNS name of the cloud
string gateway configured on the
service provider side.
The port over which user’s
Port Veeam backup server
int
communicates with the cloud
gateway.
The credentials for the user
Credentials CCredentials account registered on the service
provider Veeam backup server.
The SSL certificate used by the
Certificate X509Cretificate2
cloud provider.
The backup repositories
Resources VBRCloudProviderResource[] associated with the cloud
provider.
The unique identifier of the cloud
Id GUID
provider.
The description of the cloud
Description string
provider.
606 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRCloudProviderResource
This object contains cloud provider settings.
Created by
None
Passed to
VBRCloudProvider
VBRCloudTenant
Properties
Property Type Description
The name of the cloud repository
RepositoryName string
presented to the user.
RepositoryAllocatedSpace int The repository quota.
The WAN accelerator state:
WanAcceleratorEnabled bool
True/False.
607 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRCloudTenant
This object contains the cloud user account.
Created by
Add-VBRCloudTenant
Obtained with
Get-VBRCloudTenant
Passed to
Set-VBRCloudTenant
Remove-VBRCloudTenant
Enable-VBRCloudTenant
Disable-VBRCloudTenant
Reset-VBRCloudTenant
Properties
Property Type Description
The state of the user account:
Enabled bool
(enabled) True/False.
Indicates if the user account uses
LeaseExpirationEnabled bool lease expiration settings:
True/False.
The date and time of the lease
LeaseExpirationDate DateTime?
expiration.
Password string The user account password.
Resources VBRCloudTenantResource[] The user account quota.
The number of VMs in the user
VMCount int
repository.
The date and time of the last
LastActive string
user's activity.
The result of the last session:
LastResult string
None, Success, Warning, Failed.
The unique user account
Id GUID
identifier.
Name string The user account name.
Description string The user account description.
608 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRCloudTenantResource
This object contains the cloud user account quota settings.
Created by
New-VBRCloudTenantResource
Passed to
Add-VBRCloudTenant
Get-VBRCloudTenant
Set-VBRCloudTenant
Properties
Property Type Description
The backup repository whose
Repository CBackupRepository space resources are allocated to
the user.
The name of the cloud repository
RepositoryFriendlyName string
presented to the user.
RepositoryQuota string The user account quota (MB).
RepositoryQuotaPath string The backup repository path.
The space used by the user
UsedSpace int
account (MB).
The space used by the user
UsedSpacePercentage int
account.
The state of the WAN accelerator:
WanAccelerationEnabled bool
(enabled) True/False.
The WAN accelerator used by the
WanAccelerator CWanAccelerator
user account.
609 | Veeam Backup PowerShell |REFERENCE| REV 2
Credentials
In Veeam Backup & Replication, you can centrally create and maintain a list of credentials records that
you plan to use to connect to components in the backup infrastructure.
Veeam PowerShell lets you create the following types of credentials records:
• Microsoft Windows credentials record
• Linux credentials record (user name and password)
• Linux credentials record (Identity/Pubkey)
Create and manage credentials records in your Veeam Backup & Replication console.
Operation VMware Hyper-V
Creates a new credentials record Add-VBRCredentials Add-VBRCredentials
Looks for credentials records managed
Get-VBRCredentials Get-VBRCredentials
with your console
Removes a credentials record Remove-VBRCredentials Remove-VBRCredentials
Edits a credentials record Set-VBRCredentials Set-VBRCredentials
610 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRCredentials
Short Description
Creates a credentials record.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBRCredentials -User <String> -Password <String> [-
Description <String>] [-Type <VBRCredentialsType>] [-SshPort
<Int32>] [-ElevateToRoot] [-AddToSudoers] [-RootPassword
<String>] [-PrivateKeyPath <String>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Add-VBRCredentials [-Description <String>] -Credential
<PSCredential> [-Type <VBRCredentialsType>] [-SshPort <Int32>] [-
ElevateToRoot] [-AddToSudoers] [-RootPassword <String>] [-
PrivateKeyPath <String>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRCredentials
Detailed Description
This cmdlet creates a new credentials record for authenticating with the instances of your virtual
infrastructure. You can add Windows or Linux credentials records including authentication using the
Identity/Pubkey method.
You can add a new credentials record by indicating strings for user name and password (unprotected
mode), or by supplying a PSCredential object.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the user name you
want to use for authenticating
with the instances of your
virtual infrastructure.
User True Named False False
Note that you should use
DOMAIN\USERNAME
usernames format for all hosts
except ESX/ESXi hosts.
Specifies the password you
Password want to use for authenticating True Named False False
with the instances of your
611 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
virtual infrastructure.
Specifies the description for
the credentials record. This
parameter in non-mandatory,
Description although it is recommended False Named False False
to input this value to make the
credential records easily
identified.
Specifies the credentials you
Credential False Named False False
want to add.
Specifies the credentials type:
Type Linux, Windows, LinuxPubKey. False Named False False
Default: Windows.
Used for Identity/Pubkey
authentication method.
Specifies the number of the
SshPort SSH port that you want to use False Named False False
to connect to a Linux server.
Permitted values: 1 to 65535.
Default: 22.
Used for Identity/Pubkey
authentication method.
ElevateToRoot Indicates that non-root users False Named False False
are provided with root
account privileges.
Used for Identity/Pubkey
authentication method.
Indicates that the user
account is added to sudoers
AddToSudoers False Named False False
file.
Default: (if the ElevateToRoot
parameter is set to False)
False.
Used for Identity/Pubkey
authentication method.
RootPassword Indicates that the root False Named False False
password is used for
authentication.
Used for Identity/Pubkey
authentication method.
Specifies the path to the
PrivateKeyPath private key. Use this False Named False False
parameter to specify the
private key for the
LinuxPubKey option of the
Type parameter.
612 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command creates a new Windows credentials record for the administrator.
Add-VBRCredentials -Type Windows -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"
Example 3
This command adds a Linux credentials record for the administrator. The credentials record will use
the 23 SSH port. The root password privileges are given to the user.
Add-VBRCredentials -Type Linux -User Administrator -Password
password -SshPort 23 -ElevateToRoot -AddToSudoers -RootPassword
rootpwd
Example 4
This command adds a Linux Pubkey credentials record for the 'User1'.
Add-VBRCredentials -Type LinuxPubKey -User user1 –Password
password -PrivateKeyPath c:\temp\deneb.ppk
613 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRCredentials
Short Description
Returns credentials records.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRCredentials [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet returns the list of credentials managed by Veeam Backup & Replication.
You can get the list of all credentials or look for instances directly by name.
Return Type
CCredentials
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the user name or search
conditions.
Name False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command gets the list of credentials records containing "Administrator" in the account name.
Get-VBRCredentials -Name *Administrator*
614 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRCredentials
Short Description
Removes a credentials record from Veeam Backup & Replication.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBRCredentials -Credential <CCredentials>
[<CommonParameters>]
Related Commands
Get-VBRCredentials
Detailed Description
This cmdlet permanently removes the selected credentials from the database.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the credentials you (ByValue,
Credential True Named False
want to remove. ByProperty
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command permanently removes the credentials record with name "Administrator". The
credentials object is obtained with Get-VBRCredentials and piped down.
Get-VBRCredentials -Name “Administrator” | Remove-VBRCredentials
Example 2
This command removes the credentials record. The credentials object is obtained with Get-
VBRCredentials and assigned to $c variable beforehand.
Remove-VBRCredentials -Credential $c
615 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBRCredentials
Short Description
Edits credentials records properties.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBRCredentials -Credential <CCredentials> -Password <string>
[<CommonParameters>]
-OR-
Set-VBRCredentials -Credential <CCredentials> -Description
<string> [<CommonParameters>]
Related Commands
Get-VBRCredentials
Detailed Description
This cmdlet allows editing password or description of a selected credentials record. Select the
appropriate syntax for each case.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True (by Value
Specifies the credentials FromPipeline,
Credential True Named False
you want to edit. ValueFromPipeline
ByPropertyName)
Specifies the user name
you want to use for
authenticating with the
instances of your virtual
infrastructure.
User True Named False False
Note that you should
use DOMAIN\USERNAME
usernames format for all
hosts except ESX/ESXi
hosts.
Specifies the password
you want to use for
Password authenticating with the True Named False False
instances of your virtual
infrastructure.
Description Specifies the description False Named False False
for the credentials
616 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
record. This parameter in
non-mandatory,
although it is
recommended to input
this value to make the
credential records easily
identified.
Used for Identity/Pubkey
authentication method.
Specifies the number of
the SSH port that you
SshPort want to use to connect False Named False False
to a Linux server.
Permitted values: 1 to
65535.
Default: 22.
Used for Identity/Pubkey
authentication method.
Elevate
Indicates that non-root False Named False False
ToRoot
users are provided with
root account privileges.
Used for Identity/Pubkey
authentication method.
Indicates that the user
account is added to
AddTo
sudoers file. False Named False False
Sudoers
Default: (if the
ElevateToRoot
parameter is set to False)
False.
Used for Identity/Pubkey
authentication method.
Root
Indicates that the root False Named False False
Password
password is used for
authentication.
Used for Identity/Pubkey
authentication method.
Specifies the path to the
Private private key. Use this False Named False False
KeyPath parameter to specify the
private key for the
LinuxPubKey option of
the Type parameter.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
617 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command sets a new password for the credentials record with name "Administrator". The new
password is "Password_1". The credentials record is obtained with Get-VBRCredentials and piped
down.
Get-VBRCredentials -Name "Administrator" | Set-VBRCredentials -
Password "Password_1"
Example 2
This command sets a new description for the credentials record. The credentials record is obtained
with Get-VBRCredentials and assigned to the variable beforehand.
Set-VBRCredentials -Credential $c -Description "ESXi Host
Credentials"
618 | Veeam Backup PowerShell |REFERENCE| REV 2
Encryption
Encryption is a Veeam Backup & Replication built-in mechanism that helps you protect your data from
unauthorized access, especially if you back up sensitive VM data to offsite locations or archive it to
tape.
Data encryption transforms data to a secure format with the help of a cryptographic algorithm and a
secret key. The secret, or encryption keys, are stored in the Veeam backup database.
Encryption Cmdlets
Create and manage encryption keys.
Operation VMware Hyper-V
Creates an encryption key Add-VBREncryptionKey Add-VBREncryptionKey
Looks for the existing encryption keys Get-VBREncryptionKey Get-VBREncryptionKey
Modifies an encryption key Set-VBREncryptionKey Set-VBREncryptionKey
Removes an encryption key Remove-VBREncryptionKey Remove-VBREncryptionKey
Encryption Objects
Veeam PowerShell uses the following object to manage operations with encryption keys:
Object Description
PSCryptoKey Contains the encryption key.
619 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBREncryptionKey
Short Description
Creates encryption key.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-VBREncryptionKey [-Password] <securestring> [[-Description]
<string>] [<CommonParameters>]
Related Commands
None
Return Type
PSCryptoKey
Detailed Description
This cmdlet creates a new encryption key.
This cmdlet accepts SecureString type. Use Microsoft PowerShell standard capabilities to convert your
password into the SecureString.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies password you
want to use to encrypt True (by Value
data archived to tape. FromPipeline,
Password True 0 False
ValueFromPipeline
Accepts SecureString ByPropertyName)
type.
Specifies description of
the new encryption key
Description that you can further use False 1 False False
to search encryption
keys.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
620 | Veeam Backup PowerShell |REFERENCE| REV 2
Example
This command creates a 'Veeam Administrator' encryption key.
The password is turned into a SecureString by running ConvertTo-SecureString and assigned to the
'$securepassword' variable.
PS C:\PS> $plainpassword = "VeeamPassword"
PS C:\PS> $securepassword = $plainpassword | ConvertTo-
SecureString -AsPlainText -Force
PS C:\PS> Add-VBREncryptionKey -Password $securepassword -
Description "Veeam Administrator"
621 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBREncryptionKey
Short Description
Returns encryption keys.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBREncryptionKey [[-Description] <string>]
[<CommonParameters>]
Related Commands
None
Return Type
PSCryptoKey
Detailed Description
This cmdlet returns the list of encryption keys managed by Veeam Backup & Replication.
You can get the list of media pools within specified library, or search for instances directly by
description.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the description True (by Value
of the encryption key FromPipeline,
Description you want to get. False Named True
ValueFromPipeline
Accepts string type. ByPropertyName)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
622 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for all encryption keys.
Get-VBREncryptionKey
Example 2
This command looks for an encryption key with description 'Veeam Administrator'.
Get-VBREncryptionKey -Description "Veeam Administrator"
623 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBREncryptionKey
Short Description
Removes encryption key.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBREncryptionKey [-EncryptionKey] <PSCryptoKey> [-WhatIf]
[-Confirm] [<CommonParameters>]
Related Commands
Get-VBREncryptionKey
Return Type
None
Detailed Description
This cmdlet removes a selected encryption key.
Important! You cannot remove an encryption key if it is used by any job or set in permissions for repository for
Endpoint jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the encryption key
you want to remove.
EncryptionKey True 0 False False
Accepts PSCryptoKey object or
description (string).
Specifies whether the cmdlet
writes a message that
WhatIf describes the effects of False Named False False
running the cmdlet without
actually performing any action.
Specifies whether the cmdlet
displays a prompt that asks if
Confirm False Named False False
the user is sure that they want
to continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
624 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command removes the 'Veeam Administrator' encryption key.
The encryption key is obtained by running Get-VBREncryptionKey and piped down.
Get-VBREncryptionKey -Description "Veeam Administrator" | Remove-
VBREncryptionKey
Example 2
This command removes the 'Veeam Administrator' encryption key.
The encryption key is obtained by running Get-VBREncryptionKey and assigned to the
'$administratorkey' variable.
Remove-VBREncryptionKey -EncryptionKey $administratorkey
625 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBREncryptionKey
Short Description
Modifies encryption key.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-VBREncryptionKey -EncryptionKey <PSCryptoKey> [-Password
<securestring>] [-Description <string>] [-WhatIf] [-Confirm]
[<CommonParameters>]
Related Commands
Get-VBREncryptionKey
Return Type
PSCryptoKey
Detailed Description
This cmdlet modifies encryption key that was created before. To modify settings, you need to enter
the corresponding parameters with new values. The parameters that you omit will remain unchanged.
This cmdlet accepts SecureString type. Use Microsoft PowerShell standard capabilities to convert your
password into the SecureString.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the encryption
key you want to modify. True (by Value
Encryption FromPipeline,
Accepts PSCryptoKey 0 0 False
Key ValueFromPipeline
object or description ByPropertyName)
(string).
Specifies the new
password you want to
apply to the encryption
Password key. False Named False False
Accepts SecureString
type.
Specifies the new
description you want to
Description False Named False False
apply to the encryption
key.
Specifies whether the
WhatIf cmdlet writes a message False Named False False
that describes the effects
626 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
of running the cmdlet
without actually
performing any action.
Specifies whether the
cmdlet displays a prompt
Confirm that asks if the user is False Named False False
sure that they want to
continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command modifies description of the 'Veeam Administrator' encryption key.
• The encryption key is obtained by running Get-VBREncryptionKey and piped down.
• The new description is set to 'Veeam Tape Backup Administrator'.
Get-VBREncryptionKey -Description "Veeam Administrator" | Set-
VBREncryptionKey -Description "Veeam Tape Backup Administrator"
Example 2
This command sets a new password to the 'Veeam Administrator' encryption key.
• The password is turned into a SecureString by running ConvertTo-SecureString and assigned
to the '$securepassword' variable.
• The encryption key is obtained by running Get-VBREncryptionKey and piped down.
PS C:\PS> $plainpassword = "VeeamPassword"
PS C:\PS> $securepassword = $plainpassword | ConvertTo-
SecureString -AsPlainText -Force
PS C:\PS> Get-VBREncryptionKey -Description "Veeam Administrator"
| Set-VBREncryptionKey -Password $securepassword
627 | Veeam Backup PowerShell |REFERENCE| REV 2
PSCryptoKey
This object contains the encryption key.
Transforms to the VBREncryptionKey object.
Created by
Add-VBREncryptionKey
Obtained with
Get-VBREncryptionKey
Passed to
Set-VBREncryptionKey
Remove-VBREncryptionKey
Set-VBRJobAdvancedStorageOptions
Start-VBRZip
Properties
Property Type Description
Unique identifier of the
Id GUID
encryption key.
Description string Encryption key description.
EncryptedPassword string Password in SecureString format.
ModificationDateUtc DateTime Last modification date and time.
628 | Veeam Backup PowerShell |REFERENCE| REV 2
WAN Acceleration
WAN acceleration allows you to optimize VM traffic going over the WAN during remote jobs. To use
this technology, you need to configure a pair of WAN accelerators that will work at source side and at
target side.
Note that WAN acceleration requires Enterprise Plus product edition.
Add WAN accelerators to your Veeam Backup & Replication console and manage them.
Operation VMware Hyper-V
Creates a WAN accelerator Add-VBRWANAccelerator Add-VBRWANAccelerator
Looks for existing WAN
Get-VBRWANAccelerator Get-VBRWANAccelerator
accelerators
Removes a WAN accelerator Remove-VBRWANAccelerator Remove-VBRWANAccelerator
Removes data from WAN
Clear-VBRWANCache Clear-VBRWANCache
accelerator global cache
629 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBRWANAccelerator
Short Description
Creates a new WAN accelerator.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise Plus
Syntax
Add-VBRWANAccelerator -Server <CHost> [-Description <String>] [-
CachePath <String>] [-CacheSize <UInt32>] [-CacheSizeUnit
<ESizeUnit>] [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Related Commands
Get-VBRServer
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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the server where WAN
True
accelerator will be created. Note
(ByValue,
Server that you can create WAN True Named False
ByProperty
accelerator on Microsoft
Name)
Windows servers only.
Specifies the description of the
Description False Named False False
WAN accelerator.
Specifies the path to the folder
CachePath where WAN accelerator will be False Named False False
created.
Specifies the cache folder
CacheSize capacity value in UInt32 format. False Named False False
Accepted values: 1 to 65535.
Specifies the measure unit for
CacheSize
the cache folder capacity. The False Named False False
Unit
valid values are GB and TB.
630 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command creates a new WAN accelerator on the Veeam backup server:
• The Veeam backup server is obtained with Get-VBRLocalhost and piped down.
• The description of the new WAN accelerator is "WAN Accelerator 01".
• The folder path where the new WAN accelerator will be created is c:\WAN.
• The cache size capacity is set to 100GB.
Get-VBRLocalhost | Add-VBRWANAccelerator -Description "WAN
Accelerator 01" -CachePath "c:\WAN" -CacheSize 100 -CacheSizeUnit
GB
Example 2
This command creates a new WAN accelerator with the following parameters:
• The server where the WAN accelerator will be created is obtained with Get-VBRServer and
assigned to the $server variable beforehand.
• The description of the new WAN accelerator is "WAN Accelerator 02".
• The folder path where the new WAN accelerator will be created is c:\WAN.
• The cache size capacity is set to 150GB.
Add-VBRWANAccelerator -Server $s -Description
BackupWANAccelerator -CachePath "c:\WAN" -CacheSize 150 -
CacheSizeUnit GB
631 | Veeam Backup PowerShell |REFERENCE| REV 2
Clear-VBRWANCache
Short Description
Removes data from WAN accelerator global cache.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise Plus
Syntax
Clear-VBRWANCache -Accelerator <CWanAccelerator> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRWANAccelerator
Detailed Description
This cmdlet clears WAN accelerator global cache.
You may need to clear the global cache in case, i.e., the data gets corrupted.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the WAN accelerator (ByValue,
Accelerator True Named False
you want to clear the cache of. ByProperty
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command clears cache of WAN accelerator named "WAN 01". The accelerator is obtained with
Get-VBRWANAccelerator and piped down.
Get-VBRWANAccelerator -Name "WAN 01" | Clear-VBRWANCache
Example 2
This command clears cache of the WAN accelerator represented by the $"accelerator01" variable. The
accelerator is obtained with Get-VBRWANAccelerator and assigned to the variable beforehand.
Clear-VBRWANCache -Accelerator $"accelerator01"
632 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRWANAccelerator
Short Description
Returns WAN accelerators.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise Plus
Syntax
Get-VBRWANAccelerator [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet gets the list of WAN accelerators managed by Veeam Backup & Replication.
WAN accelerator is an architecture component that optimizes file transfer via WAN by means of data
deduplication. The role of a WAN accelerator can be assigned to a dedicated Windows-based machine
(physical or virtual). For best performance you should set a WAN accelerator on both source and target
sides.
You can get the list of all WAN accelerators, or search for instances directly by name.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name(s) of the WAN
accelerator, or search conditions.
Name False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the 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*
633 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRWANAccelerator
Short Description
Removes a WAN accelerator.
Applies to
Platform: VMware, Hyper-V
Product Edition: Enterprise Plus
Syntax
Remove-VBRWANAccelerator -Accelerator <CWanAccelerator>
[<CommonParameters>]
Related Commands
Get-VBRWANAccelerator
Detailed Description
This cmdlet removes the selected WAN accelerator.
When you remove a WAN accelerator, Veeam Backup & Replication unassigns the accelerator role
from the server, so it is no longer used as a WAN accelerator. The actual server remains connected to
Veeam Backup & Replication.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the WAN accelerator you
Accelerator True Named False False
want to remove.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes the WAN Accelerator named "WANAccelerator 1". The accelerator is obtained
with Get-VBRWANAccelerator and piped down.
Get-VBRWANAccelerator -Name "WANAccelerator 1" | Remove-
VBRWANAccelerator
Example 2
This command removes the WAN accelerator represented by the $a variable. The accelerator is
obtained with Get-VBRWANAccelerator and assigned to the $a variable beforehand.
Remove-VBRWANAccelerator -Accelerator $a
634 | Veeam Backup PowerShell |REFERENCE| REV 2
Backups
Import, export or remove backups.
Operation VMware Hyper-V
Imports backup files to Veeam Backup
Import-VBRBackup Import-VBRBackup
& Replication
Exports backup files to a used-defined
Export-VBRBackup Export-VBRBackup
destination
Looks for created backup files Get-VBRBackup Get-VBRBackup
Removes backup files Remove-VBRBackup Remove-VBRBackup
635 | Veeam Backup PowerShell |REFERENCE| REV 2
Import-VBRBackup
Short Description
Imports backups to Veeam Backup & Replication.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Import-VBRBackup [-Server] <CHost> [-FileName] <String> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRServer
Detailed Description
This cmdlet imports backups to Veeam Backup & Replication.
To import backups from another server, you must have this server added to Veeam backup console.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the target server
(ByValue,
Server where you want to store the True 1 False
ByProperty
imported backups.
Name)
Specifies the path to the backup
FileName True 2 False False
file you want to import.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
636 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command imports the folder with SureBackup files to the server named "Fileserver". The target
server is obtained with Get-VBRServer and piped down. The file path is
ESX17.Veeam.Local\C:\Backups\SureBackups.
Get-VBRServer -Name "Fileserver" | Import-VBRBackup -FileName
"ESX17.Veeam.Local\C:\Backups\SureBackups"
Example 2
This command imports the folder with SureBackup files to the server represented by the $server
variable. The target server is obtained with Get-VBRServer and assigned to the variable beforehand.
The file path is ESX17.Veeam.Local\C:\Backups\SureBackups.
Import-VBRBackup -Server $server -FileName
"ESX17.Veeam.Local\C:\Backups\SureBackups"
637 | Veeam Backup PowerShell |REFERENCE| REV 2
Export-VBRBackup
Short Description
Exports a backup or restore point files to a selected folder.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Export-VBRBackup [-Backup] <CBackup> [-Dir] <String> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Export-VBRBackup [-RestorePoint] <COib> [-Dir] <String> [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRBackup
Get-VBRRestorePoint
Detailed Description
This cmdlet copies a selected backup files to a user-specified directory.
You can copy a whole backup file or select backups for a specific job object. The job objects are VMs,
VM containers, datastores or resource pools.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the backup file you want
Backup True 1 False False
to export.
Specifies the job object (i.e. a VM)
Restore
for which you want to export the True 1 False False
Point
backup files.
Specifies the path to the folder
Dir where you want to copy the files True 2 False False
to.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
638 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command exports the backup file represented by the $"AD backup" to the folder "C:\Export". The
backup file to export is obtained with Get-VBRBackup and assigned to the variable beforehand.
Export-VBRBackup -Backup $"AD backup" -Dir "C:\Export"
Example 2
This command exports the backup file for a specific VM represented by the $"AD_local" to the folder
"C:\Export". The backup file to export is obtained with Get-VBRRestorePoint and assigned to the
variable beforehand.
Export-VBRBackup -RestorePoint $"AD_local" -Dir "C:\Export"
639 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRBackup
Short Description
Returns backups.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRBackup [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet returns the list of backups stored in the Veeam Backup & Replication database.
The cmdlet returns backups that were created by backup jobs, backup copy jobs, vCD jobs and
Endpoint backup jobs.
You can get the list of all backups registered in the database or look for particular backups directly by
name. By default, the backup is named by job name and contain all VMs that are processed by this job.
If the job processes several VMs, the backup contains restore points for all VMs added to the job. Run
Get-VBRRestorePoint to get a restore point for a particular VM.
Return Type
CBackup
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the backup,
backup copy or Endpoint backup
job that produced the backups
Name you want to get, or search False Named False False
conditions.
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
640 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for all backups stored in the database.
Get-VBRBackup
Example 2
This command looks for the backups named "vCloud Webservices Backup" and "Exchange
Backup_imported".
Get-VBRBackup -Name "vCloud Webservices Backup", "Exchange
Backup_imported"
641 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRBackup
Short Description
Removes a selected backup.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBRBackup [-Backup] <CBackup[]> [-FromDisk] [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRBackup
Detailed Description
This cmdlet removes a selected backup.
With this cmdlet, you can remove backups created by all types of jobs: backup jobs, backup copy jobs,
vCD jobs and Endpoint backup jobs.
You can remove the backup file completely from disk, or only delete the backup information from
Veeam Backup & Replication database. This cmdlet provides syntax for both scenarios accordingly.
Important! You should remove backups carefully considering the subsequent backup jobs that may fail to
produce valid backup.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the backup you want True
to remove. (ByValue,
Backup True 1 False
You can assign multiple backups ByProperty
to this object. Name)
If indicated, the backup file will
be permanently removed from
FromDisk disk. Otherwise, only the False Named False False
information about the backup is
deleted from database.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
642 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command removes the backups named "Backup Job 01" and "Backup Job 02" from database only.
The backups are obtained with Get-VBRBackup and piped down.
Get-VBRBackup -Name "Backup Job 01", "Backup Job 02" | Remove-
VBRBackup
Example 2
This command removes the backups with names ending with "2012" from disk. The backups are
obtained with Get-VBRBackup and piped down.
Get-VBRBackup -Name *2012 | Remove-VBRBackup -FromDisk
Example 3
This command removes the backup represented by the $backup variable from disk. The backup is
obtained with Get-VBRBackup and assigned to the variable beforehand.
Remove-VBRBackup $backup -FromDisk
643 | Veeam Backup PowerShell |REFERENCE| REV 2
Restore Points
Look for restore points of your virtual instances and manage them.
Operations VMware Hyper-V
Looks for VM restore points Get-VBRRestorePoint Get-VBRRestorePoint
Looks for files in a restore point Get-VBRFilesInRestorePoint Get-VBRFilesInRestorePoint
Removes a restore point Remove-VBRRestorePoint Remove-VBRRestorePoint
644 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRFilesInRestorePoint
Short Description
Returns files in a selected restore point.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRFilesInRestorePoint [-RestorePoint] <COib> [-Name
<String[]>] [-WarningAction <ActionPreference>] [-WarningVariable
<String>] [<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Detailed Description
This cmdlet returns the list of files in a selected restore point.
With this cmdlet, you can get files in restore points created by all types of jobs: backup jobs, backup
copy jobs, replication jobs, vCD jobs and Endpoint backup jobs (for Endpoint backups, only volume
level backups).
You can get the list of all files in a selected restore point or look for instances directly by name.
Return Type
COIBFileInfo
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the restore points for
(ByValue,
RestorePoint which you want to get the list True 1 False
ByProperty
of files.
Name)
Specifies the name of the
file(s) you want to get, or
Name search conditions. False Named False True
You can specify multiple
names separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
645 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command gets the list of files in the last restore point of the backup named "Webservices
Backup". The restore point is obtained with Get-VBRRestorePoint and piped down.
Get-VBRRestorePoint -Name "Webservices Backup" | Select -Last 1 |
Get-VBRFilesInRestorePoint
Example 2
This command gets the list of files in the restore point represented by the $restorepoint variable. The
restore point is obtained with Get-VBRRestorePoint and assigned to the variable beforehand.
Get-VBRFilesInRestorePoint -RestorePoint $restorepoint
646 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRRestorePoint
Short Description
Returns restore points.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRRestorePoint [[-Backup] <CBackup[]>] [-Name <String[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRBackup
Detailed Description
This cmdlet returns the list of restore points stored in Veeam Backup & Replication database.
With this cmdlet, you can get restore points created by all types of jobs: backup jobs, backup copy
jobs, replication jobs, vCD jobs and Endpoint backup jobs.
You can get the list of restore points of all VMs managed by Veeam Backup & Replication, or get the
restore points for a specific backup or for a specific VM.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the backup for which
you want to get the restore True
points. (ByValue,
Backup False 1 False
ByProperty
You can assign multiple Name)
backups to this object.
Specifies the name of the VM for
which you want to get the
restore points, or search
Name conditions. False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
647 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for all restore points of all VMs registered in the database.
Get-VBRRestorePoint
Example 2
This command looks for the latest restore point of the VM named "MSExchange02" in the backup
named "MSExchange Backup". The backup is obtained with Get-VBRBackup and piped down. The
restore points of the VM are filtered with Sort-Object method by the "CreationTime" property to get
the most recent one.
Get-VBRBackup -Name "MSExchange Backup" | Get-VBRRestorePoint -
Name *MSExchange02* | Sort-Object $_.creationtime -Descending |
Select -First 1
Example 3
This command looks for the restore points of the backup represented by the variable $backup. The
backup to look the restore points in is obtained with Get-VBRBackup and assigned to the variable
beforehand.
Get-VBRRestorePoint -Backup $backup
648 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-VBRRestorePoint
Short Description
Removes a restore point.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-VBRRestorePoint [-Oib] <COib[]> [-Name <String[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>] [-
WhatIf] [-Confirm] [<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Detailed Description
This cmdlet allows you to remove restore points from Veeam Backup & Replication.
With this cmdlet, you can remove restore points created by all types of jobs: backup jobs, backup copy
jobs, replication jobs, vCD jobs and Endpoint backup jobs.
Note that you should remove restore points carefully considering the subsequent jobs that may fail to
produce valid backup.
Important! When you remove any restore point of a replica, it will cause removing of the replica VM from
infrastructure and all its other restore points.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the restore point(s) you True
want to remove. (ByValue,
Oib True 1 False
You can assign multiple restore ByProperty
point to this object. Name)
Specifies the name of the VM
the restore points of which you
want to remove, or search
Name conditions. False Named False True
You can specify multiple names
separated by commas.
Specifies whether the cmdlet
writes a message that describes
WhatIf the effects of running the False Named False False
cmdlet without actually
performing any action.
649 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies whether the cmdlet
displays a prompt that asks if the
Confirm False Named False False
user is sure that they want to
continue.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes the 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
650 | Veeam Backup PowerShell |REFERENCE| REV 2
Sessions
Veeam PowerShell allows you to view particular jobs sessions.
Sessions Cmdlets
Get specific job sessions and look which tasks it contains.
Operations VMware Hyper-V
Manage backup, replication and backup copy sessions:
Looks for VM backup sessions Get-VBRBackupSession Get-VBRBackupSession
Looks for tasks performed during a
Get-VBRTaskSession Get-VBRTaskSession
specific session
Manage restore sessions:
Looks for restore sessions Get-VBRRestoreSession Get-VBRRestoreSession
Removes a restore session Remove-VBRRestoreSession Remove-VBRRestoreSession
Manage SureBackup sessions:
Looks for SureBackup sessions Get-VSBSession Get-VSBSession
Looks for tasks performed during a
Get-VSBTaskSession Get-VSBTaskSession
specific SureBackup session
Sessions Objects
Veeam PowerShell uses the following object to manage jobs sessions:
Object Description
VBRSession Contains tape job session
VBRLogItem Contains job session log
651 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRBackupSession
Short Description
Returns backup sessions that have been run.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRBackupSession [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Detailed Description
This cmdlet returns the list of backup, replication and backup copy sessions that have been run.
You can get the list of all backup, replication and backup copy sessions, or look for instances directly
by name.
Run Get-VBRTaskSession to get the list of all tasks performed during the specific backup, replication or
backup copy session.
Run Get-VSBSession to get the list of SureBackup sessions that have been run.
Return Type
CBackupSession
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the backup
session you want to get, or search
conditions.
Name The name of the session is a name False Named False True
of the job.
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
652 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the list of all backup sessions.
Get-VBRBackupSession
Example 2
This command looks for all backup copy sessions.
Get-VBRBackupSession -Name *Backup Copy*
653 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRSession
Short Description
Returns tape jobs sessions.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRSession -Job <VBRJob> [-Last] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Get-VBRSession -Session <VBRSession> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Get-VBRSession -Job <VBRJob> [-State <VBRSessionState>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Get-VBRSession -Job <VBRJob> [-Result <VBRSessionResult>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRJob
Return Type
VBRBackupSession
Detailed Description
This cmdlet returns the list of sessions for a selected tape job.
You can get all tape job sessions that have been run, update the job session state or filter the sessions
by session state or result. Use an appropriate scenario for each case.
654 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the tape job
True (by
for which you want to
Job True Named ValueFromPipeline False
get sessions that have
ByPropertyName)
been run.
Indicates that the
command returns the
Last False Named False False
last session of the
specified job.
Specifies the job True (by Value
session for which you FromPipeline,
Session True Named False
want to get updated ValueFromPipeline
state. ByPropertyName)
Specifies the session
State state with which you False Named False False
want to get sessions.
Specifies the session
Result result with which you False Named False False
want to get sessions.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
655 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRTaskSession
Short Description
Returns tasks performed during a specified session.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRTaskSession [-Session] <CBackupSession> [-Name <String[]>]
[-WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRBackupSession
Detailed Description
This cmdlet returns the list of 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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the session the tasks of (ByValue,
Session True 1 False
which you want to get. ByProperty
Name)
Specifies the name of the job
object within the session you
indicated in the Session
Name parameter the tasks for which False Named False True
you want to get.
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
656 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command gets the list of tasks performed for the VMs named "DC" and "DNS" in the backup job
session named "Exchange Backup". The backup session is obtained with Get-VBRBackupSession and
piped down.
Get-VBRBackupSession -Name "Exchange Backup" | Get-VBRTaskSession
-Name "DC", "DNS"
Example 2
This command gets the list of tasks performed for the VMs named "DC" and "DNS" in the backup job
session represented by the $"Exchange Session" variable. The backup session is obtained with Get-
VBRBackupSession and assigned to the variable beforehand.
Get-VBRTaskSession -Session $"Exchange Session" -Name "DC", "DNS"
657 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRBackupSession
This object contains session of operations performed on tapes.
Created by
Start-VBRFailoverPlan
Undo-VBRFailoverPlan
Get-VBRSession
Start-VBRTapeCatalog
Start-VBRTapeInventory
Erase-VBRTapeMedium
Export-VBRTapeMedium
Import-VBRTapeMedium
Properties
The "?" mark indicates that the type property accepts zero values.
Property Type Description
Date and time of session
CreationTime DateTime
creation.
EndTime DateTime? Date and time of session end.
JobId GUID Unique identifier of job.
Progress int32 Job progress (in percent).
Job result: None, Success,
Result VBRSessionResult
Warning, Failed.
Indicates if the session was
RunManually bool
started manually.
Session state: Stopped, Starting,
Stopping, Working, Pausing,
State VBRSessionState Resuming, WaitingTape, Idle,
Postprocessing,
WaitingRepository.
Log VBRLogItem[] Session log.
658 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRSession
This object contains Endpoint backup job session.
Created by
None
Properties
The "?" mark indicates that the type property accepts zero values.
Property Type Description
ID GUID Unique identifier of the session.
Session state: Stopped, Starting,
Stopping, Working, Pausing,
State VBRSessionState Resuming, WaitingTape, Idle,
Postprocessing,
WaitingRepository.
Job result: None, Success,
Result VBRSessionResult
Warning, Failed.
JobId GUID Unique identifier of job.
Date and time of session
CreationTime DateTime
creation.
EndTime DateTime? Date and time of session end.
659 | Veeam Backup PowerShell |REFERENCE| REV 2
VBRLogItem
This object contains a job session log.
Created by
Get-VBRSession
Passed to
None
Properties
Property Type Description
Unique identifier of the log
Id int32
entries.
Usn int32 The log entries counter value.
Title string The log entry title.
Description string Not supported.
The date and time of the last
Time DateTime
modification of the log entry.
The date and time of the log
StartTime DateTime
entry creation.
The log entry status: None,
Status VBRLogStatus
Success, Warning, Failed.
660 | Veeam Backup PowerShell |REFERENCE| REV 2
Logs Export
Collect system logs and use them to submit support tickets.
Operations VMware Hyper-V
Collects system logs to export Export-VBRLogs Export-VBRLogs
661 | Veeam Backup PowerShell |REFERENCE| REV 2
Export-VBRLogs
Short Description
Collects system logs for export.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Export-VBRLogs -Server <CHost[]> -FolderPath <String> [-Compress]
[-From <DateTime>] [-To <DateTime>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Export-VBRLogs -Job <IJob[]> -FolderPath <String> [-Compress] [-
From <DateTime>] [-To <DateTime>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Export-VBRLogs -Entity <IVmItem[]> -FolderPath <String> [-
Compress] [-From <DateTime>] [-To <DateTime>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Export-VBRLogs -Backup <CBackup[]> -FolderPath <String> [-
Compress] [-From <DateTime>] [-To <DateTime>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRServer
Get-VBRJob
Get-VSBJob
Find-VBRViEntity / Find-VBRHvEntity
Get-VBRBackup
Detailed Description
This cmdlet collects system logs. You can use this cmdlet to collect logs you can send to the Veeam
support.
The log files are written to the folder you specify in this cmdlet.
This cmdlet provides syntax for getting logs for hosts, jobs, entities or backups. You can get logs for all
kind of virtual host, any jobs including SureBackup jobs, all entities including datastores, clusters,
replicas, etc., or any backup.
662 | Veeam Backup PowerShell |REFERENCE| REV 2
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the server(s) from
which you want to collect logs.
True
Note that selected servers must
(ByValue,
Server be running and reachable over True Named False
ByProperty
the network.
Name)
You can assign multiple servers
to this object.
Specifies the start date to collect
the logs for export. Enter the
From date in format set in your False Named False False
workstation Date and Time
settings.
Specifies the end date to collect
the logs for export. Enter the
To date in format set in your False Named False False
workstation Date and Time
settings.
Specifies the job(s) you want to
collect logs for. You can get logs True
for all kind of jobs. (ByValue,
Job True Named False
ByProperty
You can assign multiple jobs to Name)
this object.
Specifies the VM(s) you want to True
collect logs for. (ByValue,
Entity True Named False
You can assign multiple VMs to ByProperty
this object. Name)
Specifies the backups you want True
to collect logs for. (ByValue,
Backup True Named False
You can assign multiple backups ByProperty
to this object. Name)
Specifies the destination folder
FolderPath to which the logs will be True Named False False
exported.
If set, the log files will be
Compress False Named False False
archived.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
663 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command starts collecting log files from the server represented by the $server variable. The
destination path is C:\Logs. The period for collecting data is July, 21, 2013 - July, 25, 2013. The data
compression is enabled.
Export-VBRLogs -Server $server -FolderPath "C:\Logs" -Compress -
From 7/21/2013 -To 7/25/2013
Example 2
This command starts collecting log files for the SureBackup job named "DC SureJob". The job is
obtained with Get-VSBJob and piped down. The destination path is C:\Logs\SureBackup Logs. The
period for collecting data is not set to collect all the data for the job. The data compression is enabled.
Get-VSBJob -Name "DC SureJob" | Export-VBRLogs -FolderPath
"C:\Logs\SureBackup Logs" -Compress
Example 3
This command starts collecting log files for the VM named "DC" for May, 2013. The VM is obtained with
Find-VBRViEntity and piped down. The destination path is C:\Logs. The data compression is enabled.
Find-VBRViEntity -Name "DC" | Export-VBRLogs -FolderPath
"C:\Logs" -Compress -From 6/01/2013 -To 7/01/2013
664 | Veeam Backup PowerShell |REFERENCE| REV 2
Configuration Backup
Create configuration backup.
Operations VMware Hyper-V
Starts configuration backup job Export-VBRConfiguration Export-VBRConfiguration
665 | Veeam Backup PowerShell |REFERENCE| REV 2
Export-VBRConfiguration
Short Description
Starts configuration backup job.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Export-VBRConfiguration [-WarningAction <ActionPreference>] [-
WarningVariable <String>] [<CommonParameters>]
Detailed Description
This cmdlet backs up current configuration of Veeam Backup & Replication server.
With configuration backup, you can store a copy of your host configuration: your virtual infrastructure,
jobs configuration, Veeam Backup & Replication settings and other data. In case the Veeam Backup &
Replication host is failed or configuration is corrupted, you can restore configuration with this copy.
The configuration backup is job-driven. You can configure settings of the configuration backup job,
including schedule, in the main menu of the Veeam backup console. With Veeam PowerShell, you can
start a job session but you cannot change the settings.
By default, the configuration backup job runs daily. The resulting backup files are stored to the
C:\backup\VeeamConfigBackup\%BackupServer% folder on the Veeam backup default repository.
You cannot restore configuration with Veeam PowerShell. It is recommended to perform the restore
operation with Veeam Backup & Replication UI for full functionality.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command backs up current configuration of Veeam Backup & Replication host.
Export-VBRConfiguration
666 | Veeam Backup PowerShell |REFERENCE| REV 2
NetApp Storage Systems
Add NetApp storage systems to your Veeam Backup & Replication console and administrate them.
Operation VMware Hyper-V
Work with NetApp hosts:
Creates a NetApp storage Add-NetAppHost —
Looks for NetApp storages Get-NetAppHost —
Modifies a NetApp storage Set-NetAppHost —
Removes a NetApp storage Remove-NetAppHost —
Rescans a NetApp storage Sync-NetAppHost —
Work with NetApp shapshots:
Adds a NetApp storage snapshot Add-NetAppSnapshot —
Looks for NetApp storage snapshots Get-NetAppSnapshot —
Removes a NetApp storage snapshot Remove-NetAppSnapshot —
Work with NetApp storage volumes:
Looks for NetApp storage volumes Get-NetAppVolume —
Rescans a NetApp storage volume Sync-NetAppVolume —
667 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-NetAppHost
Short Description
Adds NetApp storage.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-NetAppHost -Name <String> [-Description <String>] -UserName
<String> -Password <String> [-IsHTTP [<Boolean>]] [-Port <Int32>]
[-WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
-OR-
Add-NetAppHost -Name <String> [-Description <String>] -
Credentials <CCredentials> [-IsHTTP [<Boolean>]] [-Port <Int32>]
[-WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-VBRCredentials
Detailed Description
This cmdlet adds the selected NetApp storage to Veeam Backup & Replication.
When you add a storage to your management console, Veeam Backup & Replication scans the storage
to update the infrastructure. To rescan the storage items manually, run Sync-NetAppHost or Sync-
NetAppVolume.
To remove a storage from Veeam Backup & Replication console, run Remove-NetAppHost. The storage
is not deleted from server where it was created. When you remove a storage, you stop managing it via
your Veeam Backup & Replication console.
When adding a storage, you will need to provide either username/password or credentials. This
cmdlet provides syntax for both scenarios accordingly.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the storage IP address or
Name True Named False False
DNS name.
Specifies the description of the
storage.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
UserName Specifies the user name you want True Named False False
to use for authenticating with the
668 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
storage.
If you use username/password
scenario, -Credentials parameter
must be omitted.
Specifies the password you want
to use for authenticating with the
storage.
Password True Named False False
If you use username/password
scenario, -Credentials parameter
must be omitted.
If set to TRUE, HTTP protocol will
be used to connect to the NetApp
IsHTTP storage. Otherwise, HTTPS False Named False False
protocol will be selected. By
default, HTTPS is used.
Sets a port used to connect to the
Port NetApp storage. By default, port False Named False False
443 is used.
Specifies the CCredentials object
containing the credentials record
you want to use for authenticating
Credentials with the storage. True Named False False
If you use credentials scenario,
User and Password parameters
must be omitted.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds a NetApp storage with IP address 167.16.2.134 specified in -Name parameter. The
username is "Administrator" and the password is "_Password_".
Add-NetAppHost -UserName "Administrator" -Password "_Password_" -
Name 167.16.2.134 -Description NetApp Storage
Example 2
This command adds a NetApp 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.
Add-NetAppHost -Credentials $creds -Name 167.16.2.134 -
Description "NetApp Storage"
669 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-NetAppSnapshot
Short Description
Creates storage snapshot.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Add-NetAppSnapshot -Volume <CSanVolume> [-Name <String>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-NetAppVolume
Detailed Description
This cmdlet creates a snapshot of the selected NetApp volume.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the
True (by Value
CSanVolume object
FromPipeline,
Volume containing the SAN True Named False
ValueFromPipeline
volume you want to
ByPropertyName)
take snapshot of.
Specifies the name you
Name want to assign to the False Named False False
snapshot.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command creates a snapshot of the "Vol 01" volume. The snapshot is named "vol_SS_01".
The target volume object is obtained with Get-NetAppVolume and piped down.
Get-NetAppVolume -Name "Vol 01" | Add-NetAppSnapshot -Name
"vol_SS_01"
670 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-NetAppHost
Short Description
Returns storages.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-NetAppHost [-Name <String[]>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
None
Detailed Description
This cmdlet returns the list of storages.
You can get the list of all storages added to your virtual infrastructure or narrow down the output by
storage name.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the storage
you want to get.
Name False Named False False
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for all available storages.
Get-NetAppHost
Example 2
This command looks for the list of storages with names starting with "NetApp Store".
Get-NetAppHost -Name "NetApp Store*"
671 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-NetAppSnapshot
Short Description
Returns storage snapshots.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-NetAppSnapshot [-Name <String[]>] [-Volume <CSanVolume[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-NetAppVolume
Detailed Description
This cmdlet returns the list of storage snapshots.
You can get the list of all storage snapshots of your virtual infrastructure or narrow down the output
by snapshot name or a specific volume.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the
snapshot you want to get.
Name False Named False False
You can specify multiple names
separated by commas.
Specifies the CSanVolume object
containing the volume(s) you
Volume want to get the snapshots of. False Named False False
You can add multiple volumes to
this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
672 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the list of all snapshots.
Get-NetAppSnapshot
Example 2
This command looks for snapshots of the specific volumes. The list of volumes is obtained with Get-
NetAppVolume, the first three volumes are selected and piped down.
Get-NetAppVolume | Select -First 3 | Get-NetAppSnapshot
673 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-NetAppVolume
Short Description
Returns storage volumes.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-NetAppVolume [-Name <String[]>] [-Host <CNaHost[]>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-NetAppHost
Detailed Description
This cmdlet returns the list of storage volumes.
You can get the list of all storage volumes of your virtual infrastructure or narrow down the output by
volume name, or specify a cluster or a storage within which you want to look for the volumes.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the volume
you want to get.
Name False Named False False
You can specify multiple names
separated by commas.
Specifies the host on which you
want to look for the volumes.
Host False Named False False
You can assign multiple hosts to
this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command looks for the volume named "NetApp Store" in storage "NetApp Store 01".
The storage object is obtained with Get-NetAppHost and piped down.
Get-NetAppHost -Name "NetApp Store 01" | Get-NetAppVolume -Name
"NetApp Store*"
674 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-NetAppHost
Short Description
Removes storage.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-NetAppHost -Host <CNaHost> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-NetAppHost
Detailed Description
This cmdlet removes the selected storage from Veeam Backup & Replication.
The storage is not deleted from server where it was created. When you remove a storage, you stop
managing it via your Veeam Backup & Replication console.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True (by Value
Specifies the storage FromPipeline,
Host True Named False
you want to remove. ValueFromPipeline
ByPropertyName)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command removes the storage named "NetApp Store 01".
The storage object is obtained with Get-NetAppHost and piped down.
Get-NetAppHost -Name "NetApp Store 01" | Remove-NetAppHost
675 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-NetAppSnapshot
Short Description
Removes storage snapshot.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Remove-NetAppSnapshot -Snapshot <CSanSnapshot[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-NetAppSnapshot
Detailed Description
This cmdlet permanently removes the selected storage snapshot from your virtual infrastructure.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the
CSanSnapshot object
containing the True (by Value
snapshot(s) you want FromPipeline,
Snapshot to remove. True Named False
ValueFromPipeline
You can add multiple ByPropertyName)
snapshots to this
object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command removes the snapshot with name "vol1_SS_1".
The snapshot object is obtained with Get-NetAppSnapshot and piped down.
Get-NetAppSnapshot -Name "vol1_SS_1" | Remove-NetAppSnapshot
676 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-NetAppHost
Short Description
Modifies storage.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Set-NetAppHost -Host <CNaHost> [-Name <String>] [-Description
<String>] [-UserName <String>] [-Password <String>] [-Credentials
<CCredentials>] [-IsHTTP [<Boolean>]] [-Port <Int32>] [-
WarningAction <ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-NetAppHost
Get-VBRCredentials
Detailed Description
This cmdlet modifies a selected storage. To modify settings, you need to enter the corresponding
parameters with new values. The parameters that you omit will remain unchanged.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True (by Value
Specifies the storage FromPipeline,
Host True Named False
you want to modify. ValueFromPipeline
ByPropertyName)
Specifies the storage IP
Name True Named False False
address or DNS name.
Specifies the description
of the storage.
Description If not set, Veeam Backup False Named False False
& Replication will enter
date and time of
creation by default.
Specifies the user name
you want to use for
authenticating with the
storage.
UserName True Named False False
If you use
username/password
scenario, -Credentials
parameter must be
677 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
omitted.
Specifies the password
you want to use for
authenticating with the
storage.
Password If you use True Named False False
username/password
scenario, -Credentials
parameter must be
omitted.
If set to TRUE, HTTP
protocol will be used to
connect to the NetApp
IsHTTP storage. Otherwise, False Named False False
HTTPS protocol will be
selected. By default,
HTTPS is used.
Sets a port used to
connect to the NetApp
Port False Named False False
storage. By default, port
443 is used.
Specifies the
CCredentials object
containing the
credentials record you
want to use for
Credentials authenticating with the True Named False False
storage.
If you use credentials
scenario, User and
Password parameters
must be omitted.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command changes the storage connection from default to HTTP. The storage is obtained with
Get-NetAppHost and assigned to the '$netapp' variable beforehand.
Set-NetAppHost $netapp -IsHTTP "True"
678 | Veeam Backup PowerShell |REFERENCE| REV 2
Sync-NetAppHost
Short Description
Rescans storage.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Sync-NetAppHost [-Host <CNaHost>] [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-NetAppHost
Detailed Description
This cmdlet rescans the selected storage to synchronize the 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.
To rescan the selected volumes only, run Sync-NetAppVolume.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the CNaHost True (by Value
object containing the FromPipeline,
Host False Named False
storage you want to ValueFromPipeline
synchronize. ByPropertyName)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command synchronizes the storage named "NetApp Store 01".
The storage object is obtained with Get-NetAppHost and piped down.
Get-NetAppHost -Name "NetApp Store 01" | Sync-NetAppHost
679 | Veeam Backup PowerShell |REFERENCE| REV 2
Sync-NetAppVolume
Short Description
Rescans storage volume.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Sync-NetAppVolume -Volume <CSanVolume[]> [-WarningAction
<ActionPreference>] [-WarningVariable <String>]
[<CommonParameters>]
Related Commands
Get-NetAppVolume
Detailed Description
This cmdlet rescans the selected storage volume(s) to synchronize the 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.
To rescan the storage, run Sync-NetAppHost.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the
CSanVolume object
containing the True (by Value
volume(s) you want to FromPipeline,
Volume True Named False
synchronize. ValueFromPipeline
ByPropertyName)
You can add multiple
volumes to this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example
This command synchronizes the volume named "NetApp Vol 01".
The storage object is obtained with Get-NetAppVolume and piped down.
Get-NetAppVolume -Name "NetApp Vol 01" | Sync-NetAppVolume
680 | Veeam Backup PowerShell |REFERENCE| REV 2
HP 3PAR StoreServ Storage Systems
Add HP 3PAR StoreServ storage systems to your Veeam Backup & Replication console and
administrate them.
Operation VMware Hyper-V
Work with HP storage snapshots:
Creates a HP storage snapshot Add-HP3Snapshot —
Looks for created HP storage
Get-HP3Snapshot —
snapshots
Removes a HP storage snapshot Remove-HP3Snapshot —
Work with HP storages:
Adds a HP storage Add-HP3Storage —
Looks for HP storages Get-HP3Storage —
Removes a HP storage Remove-HP3Storage —
Rescans a HP storage Sync-HP3Storage —
Work with HP storage volumes:
Looks for HP storage volumes Get-HP3Volume —
Rescans a HP storage volume Sync-HP3Volume —
681 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-HP3Snapshot
Short Description
Creates a HP 3PAR StoreServ storage snapshot.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP storage system: HP 3PAR StoreServ
Syntax
Add-HP3Snapshot -Volume <CSanVolume> [-Name <string>][-
Description <string>][<CommonParameters>]
Related Commands
Get-HP3Volume
Detailed Description
This cmdlet creates a snapshot of the selected HP 3PAR StoreServ storage volume.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the HP 3PAR True (by Value
StoreServ storage FromPipeline,
Volume True Named False
volume for which you ValueFromPipeline
want to take snapshot. ByPropertyName)
Specifies the name you
Name want to assign to the False Named False False
snapshot.
Specifies the
description of the
snapshot.
Description If not set, Veeam False Named False False
Backup & Replication
will enter date and
time of creation by
default.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
682 | Veeam Backup PowerShell |REFERENCE| REV 2
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. The description is "Vol 01
snapshot".
Get-HP3Volume -Name "Vol 01" | Add-HP3Snapshot -Name "vol_SS_01"
-Description "Vol 01 snapshot"
Example 2
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 assigned to the $volume variable
beforehand. The description is "Vol 01 snapshot".
Add-HP3Snapshot -Volume $volume -Name "vol_SS_01" -Description
"Vol 01 snapshot"
683 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-HP3Storage
Short Description
Adds HP 3PAR StoreServ storage to Veeam Backup & Replication.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP storage system: HP 3PAR StoreServ
Syntax
Add-HP3Storage -UserName <string> -Password <string> [-Name
<string>] [-Description <string>] [-Url
<string>][<CommonParameters>]
-OR-
Add-HP3Storage -Credentials <CCredentials> [-Name <string>] [-
Description <string>] [-Url <string>][<CommonParameters>]
Related Commands
Get-VBRCredentials
Detailed Description
This cmdlet adds the selected HP 3PAR StoreServ 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 storage infrastructure manually, run Sync-HP3Storage
or Sync-HP3Volume.
When adding a storage, you will need to provide either username/password or credentials. This
cmdlet provides syntax for both scenarios accordingly.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the user name you want
to use for authenticating with the
storage.
UserName True Named False False
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Specifies the password you want
to use for authenticating with the
storage.
Password False Named False False
If you use the Username/Password
scenario, the -Credentials
parameter must be omitted.
Credentials Specifies credentials you want to True Named False False
684 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
use for authenticating with the
storage.
If you use the Credentials scenario,
the -User and -Password
parameters must be omitted.
Specifies the storage IP address or
Name True Named False False
DNS name.
Specifies the description of the
storage.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Specifies the HP 3PAR Web
Services API URL.
The HP 3PAR Web Services API
Url delivers a programming interface False Named False False
for performing storage
management tasks with HP 3PAR
StoreServ storage systems.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds a HP 3PAR StoreServ 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 HP 3PAR StoreServ 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
685 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-HP3Snapshot
Short Description
Returns HP 3PAR StoreServ storage snapshot.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP SAN storage system: HP 3PAR StoreServ
Syntax
Get-HP3Snapshot [-Name <string[]>][<CommonParameters>]
-OR-
Get-HP3Snapshot [-Name <string[]>] [-Volume
<CSanVolume[]>][<CommonParameters>]
Related Commands
Get-HP3Volume
Detailed Description
This cmdlet returns the list of HP 3PAR StoreServ storage snapshots.
You can get the list of all storage snapshots in your storage system or narrow down the output by the
snapshot name or a specific volume.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the
snapshot you want to get.
Name False Named False True
You can specify multiple names
separated by commas.
Specifies the volume(s) for which
you want to get the snapshots.
Volume False Named False False
You can assign multiple volumes
to this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
686 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the list of all snapshots.
Get-HP3Snapshot
Example 2
This command looks for snapshots of the specific volumes. The list of volumes is obtained with Get-
HP3Volume, the first three volumes are selected and piped down.
Get-HP3Volume | Select -First 3 | Get-HP3Snapshot
687 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-HP3Storage
Short Description
Returns HP 3PAR StoreServ storages.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP SAN storage system: HP 3PAR StoreServ
Syntax
Get-HP3Storage [-Name <string[]>][<CommonParameters>]
Detailed Description
This cmdlet returns the list of HP 3PAR StoreServ storages.
You can get the list of all HP 3PAR StoreServ storages in your storage system or narrow down the
output by the storage name.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the storage
you want to get.
Name False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of all HP 3PAR StoreServ storages.
Get-HP3Storage
Example 2
This command looks for the list of storages with names starting with "HP Store".
Get-HP3Storage -Name "HP Store*"
688 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-HP3Volume
Short Description
Returns HP 3PAR StoreServ storage volumes.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP SAN storage system: HP 3PAR StoreServ
Syntax
Get-HP3Volume -Storage <CHp3PARHost[]> [-Name
<string[]>][<CommonParameters>]
Related Commands
Get-HP3Storage
Detailed Description
This cmdlet returns the list of HP 3PAR StoreServ storage volumes.
You can get the list of all HP 3PAR StoreServ storage volumes in your storage system, narrow down
the output by the volume name or specify a cluster or a storage within which you want to look for the
volumes.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the storage(s) within
which you want to look for the
Storage volumes. False Named False False
You can assign multiple storages
to this object.
Specifies the name of the volume
you want to get.
Name False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
689 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the volume named "HP Store" in the storage named "HP Store 01". The
storage object is obtained with Get-HP3Storage and piped down.
Get-HP3Storage -Name "HP Store 01" | Get-HP3Volume -Name "HP
Store"
Example 2
This command looks for the volume named "HP Store" in the storage represented by the $"HP
storage" variable. The storage object is obtained with Get-HP3Storage and assigned to the variable
beforehand.
Get-HP3Volume -Storage $"HP storage" -Name "HP Store"
690 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-HP3Snapshot
Short Description
Removes a HP 3PAR StoreServ storage snapshot.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP SAN storage system: HP 3PAR StoreServ
Syntax
Remove-HP3Snapshot -Snapshot <CSanSnapshot[]>
[<CommonParameters>]
Related Commands
Get-HP3Snapshot
Detailed Description
This cmdlet permanently removes the selected HP 3PAR StoreServ storage snapshot from your
storage system.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the snapshot(s) you True
want to remove. (ByValue,
Snapshot True Named False
You can assign multiple ByProperty
snapshots to this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command removes the snapshot named "vol1_SS_1". The snapshot object is obtained with Get-
HP3Snapshot and piped down.
Get-HP3Snapshot -Name "vol1_SS_1" | Remove-HP3Snapshot
Example 2
This command removes the snapshot represented by the $"snapshot1" variable. The snapshot object
is obtained with Get-HP3Snapshot and assigned to the variable beforehand.
Remove-HP3Snapshot -Snapshot $"snapshot1"
691 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-HP3Storage
Short Description
Removes a HP 3PAR StoreServ storage storage.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP SAN storage system: HP 3PAR StoreServ
Syntax
Remove-HP3Storage -Storage <CHp3PARHost> [<CommonParameters>]
Related Commands
Get-HP3Storage
Detailed Description
This cmdlet removes the selected HP 3PAR StoreServ storage from Veeam Backup & Replication.
The HP 3PAR StoreServ storage is not deleted from server. When you remove a HP 3PAR StoreServ
storage, you stop managing it via your Veeam Backup & Replication console.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the storage you want (ByValue,
Storage True Named False
to remove. ByProperty
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
692 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
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
Example 2
This command removes the storage represented by the $"store01" variable. The storage object is
obtained with Get-HP3Storage and assigned to the variable beforehand.
Remove-HP3Storage -Storage $"store01"
693 | Veeam Backup PowerShell |REFERENCE| REV 2
Sync-HP3Storage
Short Description
Rescans a HP 3PAR StoreServ storage.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP SAN storage system: HP 3PAR StoreServ
Syntax
Sync-HP3Storage [-Storage <CHp3PARHost>] [<CommonParameters>]
Related Commands
Get-HP3Storage
Detailed Description
This cmdlet rescans the selected HP 3PAR StoreServ 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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the storage you want (ByValue,
Storage False Named False
to rescan. ByProperty
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
694 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
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
Example 2
This command synchronizes the storage represented by the $"store01" variable. The storage object is
obtained with Get-HP3Storage and assigned to the variable beforehand.
Sync-HP3Storage -Storage $"store01"
695 | Veeam Backup PowerShell |REFERENCE| REV 2
Sync-HP3Volume
Short Description
Rescans a HP 3PAR StoreServ storage.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP SAN storage system: HP 3PAR StoreServ
Syntax
Sync-HP3Volume -Volume <CSanVolume[]> [<CommonParameters>]
Related Commands
Get-HP3Volume
Detailed Description
This cmdlet rescans the selected HP 3PAR StoreServ storage 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 HP 3PAR StoreServ storage.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the volume(s) you True
want to synchronize. (ByValue,
Volume True Named False
You can assign multiple ByProperty
volumes to this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
696 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command synchronizes the volume named "HP Vol 01". The volume object is obtained with Get-
HP3Volume and piped down.
Get-HP3Volume -Name "HP Vol 01" | Sync-HP3Volume
Example 2
This command synchronizes the volume named "HP Vol 01". The volume object is obtained with Get-
HP3Volume and assigned to the variable beforehand.
Sync-HP3Volume -Volume $"HP Vol 01"
697 | Veeam Backup PowerShell |REFERENCE| REV 2
HP StoreVirtual Storage Systems
Add HP StoreVirtual storage systems to your Veeam Backup & Replication console and administrate
them.
Operation VMware Hyper-V
Work with HP storage snapshots:
Creates a HP storage snapshot Add-HP4Snapshot —
Looks for created HP storage
Get-HP4Snapshot —
snapshots
Removes a HP storage snapshot Remove-HP4Snapshot —
Work with HP storages:
Adds a HP storage Add-HP4Storage —
Looks for HP storages Get-HP4Storage —
Removes a HP storage Remove-HP4Storage —
Rescans a HP storage Sync-HP4Storage —
Look for HP clusters:
Looks for HP clusters Get-HP4Cluster
Work with HP storage volumes:
Looks for HP storage volumes Get-HP4Volume —
Rescans a HP storage volume Sync-HP4Volume —
698 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-HP4Snapshot
Short Description
Creates a HP StoreVirtual storage snapshot.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP storage systems: HP StoreVirtual
Syntax
Add-HP4Snapshot -Volume <CSanVolume> [-Name <string>] [-
Description <string>][-ApplicationManagedShapshot]
[<CommonParameters>]
Related Commands
Get-HP4Volume
Detailed Description
This cmdlet creates a snapshot of the selected HP StoreVirtual storage volume.
Alias
Add-VBRHPSnapshot
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the storage volume you
Volume True Named False False
want to take snapshot of.
Specifies the name you want to
Name False Named False False
assign to the snapshot.
Specifies the description of the
snapshot.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
Indicates if the VM on the target
volume should be quiesced to
Application bring VM data to a consistent
Managed state. False Named False False
Shapshot If omitted, Veeam Backup &
Replication will create a point-in-
time snapshot.
699 | Veeam Backup PowerShell |REFERENCE| REV 2
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command creates a snapshot of the "Vol 01" volume. The snapshot is named "vol_SS_01". The
target volume object is obtained with Get-HP4Volume and piped down. The application-managed
snapshot is enabled. The description is "Vol 01 snapshot".
Get-HP4Volume -Name "Vol 01" | Add-HP4Snapshot -Name "vol_SS_01"
-ApplicationManagedShapshot -Description "Vol 01 snapshot"
Example 2
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-HP4Volume and assigned to the $volume variable
beforehand. The application-managed snapshot is enabled. The description is "Vol 01 snapshot".
Add-HP4Snapshot -Volume $volume -Name "vol_SS_01" -
ApplicationManagedShapshot -Description "Vol 01 snapshot"
700 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-HP4Storage
Short Description
Adds HP StoreVirtual storage to Veeam Backup & Replication.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP storage systems: HP StoreVirtual
Syntax
Add-HP4Storage -DnsOrIpAddress <string> -UserName <string> -
Password <string> [-Name <string>] [-Description <string>]
[<CommonParameters>]
-OR-
Add-HP4Storage -DnsOrIpAddress <string> -Credentials
<CCredentials> [-Name <string>] [-Description <string>]
[<CommonParameters>]
Related Commands
Get-VBRCredentials
Detailed Description
This cmdlet adds the selected HP StoreVirtual 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 storage infrastructure manually, run Sync-HP4Storage
or Sync-HP4Volume.
When adding a storage, you will need to provide either username/password or credentials. This
cmdlet provides syntax for both scenarios accordingly.
Alias
Add-VBRHPStorage
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the string with a full
DnsOr (ByValue,
DNS name or IP address of the True Named False
IpAddress ByProperty
storage.
Name)
Specifies the user name you
want to use for authenticating
with the storage.
UserName False Named False False
If you use the
Username/Password scenario,
the -Credentials parameter must
701 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
be omitted.
Specifies the password you want
to use for authenticating with
the storage.
Password If you use the False Named False False
Username/Password scenario,
the -Credentials parameter must
be omitted.
Specifies the name of the
Name management group the storage False Named False False
belongs to.
Specifies the credentials you
want to use for authenticating
with the storage.
Credentials If you use the Credentials True Named False False
scenario, the -User and -
Password parameters must be
omitted.
Specifies the description of the
storage.
Description If not set, Veeam Backup & False Named False False
Replication will enter date and
time of creation by default.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command adds a 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 "HP Storage"
Example 2
This command adds a 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 "HP Storage"
702 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-HP4Cluster
Short Description
Returns HP StoreVirtual storage clusters.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP storage systems: HP StoreVirtual
Syntax
Get-HP4Cluster -Storage <CHpP4Group[]> [-Name
<string[]>][<CommonParameters>]
Related Commands
Get-HP4Storage
Detailed Description
This cmdlet returns the list of HP StoreVirtual storage clusters.
You can get the list of all storage clusters in your storage system, or narrow down the output by the
cluster name or a specific storage.
Alias
Get-VBRHPCluster
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the storage within which
you want to look for the clusters.
Storage False Named False False
You can assign multiple storages
to this object.
Specifies the name of the cluster
you want to get.
Name False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
703 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for the list of clusters in the storage named "HP Store 01". The storage object is
obtained with Get-HP4Storage and piped down.
Get-HP4Storage -Name "HP Store 01" | Get-HP4Cluster
Example 2
This command looks for the list of clusters in the storage named "HP Store 01". The storage object is
obtained with Get-HP4Storage and assigned to the variable beforehand.
Get-HP4Cluster -Storage $"HP Store 01"
704 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-HP4Snapshot
Short Description
Returns HP StoreVirtual storage snapshots.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP storage systems: HP StoreVirtual
Syntax
Get-HP4Snapshot [-Name <string[]>][<CommonParameters>]
-OR-
Get-HP4Snapshot [-Name <string[]>] [-Volume
<CSanVolume[]>][<CommonParameters>]
Related Commands
Get-HP4Volume
Detailed Description
This cmdlet returns the list of HP StoreVirtual storage snapshots.
You can get the list of all storage snapshots in your storage system, or narrow down the output by the
snapshot name or a specific volume.
Alias
Get-VBRHPSnapshot
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the
snapshot you want to get.
Name False Named False True
You can specify multiple names
separated by commas.
Specifies the volume(s) you want
to get the snapshots of.
Volume False Named False False
You can assign multiple volumes
to this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
705 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for snapshots of the volume named "HP Vol01". The volume is obtained with Get-
HP4Volume and piped down.
Get-HP4Volume -Name "HP Vol01" | Get-HP4Snapshot
Example 2
This command looks for the snapshots of the volume represented by the $vol variable. The volume is
obtained with Get-HP4Volume and assigned to the variable beforehand.
Get-HP4Snapshot
706 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-HP4Storage
Short Description
Returns HP StoreVirtual storages.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP storage systems: HP StoreVirtual
Syntax
Get-HP4Storage [-Name <string[]>] [<CommonParameters>]
Detailed Description
This cmdlet returns the list of HP StoreVirtual storages.
You can get the list of all storage snapshots in your storage system, or narrow down the output by the
storage name.
Alias
Get-VBRHPStorage
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the storage
you want to get.
Name False Named False True
You can specify multiple names
separated by commas.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of all storages.
Get-HP4Storage
Example 2
This command looks for the list of storages with names starting with "HP Store".
Get-HP4Storage -Name "HP Store*"
707 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-HP4Volume
Short Description
Returns HP StoreVirtual storage volumes.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP storage systems: HP StoreVirtual
Syntax
Get-HP4Volume [-Name <string[]>] [<CommonParameters>]
-OR-
Get-HP4Volume -Cluster <CHpP4kCluster[]> [-Name <string[]>]
[<CommonParameters>]
-OR-
Get-HP4Volume -Storage <CHpP4Group[]> [-Name <string[]>]
[<CommonParameters>]
Related Commands
Get-HP4Storage
Get-HP4Cluster
Detailed Description
This cmdlet returns the list of HP StoreVirtual storage volumes.
You can get the list of all storage volumes in your storage system,narrow down the output by the
volume name, or specify a cluster or a storage within which you want to look for the volumes.
Alias
Get-VBRHPVolume
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the volume
you want to get.
Name False Named False True
You can specify multiple names
separated by commas.
Specifies the cluster within which
you want to look for the volumes.
Cluster False Named False False
You can assign multiple clusters to
this object.
Storage Specifies the storage within which False Named False False
708 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
you want to look for the volumes.
You can assign multiple storages
to this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command looks for the list of volumes with names starting with "HP Store" within the cluster
named "Cluster 1". The cluster object is obtained with Get-HP4Cluster and piped down.
Get-HP4Cluster -Name "Cluster 1" | Get-HP4Volume -Name "HP
Store*"
Example 2
This command looks for all volumes in the storage named "HP Store 01". The storage object is
obtained with Get-HP4Storage and piped down.
Get-HP4Storage -Name "HP Store 01" | Get-HP4Volume
Example 3
This command looks for volume named "HP Vol01" in the storage represented by the $storage
variable. The storage object is obtained with Get-HP4Storage and assigned to the variable
beforehand.
Get-HP4Volume -Storage $storage -Name "HP Vol01"
709 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-HP4Snapshot
Short Description
Removes a HP StoreVirtual storage snapshot.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP storage systems: HP StoreVirtual
Syntax
Remove-HP4Snapshot -Snapshot <CSanSnapshot[]>
[<CommonParameters>]
Related Commands
Get-HP4Snapshot
Detailed Description
This cmdlet permanently removes the selected HP StoreVirtual storage snapshot from your storage
system.
Alias
Remove-VBRHPSnapshot
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the snapshot(s) you True
want to remove. (ByValue,
Snapshot True Named False
You can assign multiple ByProperty
snapshots to this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
710 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
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
Example 2
This command removes the snapshot represented by the $"snapshot1" variable. The snapshot object
is obtained with Get-HP4Snapshot and assigned to the variable beforehand.
Remove-HP4Snapshot -Snapshot $"snapshot1"
711 | Veeam Backup PowerShell |REFERENCE| REV 2
Remove-HP4Storage
Short Description
Removes a storage from Veeam Backup & Replication.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP storage systems: HP LeftHand P4000, HP StoreVirtual VSA
Syntax
Remove-HP4Storage -Storage <CHpP4Group> [<CommonParameters>]
Related Commands
Get-HP4Storage
Detailed Description
This cmdlet removes the selected storage from Veeam Backup & Replication.
The storage is not deleted from server. When you remove a storage, you stop managing it via your
Veeam Backup & Replication console.
Alias
Remove-VBRHPStorage
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the storage you want (ByValue,
Storage True Named False
to remove. ByProperty
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
712 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
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
Example 2
This command removes the storage represented by the $"store01" variable. The storage object is
obtained with Get-HP4Storage and assigned to the variable beforehand.
Remove-HP4Storage -Storage $"store01"
713 | Veeam Backup PowerShell |REFERENCE| REV 2
Sync-HP4Storage
Short Description
Rescans a HP StoreVirtual storage.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP storage systems: HP StoreVirtual
Syntax
Sync-HP4Storage -Storage <CHpP4Group> [<CommonParameters>]
Related Commands
Get-HP4Storage
Detailed Description
This cmdlet rescans the selected HP StoreVirtual 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
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
True
Specifies the storage you want (ByValue,
Storage True Named False
to synchronize. ByProperty
Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
714 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
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
Example 2
This command synchronizes the storage named "HP Store 01". The storage object is obtained with
Get-HP4Storage and assigned to the variable beforehand.
Sync-HP4Storage -Storage $"HP Store 01"
715 | Veeam Backup PowerShell |REFERENCE| REV 2
Sync-HP4Volume
Short Description
Rescans a HP StoreVirtual storage volume.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
HP storage systems: HP StoreVirtual
Syntax
Sync-HP4Volume -Volume <CSanVolume[]> [<CommonParameters>]
Related Commands
Get-HP4Volume
Detailed Description
This cmdlet rescans the selected HP StoreVirtual storage 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 storage.
Alias
Sync-VBRHPVolume
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the volume(s) you True
want to synchronize. (ByValue,
Volume True Named False
You can assign multiple ByProperty
volumes to this object. Name)
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
716 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command synchronizes the volume named "HP Vol 01". The volume object is obtained with Get-
HP4Volume and assigned to the variable beforehand.
Get-HP4Volume -Name "HP Vol 01" | Sync-HP4Volume
Example 2
This command synchronizes the volume named "HP Vol 01". The storage object is obtained with Get-
HP4Volume and piped down.
Sync-HP4Volume -Volume $"HP Vol 01"
717 | Veeam Backup PowerShell |REFERENCE| REV 2
Veeam Endpoint Backup
Veeam PowerShell enables operations within the Endpoint backup integration with Veeam Backup &
Replication.
From your command line, you can perform the following tasks:
• Disable and enable Endpoint jobs.
• Create backup copy jobs with Endpoint backups as source.
• Configure permissions for storing Veeam Endpoint Backups on the backup repository.
With Veeam PowerShell, you cannot create, start or stop Endpoint backup jobs and system restore
operations.
Endpoint Backup Cmdlets
Operations Cmdlet
Configure user access permissions
Looks for currently set permissions Get-VBREPPermission
Modifies permissions Set-VBREPPermission
Manage Endpoint jobs
Looks for existing Endpoint jobs Get-VBREPJob
Disables Endpoint jobs Disable-VBREPJob
Enables Endpoint jobs Enable-VBREPJob
Create backup copy jobs for endpoint backups
Creates Endpoint backup copy jobs Add-VBREPBackupCopyJob
Check Endpoint jobs sessions
Looks for Endpoint jobs sessions Get-VBREPSession
Restore files from Endpoint backups
Starts file level restore session Start-VBRWindowsFileRestore
Endpoint Backup Objects
Veeam PowerShell uses the following object to manage Endpoint backup operations:
Object Description
Contains Endpoint job VBREPJob
Contains backup repository permissions VBREPPermission
718 | Veeam Backup PowerShell |REFERENCE| REV 2
Add-VBREPBackupCopyJob
Short Description
Creates an Endpoint backup copy job.
Syntax
This cmdlet provides two parameter sets.
For direct data transfer:
Add-VBREPBackupCopyJob -Backup <CBackup[]> -DirectOperation [-
Name <string>] [-Description <string>] [-Repository
<CBackupRepository>] [<CommonParameters>]
For data transfer with WAN accelerators:
Add-VBREPBackupCopyJob -Backup <CBackup[]> -SourceAccelerator
<CWanAccelerator> -TargetAccelerator <CWanAccelerator> [-Name
<string>] [-Description <string>] [-Repository
<CBackupRepository>] [<CommonParameters>]
Related Commands
Get-VBRBackup
Get-VBRBackupRepository
Get-VBRWANAccelerator
Detailed Description
This cmdlet creates a backup copy job for Endpoint backups.
The backup copy job is copying Endpoint backup files from the source backup repository to the target
backup repository. The backup copy job runs continuously synchronizing the backup repositories in
user-defined time periods.
The cmdlet provides two parameters sets that can be used for on-site and off-site modes:
• Direct data transfer
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.
• Data transfer with WAN accelerators
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). You should always use
a pair of WAN accelerators set on 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. WAN optimization is available
only in Veeam Backup & Replication Enterprise Plus Edition.
Note that the backup copy job is created in disabled state. Run Enable-VBRJob to start the job running
on the defined schedule.
719 | Veeam Backup PowerShell |REFERENCE| REV 2
Return Type
CBackupJob or VBREPJob
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the existing
Endpoint backup(s) you True (by Value
want to copy. FromPipeline,
Backup True Named False
ValueFromPipeline
You can assign multiple ByPropertyName)
backups to this object.
Specifies the name you
want to assign to the
backup copy job.
You can input string up
Name to 255 symbols. False Named False False
If not set, Veeam Backup
& Replication will assign
a default backup copy
job name.
Specifies the description
of the backup copy job.
Description If not set, Veeam Backup False Named False False
& Replication will enter
date and time of creation
by default.
Specifies the backup
repository to where you
want to copy the data.
Accepts the backup
repository object or
Repository string type (repository
name).
If not set, Veeam Backup
& Replication will use the
default backup
repository.
Used to set the direct
data transfer.
Enables direst operation
method sending the data
directly to the target
backup repository
Direct without performing data
True
Operation deduplication.
If you select the direct
operation mode, the -
TargetAccelerator and -
SourceAccelerator
parameters should be
omitted.
720 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Used to set data transfer
with WAN accelerators.
Specifies the WAN
accelerator on the source
side.
Source Remember to set the pair
of source and target True Named False False
Accelerator
WAN accelerators.
If you select the mode
using WAN accelerators,
the -DirectOperation
parameter should be
omitted.
Used to set data transfer
with WAN accelerators.
Specifies the WAN
accelerator on the target
side.
Target Remember to set the pair
of source and target True Named False False
Accelerator
WAN accelerators.
If you select the mode
using WAN accelerators,
the -DirectOperation
parameter should be
omitted.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command creates a backup copy job using the direct operation method.
• The Endpoint backup is obtained with Get-VBRBackup and assigned to the '$EPbackup'
variable.
• The target backup repository is obtained with Get-VBRBackupRepository and assigned to the
'$repository' variable.
PS C:\PS> $EPbackup = Get-VBRBackup -Name 'Backup Job
Mediaserver'
PS C:\PS> $repository = Get-VBRBackupRepository -Name 'WinLocal'
PS C:\PS> Add-VBREpBackupCopyJob -Name "Mediaserver Endpoint" -
Description "Mediaserver Endpoint Backup Copy Job" -Backup
$EPbackup -DirectOperation -Repository $repository
721 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 2
This command creates a backup copy job using WAN accelerators.
• The Endpoint backup is obtained with Get-VBRBackup and piped down.
• The target backup repository is obtained with Get-VBRBackupRepository and assigned to the
'$repository' variable.
• The source and target WAN accelerators are obtained with Get-VBRWANAccelerator and
assigned to $wansource and $wantarget variables accordingly.
PS C:\PS> $repository = Get-VBRBackupRepository -Name 'WinLocal'
PS C:\PS> $wansource = Get-VBRWANAccelerator -Name "Backup WAN
Sydney"
PS C:\PS> $wantarget = Get-VBRWANAccelerator -Name "Backup WAN
London"
PS C:\PS> Get-VBRBackup -Name 'Backup Job Mediaserver' | Add-
VBREPBackupCopyJob -Name "Mediaserver Endpoint" -Description
"Mediaserver Endpoint Backup Copy Job" -Repository $repository -
SourceAccelerator $wansource -TargetAccelerator $wantarget
722 | Veeam Backup PowerShell |REFERENCE| REV 2
Disable-VBREPJob
Short Description
Disables Endpoint job.
Syntax
Disable-VBREPJob -Job <VBREPJob[]> [<CommonParameters>]
Related Commands
None
Return Type
VBREPJob[]
Detailed Description
This cmdlet disables a Veeam Endpoint backup job.
When you disable a job, you temporarily put it on hold. The job and its settings are not deleted from
Veeam Backup & Replication. You can enable the job at any time by running Enable-VBREPJob.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the
Endpoint backup job you True (by Value
want to disable. FromPipeline,
Job True Named False
ValueFromPipeline
You can assign multiple ByPropertyName)
names to this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
723 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command disables an Endpoint job represented by the '$MediaserverEP' variable. The job is
obtained with Get-VBREPJob and assigned to the variable beforehand.
PS C:\PS> $MediaserverEP = Get-VBREPJob -Name 'Backup Job
Mediaserver'
PS C:\PS> Disable-VBREPJob -Job $MediaserverEP
Example 2
This command disables an Endpoint job named 'Backup Job Mediaserver'. The job is obtained with
Get-VBREPJob and piped down.
Get-VBREPJob -Name 'Backup Job Mediaserver' | Disable-VBREPJob
724 | Veeam Backup PowerShell |REFERENCE| REV 2
Enable-VBREPJob
Short Description
Enables a disabled Endpoint job.
Syntax
Enable-VBREPJob -Job <VBREPJob[]> [<CommonParameters>]
Related Commands
None
Return Type
VBREPJob[]
Detailed Description
This cmdlet enables a Veeam Endpoint backup job that was previously disabled.
When you disable a job, you put it on hold until you enable it with this cmdlet. You can disable a job
by running Disable-VBRJob.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the
Endpoint backup job you True (by Value
want to enable. FromPipeline,
Job True Named False
ValueFromPipeline
You can assign multiple ByPropertyName)
names to this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
725 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command enables an Endpoint job represented by the '$MediaserverEP' variable. The job is
obtained with Get-VBREPJob and assigned to the variable beforehand.
PS C:\PS> $MediaserverEP = Get-VBREPJob -Name 'Backup Job
Mediaserver'
PS C:\PS> Enable-VBREPJob -Job $MediaserverEP
Example 2
This command enables an Endpoint job named 'Backup Job Mediaserver'. The job is obtained with
Get-VBREPJob and piped down.
Get-VBREPJob -Name 'Backup Job Mediaserver' | Enable-VBREPJob
726 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBREPJob
Short Description
Returns Endpoint backup jobs.
Syntax
Get-VBREPJob [<CommonParameters>]
-OR-
Get-VBREPJob [-Name <string[]>] [<CommonParameters>]
-OR-
Get-VBREPJob [-Id <guid[]>] [<CommonParameters>]
Related Commands
None
Return Type
VBREPJob[]
Detailed Description
This cmdlet returns the list of Veeam Endpoint backup jobs stored in Veeam Backup & Replication
database.
You can get the list of all Endpoint backup jobs or search for instances directly by name or ID. Use an
appropriate parameter set for each case.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the
Endpoint backup job you want to
Name get or search conditions. False Named False True
You can assign multiple names to
this object.
Specifies the ID of the VBREPJob
object you want to add to the
failover plan.
Id False Named False False
Accepts GUID or string type.
You can assign multiple IDs to this
object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
727 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command gets the list of all Endpoint backup jobs.
Get-VBREPJob
Example 2
This command gets an Endpoint backup job named 'Backup Job Mediaserver'.
Get-VBREPJob -Name 'Backup Job Mediaserver'
728 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBREPPermission
Short Description
Returns user access permissions for backup repositories used by Endpoint backup jobs.
Syntax
Get-VBREPPermission -Repository <CBackupRepository>
[<CommonParameters>]
Related Commands
Get-VBRBackupRepository
Return Type
VBREPPermission
Detailed Description
This cmdlet returns the user access permissions for a backup repository that is used as a target by
Endpoint backup jobs.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the repository
for which you want to
get permissions.
Accepts the backup True (by Value
repository object or FromPipeline,
Repository True Named False
string type (repository ValueFromPipeline
name). ByPropertyName)
You can assign multiple
repositories to this
object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
729 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command looks for permissions set to a backup repository named 'WinLocal'. The repository is
obtained with Get-VBRBackupRepository and assigned to the '$repository' variable beforehand.
PS C:\PS> $repository = Get-VBRBackupRepository -Name 'WinLocal'
PS C:\PS> Get-VBREPPermission -Repository $repository
RepositoryId : 88788f9e-d8f5-4eb4-bc4f-9b3f5403bcec
PermissionType : Everyone
Users : {}
IsEncryptionEnabled : False
EncryptionKey :
Example 2
This command looks for the 'WinLocal' repository permissions. The repository is obtained with Get-
VBRBackupRepository and piped down.
Get-VBRBackupRepository -Name 'WinLocal' | Get-VBREPPermission
RepositoryId : 88788f9e-d8f5-4eb4-bc4f-9b3f5403bcec
PermissionType : Everyone
Users : {}
IsEncryptionEnabled : False
EncryptionKey :
730 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBREPSession
Short Description
Returns Endpoint backup jobs session.
Syntax
Get-VBREPSession [<CommonParameters>]
-OR-
Get-VBREPSession [-Name <string[]>] [<CommonParameters>]
Related Commands
None
Return Type
VBRSession[]
Detailed Description
This cmdlet returns the list of Veeam Endpoint backup job sessions that have been run.
You can get the list of all Endpoint backup job sessions or search for instances directly by name. Use
an appropriate parameter set for each case.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the name of the
Endpoint backup job for which
Name you want to get the sessions. False Named False True
You can assign multiple names to
this object.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This command gets the list of all Endpoint backup jobs sessions.
Get-VBREPSession
Example 2
This command gets the list of sessions of an Endpoint backup job named 'Backup Job Mediaserver'
Get-VBREPSession -Name 'Backup Job Mediaserver'
731 | Veeam Backup PowerShell |REFERENCE| REV 2
Set-VBREPPermission
Short Description
Applies user access permissions to backup repositories used by Endpoint backup jobs.
Syntax
Set-VBREPPermission -Repository <CBackupRepository> [-Type
<VBREPPermissionType> {Everyone | NoOne | OnlySelectedUsers}] [-
User <string[]>] [-EnableEncryption] [-EncryptionKey
<VBREncryptionKey>] [-PassThru] [<CommonParameters>]
Related Commands
Get-VBRBackupRepository
Get-VBREncryptionKey
Return Type
VBREPPermission
Detailed Description
This cmdlet applies user access permissions to a selected repository for writing Endpoint backup jobs
data.
By default, the backup repositories are configured to have no permissions for writing Endpoint
backups. To start using a Veeam backup repository as target for Endpoint backups, you need to
change the access permissions to Everyone or OnlySelectedUsers. The OnlySelectedUsers option
allows you to submit usernames or names of Active Directory groups.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the repository
for which you want to set
permissions.
Accepts the backup True (by Value
repository object or FromPipeline,
Repository True Named False
string type (repository ValueFromPipeline
name). ByPropertyName)
NOTE: You cannot use
cloud repositories for
Endpoint backups.
Specifies the type of the
permission: Everyone,
NoOne,
OnlySelectedUsers.
Type False Named False False
Set the selected users
with the User parameter.
If not set, Veeam Backup
& Replication will use the
732 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
permissions type that is
currently set for the
selected repository.
Used to set users for
OnlySelectedUsers
option of the Type
parameter.
Specifies names of users
User False Named False False
allowed to use the
repository for Endpoint
backups, or AD user
groups.
Accepts string type.
Indicates that the
repository must encrypt
the Endpoint backups
Enable written to it. False Named False False
Encryption
Use the EncryptionKey
parameter to specify the
encryption key.
Used to specify the
encryption key for the
Encryption EnableEncryption
parameter. False Named False False
Key
Accepts PSCryptoKey
object.
Indicates that the
command returns the
PassThru output object to the False Named False False
Windows PowerShell
console.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
733 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command sets permission to access WinLocal repository to administrator.
• The repository is obtained by Get-VBRBackupRepository and assigned to the '$repository'
variable.
• The type of permission is set to 'OnlySelectedUsers' and the User parameter is used to
indicate the Veeam administrators as permitted users.
• The encryption is not set.
• The PassThru parameter is set to view the command output.
PS C:\PS> $repository = Get-VBRBackupRepository -Name 'WinLocal'
PS C:\PS> Set-VBREPPermission -Repository $repository -Type
OnlySelectedUsers -User "VEEAM\Administrator1",
"VEEAM\Administrator2" -PassThru
RepositoryId : 88788f9e-d8f5-4eb4-bc4f-9b3f5403bcec
PermissionType : OnlySelectedUsers
Users : {VEEAM\Administrator1, VEEAM\Administrator2}
IsEncryptionEnabled : False
EncryptionKey :
Example 2
This command enables encryption for WinLocal repository.
• The encryption key is obtained with Get-VBREncryptionKey and assigned to an
'$encryptionkey' variable.
• The repository is obtained by Get-VBRBackupRepository and piped down.
• The EnableEncryption switch and the EncryptionKey parameter are used to enable
encryption.
• The PassThru parameter is set to view the command output.
PS C:\PS> $encryptionkey = Get-VBREncryptionKey -Description
"Veeam Administrator"
PS C:\PS> Get-VBRBackupRepository -Name 'WinLocal' | Set-
VBREPPermission -EnableEncryption -EncryptionKey $encryptionkey -
PassThru
RepositoryId : 88788f9e-d8f5-4eb4-bc4f-9b3f5403bcec
PermissionType : OnlySelectedUsers
Users : {VEEAM\Administrator}
IsEncryptionEnabled : True
EncryptionKey : ac87709d-b1a9-4c2e-8d55-557f8e49f639
734 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 3
This command sets both user access permissions and encryption for WinLocal repository.
• The encryption key is obtained with Get-VBREncryptionKey and assigned to an
'$encryptionkey' variable.
• The repository is obtained by Get-VBRBackupRepository and piped down.
• The type of permission is set to 'Everyone'.
• The EnableEncryption switch and the EncryptionKey parameter with the '$encryptionkey'
variable are used to enable encryption.
• The PassThru parameter is set to view the command output.
PS C:\PS> $encryptionkey = Get-VBREncryptionKey -Description
"Veeam Administrator"
PS C:\PS> Get-VBRBackupRepository -Name 'WinLocal' | Set-
VBREPPermission -Type Everyone -EnableEncryption -EncryptionKey
$encryptionkey -PassThru
RepositoryId : 88788f9e-d8f5-4eb4-bc4f-9b3f5403bcec
PermissionType : Everyone
Users : {VEEAM\Administrator}
IsEncryptionEnabled : True
EncryptionKey : ac87709d-b1a9-4c2e-8d55-557f8e49f639
735 | Veeam Backup PowerShell |REFERENCE| REV 2
Start-VBRRestoreVirtualDisks
Short Description
Restores physical disks from Endpoint backups to virtual disk formats.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRRestoreVirtualDisks [-RestorePoint] <COib> [-Server]
<CHost> [-Path] <string> -RestoreDiskType
<EVirtualDiskRestoreType> {Vmdk | Vhd | Vhdx} [-Files
<COIBFileInfo[]>] [-Reason <string>] [-RunAsync]
[<CommonParameters>]
Related Commands
Get-VBRRestorePoint
Get-VBRServer
Get-VBRFilesInRestorePoint
Detailed Description
This cmdlet allows you to restore physical disks from Endpoint volume level backups and convert
them to VMDK, VHDX or VHD format. The data from the backups is restored as a folder to a selected
path.
You can restore disks to any Windows host added to Veeam Backup & Replication.
If the Endpoint backup contains several disks, you can restore specific disks from backup. Use the Files
parameter to select the disks to restore.
For virtual disks restore, run Start-VBRRestoreVMFiles.
Parameters
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the restore
point from which you
want to restore the True (by Value
disks. FromPipeline,
RestorePoint True 1 False
You must select ValueFromPipeline
restore points only ByPropertyName)
from Endpoint
volume level backups.
Specifies the
Windows host to
Server True 2 False False
which the disks
should be restored.
736 | Veeam Backup PowerShell |REFERENCE| REV 2
Accept Accept
Parameter Description Required Position Pipeline Wildcard
Input Characters
Specifies the path to
the folder on the
Path server where the True 3 False False
virtual disks must be
placed.
Specifies the format
to which you want to
RestoreDisk
convert the resulting True Named False False
Type
virtual disk: VHD,
VHDX, VMDK.
Specifies the disks
from the backup you
want to restore. True
Files False Named False
By default, all disks (ByName)
from the backup will
be restored.
Specifies the string
with the reason for
Reason False Named False False
performing the disk
restore.
Indicates that the
command returns
RunAsync immediately without False Named False False
waiting for the task to
complete.
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about
common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
737 | Veeam Backup PowerShell |REFERENCE| REV 2
Example 1
This command restores all disks from an SRV03 Endpoint backup to Veeam backup server. The disks
are restored to the latest restore point. The resulting format is VMDK.
• The Veeam backup server is obtained by Get-VBRLocalhost and assigned to the '$server'
variable.
• The restore point is obtained by Get-VBRRestorePoint. The restore points are filtered with
Sort-Object method by the "CreationTime" property to get the most recent one. The restore
point is assigned to the '$restorepoint' variable.
• The path to the folder where files will be saved is ''C:\SRV03_Restored'.
• The RestoreDiskType is set to 'Vmdk'.
• The RunAsync parameter is set to bring the process to the background.
PS C:\PS> $server = Get-VBRLocalhost
PS C:\PS> $restorepoint = Get-VBRBackup -Name "Backup Job SRV03"
| Get-VBRRestorePoint | Sort-Object -Property CreationTime |
Select-Object -First 1
PS C:\PS> Start-VBRRestoreVirtualDisks -RestorePoint
$restorepoint -Server $server -Path "C:\SRV03_Restored" -
RestoreDiskType Vmdk -RunAsync
Example 2
This command restores selected disks from an SRV03 computer to a Windows server added to Veeam
Backup & Replication. The disks are restored to the latest restore point. The resulting format is VHDX.
• The restore point is obtained with Get-VBRRestorePoint. First, all Hyper-V backups are
selected by filtering all backups with ".BackupPlatform" property. Then, the available restore
points are filtered by the 'SRV03' name by '.Type' property. Then the restore points are sorted
with Sort-Object method by the "CreationTime" property to get the most recent one.
• The target server is obtained with Get-VBRServer and assigned to the '$server' variable.
• The path to the folder where files will be saved is ''C:\SRV03_Restored'.
• The RestoreDiskType is set to 'Vhdx'.
• The disks in the backup are obtained with Get-VBRFilesInRestorePoint and assigned to the
'$disks' variable. The needed disks 1 and 3 will be restored.
• The RunAsync parameter is set to bring the process to the background.
PS C:\PS> $restorepoint = Get-VBRBackup | Where { $_.IsBackup -
and $_.BackupPlatform -eq 'EHyperV' } | Get-VBRRestorePoint |
Where { $_.Name -eq 'SRV03' -and $_.Type -eq 'Full' } | Sort-
Object -Property CreationTime | Select-Object -First 1
PS C:\PS> $server = Get-VBRServer -Type Windows -Name
"Veeam_Remote"
PS C:\PS> $disks = Get-VBRFilesInRestorePoint -RestorePoint
$restorepoint
PS C:\PS> Start-VBRRestoreVirtualDisks -RestorePoint
$restorepoint -Server $server -Path "C:\SRV03_Restored" -
RestoreDiskType Vhdx -Files $disks[1,3] -RunAsync
738 | Veeam Backup PowerShell |REFERENCE| REV 2
VBREPJob
This object contains Endpoint job.
Created by
None
Obtained with
Get-VBREPJob
Passed to
Enable-VBREPJob
Disable-VBREPJob
Remove-VBRJob
Properties
The "?" mark indicates that the type property accepts zero values.
Property Type Description
Unique identifier of backup
RepositoryId GUID repository used to store Endpoint
backups.
ObjectsCount int The number of objects in job.
IsEnabled bool Indicates if the job is enabled.
Date and time of the next job
NextRun DateTime?
run.
Target Object Target repository name.
Type VBRJobType Job type (Endpoint).
The last result of the job:
LastResult VBRSessionResult
None/Success/Warning/Failed.
The last job state: Stopped,
Starting, Stopping, Working,
LastState VBRSessionState Pausing, Resuming, WaitingTape,
Idle, Postprocessing,
WaitingRepository.
Id GUID Unique identifier of the job.
Name string Name of the job.
Description string Description of the job.
739 | Veeam Backup PowerShell |REFERENCE| REV 2
VBREPPermission
This object contains user access permissions for backup repositories used by Endpoint backup jobs.
Created by
None
Obtained with
Get-VBREPPermission
Passed to
None
Properties
Property Type Description
Unique identifier of backup
RepositoryId GUID repository used to store Endpoint
backups.
PermissionType VBREPPermissionType Type of the permission.
Users or user groups allowed to
Users string[]
use the repository.
Indicates if the Endpoint backup
IsEncryptionEnabled bool data written to the repository is
encrypted.
Encryption key used for
EncryptionKey VBREncryptionKey
encrypting data.
740 | Veeam Backup PowerShell |REFERENCE| REV 2
Veeam PowerShell Help
Open Veeam Backup & Replication help in browser.
Operations VMware Hyper-V
Opens Veeam Backup & Replication Get- Get-
online help VBRToolkitDocumentation VBRToolkitDocumentation
741 | Veeam Backup PowerShell |REFERENCE| REV 2
Get-VBRToolkitDocumentation
Short Description
Opens Veeam PowerShell online help.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Get-VBRToolkitDocumentation
Detailed Description
This cmdlet opens online Veeam PowerShell Reference on Veeam Help Center in your default browser.
742 | Veeam Backup PowerShell |REFERENCE| REV 2