Skip to main content

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


 

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.  😎


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!!


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


Comment