Add-DPMChildDatasource
Add-DPMChildDatasource
Adds a data source or a child data source to a protection group.
Syntax
Parameter Set: Default
Add-DPMChildDatasource [-ProtectionGroup] <ProtectionGroup> [-ChildDatasource] <ProtectableObject[]> [[-Online]] [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Add-DPMChildDatasource cmdlet adds a data source or a child data source to a System Center 2012 – Data Protection Manager (DPM) protection group. A child data source refers to folders on a protected volume.
You can override a data source that a previous Remove-ChildDatasource cmdlet excluded from a protection group by adding the data source to the protection group.
Parameters
-ChildDatasource<ProtectableObject[]>
Specifies an array of data sources, such as folders in a file system, that you can protect individually.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-Online
Indicates whether online protection is enabled.
Aliases |
none |
Required? |
false |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-PassThru
Indicates that the cmdlet generates output. By default, this cmdlet does not generate output. You can use the PassThru parameter in order to use the cmdlet in a pipeline.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ProtectionGroup<ProtectionGroup>
Specifies a protection group.
Aliases |
none |
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.
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.
- ProtectionGroup
Notes
- For more information, type "
Get-Help Add-DPMChildDatasource -detailed
".
Examples
Example 1: Add a child data source to a protection group
This example adds a child data source to a protection group.
The first command gets all protection groups from the DPM server named DPMServer07 and stores these groups in the $Pg variable. You cannot edit these protection groups.
The second command gets the first protection group in the $Pg array in editable mode, and then stores it in the $Mpg variable.
The third command gets an arrayof protected and unprotected data on the production server named ProductionServer22, and stores the array in the $Po variable.
The fourth command uses standard array notation to specify the ninth element of the $Po array. The command adds that data source to the protection group stored in the $Mpg variable.
PS C:\> $Pg = Get-ProtectionGroup -DPMServerName "DPMServer07"
PS C:\> $Mpg = Get-ModifiableProtectionGroup $Pg[0]
PS C:\> $Po = Get-Datasource -ProductionServer "ProductionServer22"
PS C:\> Add-DPMChildDatasource -ProtectionGroup $Mpg -ChildDatasource $Po[8]