Help Center
Choose product document...
Veeam Backup & Replication 9.5
PowerShell Reference

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 (by Value
FromPipeline)

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 about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

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.

PS C:\PS> $credentials = Get-VBRCredentials -Name "CRM DB Administrator"

PS C:\PS> $session = Get-VBRRestoreSession | ? {$_.Id -eq $filerestore.MountSession.RestoreSessionInfo.Id}

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

Related Commands

Get-VBRRestoreSession

Get-VBRCredentials

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation