PowerShell script exchange
Post Reply
jbennett
Enthusiast
Posts: 33
Liked: 12 times
Joined: Jun 23, 2015 3:47 pm
Full Name: Justin Bennett
Location: Los Angeles, CA
Contact:

Start-VBRInstantRecovery - Please Update Documentation

Post by jbennett »

FYI - The second example for

Code: Select all

Get-Help Start-VBRInstantRecovery -examples
and the second example at https://helpcenter.veeam.com/backup/pow ... overy.html depicts the PowerUp and NICsEnabled parameters incorrectly as

Code: Select all

-PowerUp $TRUE
and

Code: Select all

-NICsEnabled $TRUE
instead of

Code: Select all

-PowerUp:$TRUE
and

Code: Select all

-NICsEnabled:$TRUE
. This spun me for a few minutes trying to figure out the error at the command-line until I saw working examples in the forum using the colon symbol.

Code: Select all

PS C:\Users\jbennett> $VMs_to_Restore | % {
>> Start-VBRInstantRecovery -RestorePoint $_ -VMName "Test_$($_.Name)" -Server $ESXiHost -ResourcePool $ESXiPool -Datastore $ESXiDatastore -Folder $ESXiFolder -PowerUp $VM_PowerUp -NICsEnabled $VM_NIC
sEnabled -Reason $VBR_InstantRestoreReason
>> }
>>
Start-VBRInstantRecovery : A positional parameter cannot be found that accepts argument 'False'.
At line:2 char:1
+ Start-VBRInstantRecovery -RestorePoint $_ -VMName "Test_$($_.Name)" -Server $ESX ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Start-VBRInstantRecovery], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Veeam.Backup.PowerShell.Command.StartVBRInstantRecovery

Start-VBRInstantRecovery : A positional parameter cannot be found that accepts argument 'False'.
At line:2 char:1
+ Start-VBRInstantRecovery -RestorePoint $_ -VMName "Test_$($_.Name)" -Server $ESX ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Start-VBRInstantRecovery], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Veeam.Backup.PowerShell.Command.StartVBRInstantRecovery

...

Code: Select all

PS C:\Users\jbennett> get-help Start-VBRInstantRecovery -examples

NAME
    Start-VBRInstantRecovery

SYNOPSIS
    Starts VMware Instant VM Recovery.

    --------------  Example 1 --------------

    C:\PS>Get-VBRBackup -Name "MSExchange Backup" | Get-VBRRestorePoint | Select -Last 1 | Start-VBRInstantRecovery -Server $server


    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.




    --------------  Example 2 --------------

    C:\PS>Start-VBRInstantRecovery -RestorePoint $restorepoint -VMName "MSExchange_Restored" -Server $server -ResourcePool $pool -Datastore $store -Folder "C:\Restored" -PowerUp $TRUE -NICsEnabled
    $TRUE -Reason "Data recovery" -RunAsync


    This command restores the VM to another location and with different settings.

    - 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.
Thank you!
Justin
-Justin
[@cajeeper]|[http://www.allthingstechie.net]
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Start-VBRInstantRecovery - Please Update Documentation

Post by veremin »

The feedback has been passed to technical writers, thank you.

Also, you can submit your feedback directly to the responsible team, leveraging "submit feedback" button (any page on the help center, bottom right).

Thanks.
jbennett
Enthusiast
Posts: 33
Liked: 12 times
Joined: Jun 23, 2015 3:47 pm
Full Name: Justin Bennett
Location: Los Angeles, CA
Contact:

Re: Start-VBRInstantRecovery - Please Update Documentation

Post by jbennett »

Thank you!
-Justin
[@cajeeper]|[http://www.allthingstechie.net]
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 10 guests