DRIVE EFFICIENCY THROUGH AUTOMATED IT.
SAVE COST THROUGH CONSOLIDATION OF IT.
WANT TO KNOW MORE ABOUT STRATEGIC CONSULTING CLICK HERE.
MICROSOFT / RISUAL HYPER-V CLOUD EVENT 22ND MARCH 2011 CLICKHERE.
Home > Uncategorized > DPM Powershell Script to Mark tape in Tape drive as free

DPM Powershell Script to Mark tape in Tape drive as free

Just a quick powershell script to make your tape drive be marked as free. 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

$LIB = Get-DPMLibrary –DPMServerName servername
$Tape1 = Get-Tape -DPMLibrary $LIB
$Tape2 = Get-RecoveryPoint -Tape $Tape1
foreach ($rp in $Tape2)
{
Get-RecoveryPoint -Datasource $rp.Datasource | out-null
Write-host “Removing recovery point $($rp.RepresentedPointInTime) from tape”
Remove-RecoveryPoint -RecoveryPoint $rp -ForceDeletion -Confirm:$false
}

Set-Tape -Tape $Tape1 –Free

Write-Host  “This Tape is now free”

You will then see the Tape in the drive marked as Free in the DPM Console :)

Daniel Davies

Categories: Uncategorized Tags: ,
  1. October 23rd, 2011 at 15:35 | #1

    Thank you Daniel! You helped me a lot!
    Frank

  1. No trackbacks yet.