-
- Novice
- Posts: 4
- Liked: 1 time
- Joined: Oct 09, 2014 9:50 am
- Full Name: Christophe MORICE
- Contact:
Sending an email if standalone tape drive is empty at 4pm...
Hi,
I want to send an email to the backup operator at 4pm if my standalone LTO7 drive is empty.
I know how to send an email with Powershell but I do not figure out how to use the Get-VBRTapeDrive command to send the message only if drive is empty.
Can you help me ?
chm
I want to send an email to the backup operator at 4pm if my standalone LTO7 drive is empty.
I know how to send an email with Powershell but I do not figure out how to use the Get-VBRTapeDrive command to send the message only if drive is empty.
Can you help me ?
chm
-
- Product Manager
- Posts: 20284
- Liked: 2258 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Sending an email if standalone tape drive is empty at 4p
Something like this should meet your expectations:
Thanks.
Code: Select all
Asnp VeeamPssnapin
Get-VBRTapeLibrary | Start-VBRTapeInventory -Wait
if ((Get-VBRTapeDrive -name "Name of your tape drive").state -eq "Empty")
{}
Else {}
-
- Novice
- Posts: 4
- Liked: 1 time
- Joined: Oct 09, 2014 9:50 am
- Full Name: Christophe MORICE
- Contact:
Re: Sending an email if standalone tape drive is empty at 4p
It's working fine.
Thanks a lot !
Thanks a lot !
-
- Product Manager
- Posts: 20284
- Liked: 2258 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Sending an email if standalone tape drive is empty at 4p
You're welcome. Feel free to ask for additional help, if any is needed. Thanks.
-
- Veteran
- Posts: 387
- Liked: 97 times
- Joined: Mar 24, 2010 5:47 pm
- Full Name: Larry Walker
- Contact:
Re: Sending an email if standalone tape drive is empty at 4p
You need to add line
Get-VBRTapeLibrary | Start-VBRTapeInventory -Wait
to update that a tape got put in.
I liked the idea so we did it as well. Just found if someone cleaned or push the eject button veeam didn't know until we did inventory.
Get-VBRTapeLibrary | Start-VBRTapeInventory -Wait
to update that a tape got put in.
I liked the idea so we did it as well. Just found if someone cleaned or push the eject button veeam didn't know until we did inventory.
-
- Product Manager
- Posts: 20284
- Liked: 2258 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Sending an email if standalone tape drive is empty at 4p
Correct, if a drive in the idle state, you need to inventory it to update its status. Thank you for your feedback, I've already updated the original script.
-
- Novice
- Posts: 4
- Liked: 1 time
- Joined: Oct 09, 2014 9:50 am
- Full Name: Christophe MORICE
- Contact:
Re: Sending an email if standalone tape drive is empty at 4p
I'd added the TapeInventory task before your update.
Thanks
Thanks
-
- Product Manager
- Posts: 20284
- Liked: 2258 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Sending an email if standalone tape drive is empty at 4p
Like it, it's always good to be proactive. Especially in case of automating, where only the sky is the limit for your creativity. ![Smile :)](https://forums.veeam.com/images/smilies/icon_smile.gif)
![Smile :)](https://forums.veeam.com/images/smilies/icon_smile.gif)
Who is online
Users browsing this forum: Google [Bot] and 13 guests