DPM Powershell script to show offsite ready tapes
Just a quick PowerShell script to show you tapes that are offsite ready in your 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
$AllLibraries = get-dpmlibrary -dpmservername servername
$AllTapes = Get-Tape -DPMLibrary $AllLibraries
$outfile = “c:\DPMScripts\Offsite-Ready-Tapes.txt”
“DPM Offsite Ready Tapes” | out-file $outfile
$AllTapes |sort-object location | Where-Object {$_.isoffsiteready} | format-table location, barcode ,isoffsiteready | out-file -append C:\dpmscripts\Offsite-Ready-Tapes.txt
This PowerShell will output the information needed to a text file in the following location “C:\dpmscripts\Offsite-Ready-Tapes.txt “ which will look like below
DPM Offsite Ready Tapes
Location Barcode IsOffsiteReady
——– ——- ————–
Slot 1 AIS783L3 True
Slot 2 YB2417L3 True
Daniel Davies


Hi Daniel,
Love this scripts, they’re making my life a lot easier. I have one question thought….
Do you know of a powershell script that can show the tapes that are due back online (ie one’s that are in storage and have now expired)? You can pull the report from the SQL Reporting so I’d have thought it’d be possible but I can’t find a powershell script. I’ve started to have a poke around at creating my own scripts but nothing to this level.
Cheers
Keith