Add-DPMChildDatasource

Adds a data source or a child data source to a protection group.

Syntax

Add-DPMChildDatasource [-ProtectionGroup] <ProtectionGroup> [-ChildDatasource] <ProtectableObject[]> [-Online]
 [-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]

Description

The Add-DPMChildDatasource cmdlet adds a data source or a child data source to a System Center 2016 - Data Protection Manager (DPM) protection group. Child data sources are folders on a protected volume.

You can override a data source that the Remove-DPMChildDatasource cmdlet previously excluded from a protection group by adding the data source to the protection group.

Examples

Example 1: Add a child data source to a protection group

PS C:\> $PGroup = Get-DPMProtectionGroup -DPMServerName "DPMServer07"
PS C:\> $MPGroup = Get-DPMModifiableProtectionGroup $PGroup[0]
PS C:\> $PObjects = Get-DPMDatasource -ProductionServer "ProductionServer22"
PS C:\> Add-DPMChildDatasource -ProtectionGroup $MPGroup -ChildDatasource $PObjects[8]

The first command gets all protection groups from the DPM server named DPMServer07, and then stores these groups in the $PGroup variable. You cannot edit these protection groups.

The second command gets the first protection group in the $PGroup array in editable mode, and then stores it in the $MPGroup variable.

The third command gets an array of protected and unprotected data on the production server named ProductionServer22, and then stores the array in the $PObjects variable.

The fourth command uses standard array notation to specify the ninth element of the $PObjects array. The command adds that data source to the protection group stored in $MPGroup.

Parameters

-ChildDatasource

Specifies an array of data sources, such as folders in a file system, that DPM can protect individually.

Type:ProtectableObject[]
Required:True
Position:2
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Online

Indicates that online protection is enabled.

Type:SwitchParameter
Required:False
Position:3
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProtectionGroup

Specifies a protection group to which this cmdlet adds data sources. To obtain a ProtectionGroup object, use the Get-DPMProtectionGroup cmdlet.

Type:ProtectionGroup
Required:True
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
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.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

ProtectionGroup