Start-VBRWindowsGuestItemRestore

In this article

    Short Description

    Starts a restore of Microsoft Windows guest OS files to the original machine.

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

    Syntax

    Start-VBRWindowsGuestItemRestore -Path <String[]> -Session <CRestoreSession> -RestorePolicy <VBRWindowsGuestItemRestorePolicy> [-GuestCredentials <CCredentials>] [<CommonParameters>]

    Detailed Description

    This cmdlet starts to restore Microsoft Windows guest OS files to the original machine.

    Note

    To restore guest OS files, you need to start the restore session by running the Start-VBRWindowsFileRestore cmdlet.

    Parameters

    Parameter

    Description

    Type

    Required

    Position

    Accept Pipeline Input

    Path

    Specifies an array of file paths that you want to restore.

    Note: The parameter does not accept the mount server path.

    String[]

    True

    Named

    True (ByValue,
    ByProperty
    Name)

    Item

    Specifies an array of files and folders that are available on disks of Microsoft Windows machines. The cmdlet will restore these files and folders.

    Accepts the VBRFLRFsItem[] object. To create this object, run the Get-VBRWindowsGuestItem cmdlet.

    True

    Named

    True (ByValue,
    ByProperty
    Name)

    Session

    Specifies a restore session of Microsoft Windows guest OS files. The cmdlet will use this session to restore guest OS files.

    Note: The restore session must be started within the current PowerShell session.

    Accepts the CRestoreSession object. To create this object, run the Start-VBRWindowsFileRestore cmdlet.

    True

    Named

    False

    RestorePolicy

    Specifies the file restore policy:

    • Keep: Use this option if you want to restore the files with the _restored postfix next to the original file.
    • Overwrite: Use this option if you want to replace the original files with the restored files.

    VBRRestorePolicy

    True

    Named

    False

    GuestCredentials

    Specifies the credentials for the target machine.

    Note: If you do not specify credentials, the cmdlet will try to use the credentials from the current PowerShell session.

    Accepts the CCredentials object. To create this object, run the Get-VBRCredentials cmdlet.

    False

    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

    Restoring Windows Guest OS File to Original Windows Machine

    This example shows how to restore the January.xlsx file by specifying the C:\Projects\2020\January.xlsx file path. The cmdlet will restore the file to the original WinSrv25 Windows machine.

    $backup = Get-VBRBackup -Name "WinSrv25"

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

    Start-VBRWindowsFileRestore -RestorePoint $restorepoint

    $session = Get-VBRRestoreSession

    Start-VBRWindowsGuestItemRestore -Path "C:\Projects\2020\January.xlsx" -Session $session[0] -RestorePolicy Overwrite

    Perform the following steps:

    1. Run the Get-VBRBackup cmdlet. Specify the Name parameter value. Save the result to the $backup variable
    2. Run the Get-VBRRestorePoint cmdlet. Specify the Backup and Name parameter values. Save the result to the $restorepoint variable.
    3. Run the Start-VBRWindowsFileRestore cmdlet. Specify the RestorePoint parameter value.
    4. Run the Get-VBRRestoreSession cmdlet. Save the result to the $session variable.
    5. Run the Start-VBRWindowsGuestItemRestore cmdlet. Specify the following settings:
    • Provide the Path parameter value.
    • Set the $session[0] variable as the Session parameter value.

    The Start-VBRWindowsFileRestore cmdlet will return an array of active restore sessions. Mind the ordinal number of the necessary restore session (in our example, it is the first restore session in the array).

    • Specify the RestorePolicy parameter value.

    Related Commands