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:DPMScriptsOffsite-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:dpmscriptsOffsite-Ready-Tapes.txt

This PowerShell will output the information needed to a text file in the following location “C:dpmscriptsOffsite-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