Add-DPMRecoveryItem

Add-DPMRecoveryItem

Identifies recoverable items.

Syntax

Parameter Set: Datasources
Add-DPMRecoveryItem [-DpmRole] <DpmRole> [-Type] <AmDatasourceType> {SqlDatabase | SqlInstance | Client} [-Datasources] <SQLDataSource[]> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SqlInstances
Add-DPMRecoveryItem [-DpmRole] <DpmRole> [-Type] <AmDatasourceType> {SqlDatabase | SqlInstance | Client} [-SqlInstances] <String[]> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Add-DPMRecoveryItem cmdlet identifies the recoverable items that members of a System Center 2012 – Data Protection Manager (DPM) role can recover.

Parameters

-Datasources<SQLDataSource[]>

Specifies an array of data source objects. Data source objects include the following:

-- Windows file system share or volume.
-- Microsoft SQL Server database.
-- Microsoft Exchange storage group.
-- Microsoft SharePoint Server farm.
-- Microsoft Virtual Machine.
-- DPM database.
-- A system state that is a member of a protection group.

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DpmRole<DpmRole>

Specifies a DPM role object. To obtain a DPM role object, use the Get-DPMRole cmdlet.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SqlInstances<String[]>

Specifies an array of instances of SQL Server.

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Type<AmDatasourceType>

Specifies the type of data source that the cmdlet uses. Valid values are:
-- SqlDatabase
-- SqlInstance
-- Client

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

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 (https://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 Add-DPMRecoveryItem -detailed".

Examples

Example 1: Add recoverable items for a DPM role

This example adds a SQL database and a SQL instance to the recovery items that members of a DPM role can recover.

The first command gets the protection groups on the DPM server named DPMServer02 and stores the result in the $ListOfPGs variable.

The second command gets the protected and unprotected data from the first protection group stored in the $ListOfPGs variable. The command stores the result in the $DatasourceInPG variable.

The third command adds a SQL database to the recovery items that members of the DPM role stored in the $Role variable can recover. The data source stored in the $DatasourceInPG variable contains the SQL database.

The fourth command adds a SQL instance to the recovery items that members of the DPM role stored in the $Role variable can recover.

PS C:\> $ListOfPGs = Get-DPMProtectionGroup -DPMServerName "DPMServer02"
PS C:\> $DatasourceInPG = Get-DPMDatasource -ProtectionGroup $ListOfPGs[0]
PS C:\> Add-DPMRecoveryItem -DPMRole $Role -Type SQLDatabase -Datasource $DatasourceInPG
PS C:\> Add-DPMRecoveryItem -DPMRole $Role -Type SQLInstance -Sqlinstances "ProductionServer\Unit01Instance"

Remove-DPMRecoveryItem

Get-DPMRecoveryItem

Get-DPMRole