PowerShell Script for Consistency Check When Replica is Inconsistent #DPM #SCDPM #PowerShell

3 min read


System Center Data Protection Manager (SC DPM) has a built-in mechanism to auto-heal if the protected data becomes inconsistent with its replica. This feature is known as Synchronization with Consistency Check, also referred to simply as a Consistency Check (CC). As part of the synchronization process, a consistency check performs block-by-block verification to ensure that all the data on the replica is consistent with the protected data.

You may need to perform synchronization with consistency check to repair inconsistencies between the data on the protected computer and the replica on the DPM server. DPM automatically initiates a consistency check as a daily task if you select the option to automatically perform consistency check if the replica is inconsistent or if you have scheduled a daily consistency check for a protection group. You can configure your protection group to allow DPM to initiate a consistency check as a daily task as shown in Figure 1, if you select the option to automatically perform consistency check if the replica is inconsistent. Microsoft recommends you to use this option for workloads lesser than 1TB or workloads within the same datacenter.

You can also schedule a daily consistency check during off-peak hours to ensure that the replica remains consistent with the protected data. A scheduled consistency check will only run if inconsistencies are detected during synchronization. Microsoft recommends you to use this option for large workloads more than 1TB or for data that is backed up over WAN link (i.e. MPLS, IP-VPN) for branch offices.

Figure 1. Data Protection Manager – Consistency Check Options


Sometimes a replica becomes inconsistent because of a change journal overflow or an unexpected shutdown of the protected computer or if the storage volume has been surprise removed from DPM server, in this case a consistency check must be performed. You can perform a one-time manual consistency check as shown in Figure 2.

Figure 2. Data Protection Manager – Perform Manual Consistency Check

When a consistency check is performed and inconsistencies between the protected volume and the replica volume are found, DPM makes the replica consistent.

However, what if you have multiple protection groups and within each protection group you have different members that are Replica Inconsistent as shown in Figure 3 :(

Figure 3. Data Protection Manager – Perform Manual Consistency Check

You can wait until DPM performs the consistency check if you have a daily consistency check is scheduled as shown in Figure 1 above or go manually to each protected member and select Perform consistency check…


A better way is to use PowerShell and automate the consistency check task for all members that are in Replica inconsistent state.

Open Windows PowerShell as Administrator on your DPM server and run the following script:

# Perform auto Consistency Check
# When Replica is inconsistent
# Author : Charbel Nemnom
# Date   : 11-09-2017
# Version: 1.1
# Script: .\Start-DPMCC.ps1

$DPMServername = $env:COMPUTERNAME

$ReplicaErrors = Get-DPMAlert -DPMServerName $DPMServername | Where-Object {$_.Severity -eq "Error"}

Foreach ($ReplicaError in $ReplicaErrors) {

Start-DPMDatasourceConsistencyCheck -Datasource $ReplicaError.Datasource


Once you run above script, verification in progress will kick in for all failed members as shown in Figure 4.

Figure 4. Data Protection Manager – Replica inconsistent, verification in progress

Please note that this operation may require DPM to use additional CPU and disk resources. Use with Caution!

You can build upon this simple script and check the status of all replicas every morning. You can send this report via email only when DPM cannot fix its own problem, and needs manual intervention.

Hope this helps!

[email protected]

About Charbel Nemnom 559 Articles
Charbel Nemnom is a Cloud Architect, ICT Security Expert, Microsoft Most Valuable Professional (MVP), and Microsoft Certified Trainer (MCT), totally fan of the latest's IT platform solutions, accomplished hands-on technical professional with over 17 years of broad IT Infrastructure experience serving on and guiding technical teams to optimize the performance of mission-critical enterprise systems. Excellent communicator is adept at identifying business needs and bridging the gap between functional groups and technology to foster targeted and innovative IT project development. Well respected by peers through demonstrating passion for technology and performance improvement. Extensive practical knowledge of complex systems builds, network design, business continuity, and cloud security.

Be the first to comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.