Created
January 3, 2017 14:25
-
-
Save anonymous/87826d9f4b8a2c59412cd968e4e33c80 to your computer and use it in GitHub Desktop.
Restoring a Hyperv Backup in DPM using powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$DPMServer = "DPMServer1" ## Enter the DPM Server Name | |
$Agent_Hostname = "Agent" ## Enter the AGENT Server Hostname | |
$Protection_GroupName = "Hyper-V" ## Enter the Protection Group Name | |
$Protection_ObjectName = "Test-DPMBackup" ## Enter the Protection object Name, Files are present inside it that needs to be recovered. If I double click on | |
it will show NEW VOLUME then D:\Inetpub or something, I need to recover this Inetpub folder only ## | |
# Task 1 : Selecting the Specific Protection Group | |
$PGroup = Get-DPMProtectionGroup -DPMServerName $DPMServer | |
$PGroup = $PGroup | ?{$_.Name -eq $Protection_GroupName } | |
# Task 2 : Selecting the Specific Protection Object | |
$PObjects = Get-DPMDatasource -ProtectionGroup $PGroup | |
$PObjects = $PObjects | ?{$_.Name -eq $Protection_ObjectName} | |
$RPoint = Get-DPMRecoveryPoint -Datasource $PObjects | Sort -Property RepresentedPointInTime -Descending | Select-Object -First 1 | |
$ROption = New-DPMRecoveryOption -HyperVDataSource -TargetServer $DPMServer -RecoveryLocation CopyToFolder -TargetLocation "C:\BackupTemp\" -RecoveryType restore | |
Restore-DPMRecoverableItem -RecoverableItem $RPoint -RecoveryOption $ROption |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment