Skip to main content

List of Tapes and load count


Scott
Forum|alt.badge.img+8
  • Veeam Legend
  • 993 comments

I have a lot of tapes and multiple libraries. I recently had a few failures, and wanted to check how many times each tape has been loaded and either read or written too to see if there is a trend with the oldest ones. 

 

I created a little script to do this, and figured I’d sort it from the most loads at the top.    It ended up being a coincidence and I have plenty of life left in all my tapes, but always fun to lean a new command

 

# Load Veeam PowerShell SnapIn if not already loaded
if ((Get-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue) -eq $null) {
    Add-PSSnapin VeeamPSSnapIn
}

# Get all tape media
$tapes = Get-VBRTapeMedium

# Create an array to hold the results
$results = @()

foreach ($tape in $tapes) {
    $tapeInfo = "" | Select-Object 'TapeName', 'LoadCount'
    $tapeInfo.TapeName = $tape.Name
    $tapeInfo.LoadCount = $tape.LoadCount
    $results += $tapeInfo
}

$results | Sort-Object LoadCount -Descending | Format-Table


 

3 comments

Chris.Childerhose
Forum|alt.badge.img+21

Well, another one I have saved to my scripts folder.  This will come in handy as we have a service with Iron Mountain that uses Veeam and tape.  😎


HunterLAFR
Forum|alt.badge.img+8
  • Veeam Legend
  • 421 comments
  • June 16, 2023

I’m not into tapea buddy!

if I ever get into this “mud” I will give you a shout!!

script saved in my home repo!!

thanks!

cheers!!


jos.maliepaard
Forum|alt.badge.img+7

This one can become usefull sometime. Thanks for sharing @Scott