DPM Powershell Script to Mark tape in Tape drive as free

By |2017-12-04T14:46:38+00:00April 9th, 2010|PowerShell|0 Comments

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

Leave A Comment

like what you see? 

Sign-up to our newsletter and never miss out on the latest blogs, events and tech news from the world of risual
Give it a try, you can unsubscribe anytime.