Add-VBRComputerRecoveryToken
Short Description
Creates tokens for bare-metal recovery.
Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
|
Add-VBRComputerRecoveryToken -Backup <CBackup[]> [-ExpirationDate <DateTime>] [-FriendlyName <String>] [<CommonParameters>] |
Detailed Description
This cmdlet creates tokens that you can use to perform bare-metal recovery. You can create tokens only for backups of computers created by Veeam Agent.
Important |
|
You can not create tokens for Veeam Agent backups located in Veeam Cloud Connect repositories. |
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
Backup |
Specifies an array of backups. The cmdlet will use a token to perform bare-metal recovery from these backups. |
|
True |
Named |
True (ByPropertyName, ByValue) |
|
ExpirationDate |
Specifies the expiration date of a token. |
|
False |
Named |
False |
|
FriendlyName |
Specifies a token friendly name. The cmdlet will create a token with this name. If you do not specify a friendly name, the cmdlet will create a default friendly name. |
|
False |
Named |
False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Output Object
This cmdlet returns the VBRComputerRecoveryToken object that contains tokens for bare-metal recovery.
Examples
Creating Token for Bare-Metal Recovery
This example shows how to create a token that you can use to perform bare-metal recovery. The friendly name is Win2049 token and the token will expire on 02.18.2023 at 12.00.00 AM.
|
$backup = Get-VBRBackup $expirationDate = Get-Date -Year 2023 -Month 2 -Day 18 -Hour 0 -Minute 0 -Second 0 Add-VBRComputerRecoveryToken -Backup $backup[3] -ExpirationDate $expirationDate -FriendlyName "Win2049 token" Name : Recovery token 2022-10-18T23:29:07.992 for Backup Job 1 RecoveryToken : EBe0-7e8e-72a6-3Eb2 ExpirationDate : 2/18/2023 12:00:00 AM Backup : {Backup Job 1} FriendlyName : Win2049 token |
Perform the following steps:
- Run the
Get-VBRBackupReturns backups. cmdlet. Save the result to the$backupvariable. - Run the
Get-Datecmdlet. Specify theYear,Month,Day,Hour,MinuteandSecondparameter values. Save the result to the$expirationDatevariable. - Run the
Add-VBRComputerRecoveryTokencmdlet. Set the$backupvariable as theBackupparameter value. Set the$expirationDatevariable as theExpirationDateparameter value. Specify theFriendlyNameparameter value.The
Get-VBRBackupcmdlet will return an array of backups. Mind the ordinal number of the necessary backup (in our example, it is the fourth backup in the array).The cmdlet output will contain the following details on the token:
Name,RecoveryToken,ExpirationDate,BackupandFriendlyName.
Related Commands
Get-VBRBackupReturns backups.Get-Date