-
- Expert
- Posts: 106
- Liked: 11 times
- Joined: Jun 20, 2009 12:47 pm
- Contact:
V8 changes
Hi,
I am testing out the new version and saw some changes to the powershell commandlets.
The get-vbrtapemedium returns the location of the tape in the library, but it only says "Slot" without any number now. In the gui the correct number is displayed.
Documenatation says it should return the slot ID, as in V7.
Greetings,
Manuel
I am testing out the new version and saw some changes to the powershell commandlets.
The get-vbrtapemedium returns the location of the tape in the library, but it only says "Slot" without any number now. In the gui the correct number is displayed.
Documenatation says it should return the slot ID, as in V7.
Greetings,
Manuel
-
- Product Manager
- Posts: 20406
- Liked: 2299 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: V8 changes
Hi, Manuel,
Please, try the following script and see whether it meets your expectations:
Thanks.
Please, try the following script and see whether it meets your expectations:
Code: Select all
Get-VBRTapeMedium | where {$_.location -like "Slot"} | select name, {$_.Location.SlotAddress}
-
- Expert
- Posts: 106
- Liked: 11 times
- Joined: Jun 20, 2009 12:47 pm
- Contact:
Re: V8 changes
Works like a charm. Thanks.
-
- Product Manager
- Posts: 20406
- Liked: 2299 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: V8 changes
You're welcome. Should other questions arise, don't hesitate to reach us.
-
- Influencer
- Posts: 15
- Liked: never
- Joined: May 07, 2012 1:47 pm
- Full Name: William Nelson
- Contact:
Re: V8 changes
So, I was using the method isoverwriteprotectionperiodover() in one of my scripts for the same get-vbrtapemedium cmdlet and now that has been taken out with v8.
Is there an alternative to this method in v8?
Is there an alternative to this method in v8?
-
- Product Manager
- Posts: 20406
- Liked: 2299 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: V8 changes
Can you query .expirationdate parameter, instead? Something like:
Thanks.
Code: Select all
$Medium.ExpirationDate -eq (Get-Date)
-
- Product Manager
- Posts: 20406
- Liked: 2299 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: V8 changes
I believe you can also use IsExpired parameter. Just make sure to discard free mediums. The following script, for instance, lists all non-free, unexpired tapes:
Thanks.
Code: Select all
Get-VBRTapeMedium | ?{($_.isfree -eq $false) -and ($_.IsExpired -eq $false)
-
- Influencer
- Posts: 15
- Liked: never
- Joined: May 07, 2012 1:47 pm
- Full Name: William Nelson
- Contact:
Re: V8 changes
Thanks Eremin, I believe this will work for these purposes, but there are other methods you guys have removed regarding tapes and cmdlets. Is there a reason for taking these out?
-
- Product Manager
- Posts: 20406
- Liked: 2299 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: V8 changes
You're right, the PowerShell tape mode has been restructured. We've done it mostly due to previous model missing options and having multiple design shortcomings. Like, it was not possible to change most of backup to tape job, file to tape job, media pool settings, etc.
It required major design reconsideration, indeed, but we tried to preserve compatibility and provide alternatives for replaced methods and parameters.
Thanks.
It required major design reconsideration, indeed, but we tried to preserve compatibility and provide alternatives for replaced methods and parameters.
Thanks.
Who is online
Users browsing this forum: No registered users and 7 guests