Stop-VBRWindowsGuestItemRestore

Short Description

Stops Windows guest OS file restore session initiated with the Start-VBRWindowsGuestItemRestore cmdlet.

Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

Stop-VBRWindowsGuestItemRestore -ItemSession <VBRItemSession>  [<CommonParameters>]

Detailed Description

Stops Windows guest OS file restore session initiated with the Start-VBRWindowsGuestItemRestore cmdlet.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

ItemSession

Specifies the running Windows guest OS file restore session that you want to stop.

Accepts the VBRItemSess Start-VBRWindowsGuestItemRestore ion object. To get this object, run the  cmdlet with the RunAsync parameter set.

True

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Output Object

None.

Examples

This example shows how to stop a restore session for Windows VM guest OS files. During the session, files are restored to the specified folder.

$backup = Get-VBRBackup

$restorepoint = Get-VBRRestorePoint -Backup $backup -Name "Production VM"

$session = Start-VBRWindowsFileRestore -RestorePoint $restorepoint

$restoresession = Start-VBRWindowsGuestItemRestore -Path "C:\Files\" -FileRestore $session -RestorePolicy Keep -RunAsync

Stop-VBRWindowsGuestItemRestore -ItemSession $restoresession

Perform the following steps:

  1. Run Get-VBRBackup to get a backup that contains files which you want to restore. Save the result to the $backup variable.
  2. Run Get-VBRRestorePoint with the $backup variable to get a restore point of a VM. Use the Name parameter to specify the VM name. Save the result to the $restorepoint variable.
  3. Run Start-VBRWindowsFileRestore with the $restorepoint variable. Save the result to the $session variable.
  4. Run Start-VBRWindowsGuestItemRestore and save the result to the $restoresession variable. Specify the following settings:
  1. Specify the Path parameter.
  2. Set the $session variable as the FileRestore parameter value.
  3. Specify the RestorePolicy parameter.
  4. Specify the RunAsync parameter.
  1. Run the Stop-VBRWindowsGuestItemRestore cmdlet. Set the $restoresession variable as the ItemSession parameter value.