Hi all,
I can see the serial number of a tape library in the GUI, but I want to be able to pull that via PowerShell script.
The get-vbrtapelibrary returns everything but the serial number.
Any ideas?
TIA
-
- Lurker
- Posts: 2
- Liked: 1 time
- Joined: Feb 27, 2024 3:23 pm
- Full Name: Ben Craigs
- Contact:
-
- Veeam Software
- Posts: 2346
- Liked: 555 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Tape library serial code
Hi @bentheninjarock,
Seems we don't return it for some reason on Get-VBRTapeLibrary or I'm just blind and cannot find it.
As a workaround, you can use the following unsupported method to retrieve it.
The returning objects will have a method GetDevice() which you can call to get the serial:
But this should be returned by Get-VBRTapeLibrary in my humble opinion, will discuss internally.
Seems we don't return it for some reason on Get-VBRTapeLibrary or I'm just blind and cannot find it.
As a workaround, you can use the following unsupported method to retrieve it.
Code: Select all
Get-VBRLicenseAutoUpdateStatus | Out-Null #you need to run _any_ Veeam cmdlet in your script before you can cast .NET Reflections, but this is a fast one I usually
$changers = [Veeam.Tape.Core.AutomatedLibrary]::GetAll().GetChanger()
Code: Select all
PS C:\Users\Administrator> $changers[0].GetDevice()
Devices : Veeam.Tape.Core.DeviceRepository
Id : 0d68339b-4c19-4ed2-95c1-2800e655e9a1
Name : Changer0
Type : Changer
SymbolicLink : \\.\Changer0
State : Online
IsLocked : False
SerialNumber : BE41200010
David Domask | Product Management: Principal Analyst
-
- Lurker
- Posts: 2
- Liked: 1 time
- Joined: Feb 27, 2024 3:23 pm
- Full Name: Ben Craigs
- Contact:
Re: Tape library serial code
That works great, thank you!
-
- Veeam Software
- Posts: 2346
- Liked: 555 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Tape library serial code
Glad it worked, and happy to help! And I will note a request for improvements on this particular item (or for someone to point where I am missing it
)

David Domask | Product Management: Principal Analyst
Who is online
Users browsing this forum: Ahrefs [Bot] and 8 guests