Created
August 1, 2017 05:50
-
-
Save janegilring/1b3f65ca6c0f153fb04d2d842533d012 to your computer and use it in GitHub Desktop.
An example showing how to create a new protection group in System Center Data Protection Manager 2016. From the cmdlets help: "The New-DPMProtectionGroup cmdlet creates a protection group on a System Center 2016 - Data Protection Manager (DPM) server. This is the first step to create a protection group. This cmdlet returns a new protection group…
This file contains hidden or 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
| # Create the protection group object (the actual protection group will not be created until all necessary properties is specifed) | |
| $PG = New-DPMProtectionGroup -Name '30 days - Application Servers' | |
| # Select what DPM agent to protect | |
| $server = Get-DPMProductionServer | Where-Object -Property MachineName -Value SRV01 -EQ | |
| # Select data source from the specified DPM agent | |
| $DataSource = Get-DPMDatasource -ProductionServer $server | Where-Object Name -eq 'E:\' | Get-DPMChildDatasource -Inquire | | |
| Where-Object Name -eq 'IBM'| Get-DPMChildDatasource -Inquire | Where-Object Name -eq 'WebSphere' | | |
| Get-DPMChildDatasource -Inquire | Where-Object Name -eq 'profiles' | |
| # Add specified data source to the protection group | |
| Add-DPMChildDatasource -ProtectionGroup $PG -ChildDatasource $DataSource | |
| # Specify protection type | |
| Set-DPMProtectionType -ProtectionGroup $PG -ShortTerm Disk | |
| # Specify replica creation method ("Now" or "Later") | |
| Set-DPMReplicaCreationMethod -ProtectionGroup $PG -Later (Get-Date).AddHours(3) | |
| # Specify retention settings | |
| Set-DPMPolicyObjective -ProtectionGroup $PG -RetentionRangeDays 30 -SynchronizationFrequencyMinutes 120 | |
| # Configure disk allocation | |
| $DataSourceVolume = Get-DPMDatasource -ProductionServer $server | Where-Object Name -eq 'E:\' | |
| Get-DatasourceDiskAllocation -Datasource $DataSourceVolume | |
| Set-DPMDatasourceDiskAllocation -ProtectionGroup $PG -Datasource $DataSourceVolume -PassThru | |
| # Create the protection group | |
| Set-DPMProtectionGroup -ProtectionGroup $PG | |
| # Verify that the protection group was created. At this point it should also be visible in the DPM Administration Console. | |
| Get-DPMProtectionGroup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment