This is an archive version of the document. To get the most up-to-date information, see the current version.

Start-VBRWindowsGuestItemRestore

Short Description

Restores Microsoft Windows guest OS files to original location.

Applies to

Platform: VMware

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

Start-VBRWindowsGuestItemRestore -Path <string[]> -Session <CRestoreSession> -RestorePolicy <VBRWindowsGuestItemRestorePolicy> {Keep | Overwrite} [-GuestCredentials <CCredentials>]  [<CommonParameters>]

Detailed Description

This cmdlet restores individual guest OS files from Microsoft Windows VMs snapshots. To restore guest OS files, you need to start the restore session with Start-VBRWindowsFileRestore.

This cmdlet restores files to original location.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Path

Specifies the array of paths of files you want to restore.

Accepts files and folders names.

The file paths must be as in the VM, for example, "C:\Files". Do not write the mount server path here.

True

Named

True (ByValue)

False

Session

Specifies the restore session. The cmdlet will restore files from VM disks mounted within this session.

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

True

Named

False

False

RestorePolicy

Specifies the file restore policy:

  • Keep: the cmdlet will restore the files with the "RESTORED-" prefix next to the original file.
  • Overwrite: the cmdlet will replace the original files with the restored files.

True

Named

False

False

GuestCredentials

Specifies the credentials for the VM. If not specified, the cmdlet will try to use the credentials from the current PowerShell session.

True

Named

False

False

<CommonParameters>

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

Example

This example shows how to restore files from a VM snapshot.

This example assumes that you have a started restore session. The restore session is saved to the $filerestore variable. For details, see Start-VBRWindowsFileRestore.

  1. Run Get-VBRCredentials to get the credentials for the VM. Save the result to the $credentials variable.
  2. Get the mount session of the file restore session. Save it to the $session variable.
  3. Run Start-VBRWindowsGuestItemRestore. Use the $session and the $credentials variables.

$credentials = Get-VBRCredentials -Name "CRM DB Administrator"

$session = Get-VBRRestoreSession | ? {$_.Id -eq $filerestore.MountSession.RestoreSessionInfo.Id}

Start-VBRWindowsGuestItemRestore -Path "C:\Files\" -Session $session -RestorePolicy Keep -GuestCredentials $credentials

Related Commands

Get-VBRRestoreSession

Get-VBRCredentials