-
- Novice
- Posts: 4
- Liked: 3 times
- Joined: Dec 08, 2020 3:43 pm
- Full Name: Pierre-Benoit Gerber
- Contact:
Get Tape Library Slot ID using Powershell
Hello,
I would like to get the tape slot ID in the library with Powershell.
But the Location property of the Get-VBRTapeMedium command only shows "Slot" or "Vault" but not "Slot ID" like in the GUI.
Am I missing something or is this a limitation with Powershell?
I would like to get the tape slot ID in the library with Powershell.
But the Location property of the Get-VBRTapeMedium command only shows "Slot" or "Vault" but not "Slot ID" like in the GUI.
Am I missing something or is this a limitation with Powershell?
-
- Novice
- Posts: 4
- Liked: 3 times
- Joined: Dec 08, 2020 3:43 pm
- Full Name: Pierre-Benoit Gerber
- Contact:
Re: Get Tape Library Slot ID using Powershell
Difference between Powershell ouput and GUI.
In powershell I can't get the Slot ID number:


In powershell I can't get the Slot ID number:


-
- Product Manager
- Posts: 15127
- Liked: 3232 times
- Joined: Sep 01, 2014 11:46 am
- Full Name: Hannes Kasparick
- Location: Austria
- Contact:
Re: Get Tape Library Slot ID using Powershell
Hello,
that looks like a bug for me. I reproduced it in 12.3 and will open a case.
Best regards
Hannes
that looks like a bug for me. I reproduced it in 12.3 and will open a case.
Best regards
Hannes
-
- Novice
- Posts: 4
- Liked: 3 times
- Joined: Dec 08, 2020 3:43 pm
- Full Name: Pierre-Benoit Gerber
- Contact:
Re: Get Tape Library Slot ID using Powershell
Hello,
Thank you Hannes.
Thank you Hannes.
-
- Veeam Software
- Posts: 2590
- Liked: 606 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Get Tape Library Slot ID using Powershell
I'm not sure it's a bug personally, but will wait for @HannesK to confirm.
Reason I think this is that the Location property isn't a static value, it's calling another method to return a Veeam Powershell Type VBRTapeMediumLocation:
https://helpcenter.veeam.com/docs/backu ... ml?ver=120
You can actually see with Get-Member:
Location Property Veeam.Backup.PowerShell.Infos.VBRTapeMediumLocation Location {get;}
Calling this property will return the information. For example:
This would indicate that the tape is in Slot 23 as shown in the UI (SlotAddress = 22 in my output there, but this is 0-indexed, so we count from 0 to 22 which gives us Slot 23)
I think the idea of the top-level property is just to return the location type, and if you want more specifics, you delve into the property to get the actual SlotAddress.
Reason I think this is that the Location property isn't a static value, it's calling another method to return a Veeam Powershell Type VBRTapeMediumLocation:
https://helpcenter.veeam.com/docs/backu ... ml?ver=120
You can actually see with Get-Member:
Location Property Veeam.Backup.PowerShell.Infos.VBRTapeMediumLocation Location {get;}
Calling this property will return the information. For example:
Code: Select all
PS C:\Users\david.LAB> $testTape = Get-VBRTapeMedium -Name "H00023L5"
PS C:\Users\david.LAB> $testTape.Location
DriveId :
DriveAddress :
LibraryId : f850b166-4582-47cc-a869-66c4aef79c16
SlotAddress : 22
VaultId :
Type : Slot
I think the idea of the top-level property is just to return the location type, and if you want more specifics, you delve into the property to get the actual SlotAddress.
David Domask | Product Management: Principal Analyst
-
- Novice
- Posts: 4
- Liked: 3 times
- Joined: Dec 08, 2020 3:43 pm
- Full Name: Pierre-Benoit Gerber
- Contact:
Re: Get Tape Library Slot ID using Powershell
Hello David,
Thank you, I forgot to check the Location Property!
My customers will be happy to know in witch magazine will be the tapes to check-out for the new year

Thank you, I forgot to check the Location Property!
My customers will be happy to know in witch magazine will be the tapes to check-out for the new year


-
- Veeam Software
- Posts: 2590
- Liked: 606 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Get Tape Library Slot ID using Powershell
Glad I could help!
Looks like a useful script as well
If you're able and willing to share the script here, looks like it'd be a very useful one for many others.
Looks like a useful script as well

David Domask | Product Management: Principal Analyst
Who is online
Users browsing this forum: No registered users and 14 guests