WHAT IS DPM ?



System Center Data Protection Manager (DPM) 2010 is a server-based application that enables disk-based and tape-based data protection and recovery for computers in and across Active Directory domains. DPM performs replication, synchronization, and recovery point creation to provide reliable protection and rapid recovery of data both by system administrators and by end-users.

DPM uses replication, the Volume Shadow Copy Service (VSS) infrastructure, and a policy-driven engine to provide businesses of all sizes with nearly continuous protection and rapid, reliable data recovery.

To know more about DPM 2010 follow the link :  https://technet.microsoft.com/en-us/library/ff399149.aspx

 

WHAT DOES THE REPORT LOOK LIKE : 

dpm

HOW TO GET DPM 2010 DISK UTILIZATION :

Open a DPM shell on a DPM 2010 server and run the script in one of the following ways –

1. Run the script from a DPM Shell in the following manner and it will create a HTML report and save it on the Present working directory.

dpm1

2. To specify the Path on which you want your output HTML file to be saved, using the -OutputDirectory switch

dpm2
3. In Case you want the result over the an email, use the -SendEmailTo and -SMTPServer switch to enable script to send you the output over email.

dpm3

 

GRAB THE SCRIPT :


# Parameter Definition
Param
(
[Parameter(mandatory = $true)] [String] $DPMServer,
[String] $SendEmailTo,
[String] $OutputDirectory,
[String] $SMTPServer
)
# HTML Body Definition Start
$a = "<html><head><style>"
$a = $a + "BODY{font-family: Calibri;font-size:14;font-color: #000000}"
$a = $a + "TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}"
$a = $a + "TH{border-width: 1px;padding: 4px;border-style: solid;border-color: black;background-color: #BDBDBD}"
$a = $a + "TD{border-width: 1px;padding: 4px;border-style: solid;border-color: black;background-color: #ffffff }"
$a = $a + "</style></head><body>"
# HTML Body Definition End
$b = "</body></html>"
# Connecting to DPM Server
$DataSources = Get-ProtectionGroup -DPMServerName $DPMServer| %{Get-Datasource -ProtectionGroup $_}
$Out = @()
$Heading = "<bR><H1>DPM Resource Utilization</h1><br><br>"
Foreach($D in $DataSources)
{
$RecoveryStr = ($d.diskallocation).split('|')[1]
#DPM Resource Utlization Calculations
$RecoveryAllocated, $RecoveryUsed = $RecoveryStr -split "allocated,"
$RecoveryAllocated = [int](($RecoveryAllocated -split ": ")[1] -split " ")[0]
$RecoveryUsed = [int]((($RecoveryUsed -split " used")[0]) -split " ")[1]
$RecoveryPointVolUtilization =[int]("{0:N2}" -f (($RecoveryUsed/$RecoveryAllocated)*100))
$ReplicaSize = "{0:N2}" -f $($d.ReplicaSize/1gb)
$ReplicaSpaceUsed = "{0:N2}" -f ($d.ReplicaUsedSpace/1gb)
$ReplicaUtilization =[int]("{0:N2}" -f (($ReplicaSpaceUsed/$ReplicaSize)*100))
$NumOfRecoveryPoint = ($d | get-recoverypoint).count
$Out += $d|select ProtectionGroupName, Name, @{name='Replica Size (In GB)';expression={$ReplicaSize}}, @{name='Replica Used Space (In GB)';expression={$ReplicaSpaceUsed}} , @{name='RecoveryPointVolume Allocated (In GB)';expression={$RecoveryAllocated}}, @{name='RecoveryPoint Used Space (In GB)';expression={$RecoveryUsed}},@{name='Total Recovery Points';expression ={$NumOfRecoveryPoint}} , @{name='Replica Utilization %';expression={$ReplicaUtilization}}, @{name='RecoveryPoint Volume Utilization %';expression={$RecoveryPointVolUtilization}}
}
# Closing the Connection with DPM server
disconnect-dpmserver -dpmservername $DPMServer
$ResourceUtil = $Out | Sort -property name -descending | convertto-html -fragment
# Adding all HTML data
$html = $a + $heading + $ResourceUtil + $b
If(-not $OutputDirectory)
{
$FilePath = "$((Get-Location).path)\DPM_ResourceUtlization_Report.html"
}
else
{
If($OutputDirectory[-1] -ne '\')
{
$FilePath = "$OutputDirectory\DPM_ResourceUtlization_Report.html"
}
else
{
$FilePath = $OutputDirectory+"DPM_ResourceUtlization_Report.html"
}
}
#Writing the HTML File
$html | set-content $FilePath -confirm:$false
Write-Host "A DPM Resource Utilization Report has been generated on Location : $filePath" -ForegroundColor Yellow
#Sending Email
If($SendEmailTo -and $SMTPServer)
{
Send-MailMessage -To $SendEmailTo -From "PowershellReporting@egonzehnder.com" -Subject "DPM Space Utilization" -SmtpServer $SMTPServer -Body ($html| Out-String) -BodyAsHtml
Write-Host "DPM Resource Utilization Report has been sent to email $SendEmailTo" -ForegroundColor Yellow
}

Hope you find this useful, thanks for stopping by.

Prateek Singh

[twitter-follow screen_name=’SinghPrateik’]