I am struggling to get the media location for given media.
I would like a report that identifies the location of protect media - either by Library slot (if still online) or in which vault (if offline)
So far I have the following working:
Code: Select all
Get-VBRTapeMedium | Where-Object { $_.IsExpired -eq $False -and $_.IsFree -eq $False} | Sort-Object {$_.ExpirationDate} | Select-Object -Property @{N="Barcode";E={$_.Barcode}}, @{N="Protected Until";E={$_.ExpirationDate}}, @{N="Location";E={$_.Location}}
Code: Select all
Barcode Protected Until Location
------- --------------- --------
GMC167L5 20/05/2015 22:14:43 Vault
GMC160L5 21/05/2015 01:36:00 Vault
GMC161L5 28/05/2015 15:53:17 Vault
GMC162L5 30/05/2015 09:30:36 Vault
GMC165L5 01/06/2015 01:55:07 Vault
GMC168L5 05/06/2015 19:08:37 Slot
GMC169L5 07/06/2015 06:31:29 Slot
GMC170L5 07/06/2015 22:16:22 Slot
GMC163L5 31/12/9999 23:59:59 Slot
GMC164L5 31/12/9999 23:59:59 Slot
Any help will be appreciated. I am still learning my way with Powershell, so a working example would be really helpful
Thanks
M