Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Restore-DPMRecoverableItem

Restore-DPMRecoverableItem

Restores a version of the data source to a target location.

Syntax

Parameter Set: Default
Restore-DPMRecoverableItem [-RecoveryOption] <RecoveryOptions> [[-RecoverableItem] <RecoverableObject[]> ] [-AdhocJobsContext <AdhocJobsContext> ] [-JobStateChangedEventHandler <JobStateChangedEventHandler> ] [-RecoveryNotification <NotificationObject> ] [-RecoveryPointLocation <RecoverySourceLocation[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Restore-DPMRecoverableItem cmdlet recovers a point in time version of a data source (recovery point), or a child recoverable item within it, to the target location.

Parameters

-AdhocJobsContext<AdhocJobsContext>

Specifies the context details of the ad hoc job. Do not use this parameter from the Windows PowerShell command line.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobStateChangedEventHandler<JobStateChangedEventHandler>

Specifies an event handler for Job.StateChanged events. You can use this parameter to update a GUI that runs in Windows PowerShell, but do not use it in the Windows PowerShell console.


Aliases

Handler

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RecoverableItem<RecoverableObject[]>

Specifies a recoverable item object. This is a child item within a recovery point that is recoverable. For example, a Windows file system share or volume, a Microsoft SQL Server database, a Microsoft Exchange storage group, Microsoft SharePoint, Microsoft Virtual Machine, a Microsoft DPM database, system state or a recovery point.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-RecoveryNotification<NotificationObject>

Specifies a notification to send when recovery is finished. You can use the New-DPMRecoveryNotification cmdlet to create a notification object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RecoveryOption<RecoveryOptions>

Specifies the recovery options for the data source. You can use the New-DPMRecoveryOption cmdlet to create recovery options.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-RecoveryPointLocation<RecoverySourceLocation[]>

Specifies an array of recovery point locations. To obtain a recovery point location object, use the Get-DPMRecoveryPointLocation cmdlet. You need to specify the location of a recovery point if a recovery item exists in more than one recovery point.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Notes

  • For more information, type "Get-Help Restore-DPMRecoverableItem -detailed".

Examples

Example 1: Restore a version of a data source to a target location

This example restores a version of a Hyper-V data source to a recovery location.

The first command gets the protection group on the DPM server named DPMServer02 and stores the results in the $Pg variable.

The second command gets the list of data sources for the first protection group in the collection stored in the $Pg variable. The command stores the results in the $Ds variable.

The third command gets the recovery point for the first data source object stored in the $Ds array, and passes it to the Sort-Object cmdlet by using the pipe operator. The Sort-Object cmdlet sorts the collection of recovery points in descending order of the date and time value of the RepresentedPointInTime property. The Select-Object cmdlet selects the first recovery point from the collection and stores it in the $RecoveryObject variable.

The fourth command creates a recovery option for a Hyper-V data source on the server named HVDCenter02. The command specifies AlternateHyperVServer as the recovery location and specifies that DPM stores the replica of the data source in c:\VMRecovery. The command stores the recovery option in the $RecoveryOption variable.

The fifth command restores the data source stored in the $RecoveryObject variable by using the recovery option stored in the $RecoveryOption variable.


PS C:\> $Pg = Get-DPMProtectionGroup –DPMServerName "DPMServer02"
PS C:\> $Ds = Get-DPMDatasource -ProtectionGroup $Pg[0]
PS C:\> $RecoveryObject = Get-DPMRecoverypoint -Datasource $Ds[0] | Sort -Property RepresentedPointInTime -Descending | Select-Object -First 1
PS C:\> $RecoveryOption = New-DPMRecoveryOption -HyperVDatasource -TargetServer "HVDCenter02" -RecoveryLocation AlternateHyperVServer -RecoveryType Recover -TargetLocation “c:\VMRecovery”
PS C:\> Restore-DPMRecoverableItem -RecoverableItem $RecoveryObject -RecoveryOption $RecoveryOption

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft