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 | Accept |
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:
| 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.
- Run Get-VBRCredentials to get the credentials for the VM. Save the result to the $credentials variable.
- Get the mount session of the file restore session. Save it to the $session variable.
- 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