PowerShell script exchange
Post Reply
jzi
Lurker
Posts: 2
Liked: never
Joined: May 30, 2024 7:00 am
Contact:

[Feature Request] Check I/E slot for present tape

Post by jzi »

Hi,

we want to use a PowerShell script for importing tapes from I/E slots of our Tape Library.

No problem, this is working fine with the "Import-VBRTapeMedium" command. Unfortunately the jobs returns a warning if there is no tape in the slot. It would be great to have an option to check if there is a tape in the I/E slot to avoid the warning.

Script should be like:

if there is a tape located in the I/E slot
then Import-VBRTapeMedium
else do nothing

See Case #07274358 for futher information.

Regards,
Janne
david.domask
Veeam Software
Posts: 2367
Liked: 560 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: [Feature Request] Check I/E slot for present tape

Post by david.domask »

Hi Janne, welcome to the forums and thank you for including the Support Case number as requested.

Support is correct here, right now there is not a direct way of monitoring the I/E slots with the Powershell cmdlets using supported methods. Consider it a feature request.

However, can I ask, why do you want to confirm if there's a tape and prevent the cmdlet from running? Import-VBRTapeMedium is non-invasive and should not take long if there's nothing there. Typically for cmdlets where you're not certain on the result, you probably want to use Try/Catch statements built into Powershell and you can just define in the Catch codeblock what to do if you get a Warning for example.

Can you elaborate a bit on why it's preferable to confirm first that there is no tape in the IESlot and avoid running the cmdlet as opposed to just writing some handling for the warning?
David Domask | Product Management: Principal Analyst
jzi
Lurker
Posts: 2
Liked: never
Joined: May 30, 2024 7:00 am
Contact:

Re: [Feature Request] Check I/E slot for present tape

Post by jzi »

Dear David,

thank you for your reply. The only goal is to avoid the warning in Veeam, as we have to analyze all warnings to be sure that there is no real issue.

As far as I unterstand, using try/catch statements I cannot change the error handling in Veeam, correct?

Regards,
Janne
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests