DPM Powershell Script to list each recovery point on each tape

2017-12-04T14:46:03+00:00 April 9th, 2010|PowerShell|

Just a quick powershell script to produce a text file of every recovery point on the tapes that are currently in the DPM tape library . If you save the below into notepad and save it as a PS1 file then run from DPM management shell this should work with no errors

Add-PSSnapin “Microsoft.DataProtectionManager.PowerShell”
$AllLibraries = get-dpmlibrary -dpmservername servername
$AllTapes = Get-Tape -DPMLibrary $AllLibraries
$outfile = “c:DPMScriptsDPM-Tapes-Report.txt”
“DPM Tapes Report” | out-file $outfile
Foreach ($tape in $AllTapes)
{$tape| FL | out-file –append $outfile
$tape| get-recoverypoint | fl | out-file -append $outfile }

 

This script will output the file to the following location “c:DPMScriptsDPM-Tapes-Report.txt“ and will give the following output.

DPM Tapes Report

Location         : Slot-20
Tape label       : Dummy – Primary-LT-1Years-Copy0-00000030
Library          : Hewlett Packard MSL G3 Series library  (x64 based)
Tape barcode     : YB23534643
Offsite Ready    : False
Protection Group : Dummy

Name        : SystemState
Backup Time : 01/03/2010 20:05:59
Datasource  : ComputerSystemState on computer test
Location    : Media

Name        : SystemState
Backup Time : 01/03/2010 20:07:22
Datasource  : ComputerSystemState on computer test2
Location    : Media

Name        : SystemState
Backup Time : 01/03/2010 20:05:59
Datasource  : ComputerSystemState on computer test3
Location    : Media

Name        : SystemState
Backup Time : 01/03/2010 20:12:38
Datasource  : ComputerSystemState on computer test4
Location    : Media

Daniel Davies