One of my customers uses System Center Data Protection Manager to backup their environment and are currently doing a manual inventory of their backup tapes. Now, it is possible to get this information through the GUI with the following action:
- Open the DPM Administrator Console
- Click Protection.
- Click a protection group.
- Click View tape list.
When yoú have multiple protection groups, this may take a lot of manual labor.
There is an easier way… by using PowerShell.
With the following command you’ll get a list of all tapes that are available in DPM:
Get-ProtectionGroup –DPMServer DPM001 | get-tape | select -ExpandProperty label | sort | out-file E:\Temp\DPMTapeLabelList.txt
But normally a tape has a barcode sticker on it, not the label So, for getting all barcodes:
Get-ProtectionGroup –DPMServer DPM001 | get-tape | select barcode | sort | out-file E:\Temp\DPMTapeBarcodeList.txt
And now you can check which backup tapes are actually there and which are missing…
That is very handy, thanks very much. I had to change the | sort to | sort barcode though to list the tapes in order.
Hi Guys, Could you kindly advise on a brief command to view both the barcode and expiry date. Thank You.
Please can you show if its possible to have the output of both the label and the barcode together on one output file.
Would it also be possible to show the protection group of each tape
hope you can help
That one is a little tricky and since I haven’t got access to a DPM environment anymore (different customer) I can’t help you myself.
I think that with some tweaks the answer in the following script would come pretty close to what you want…?
I would love to help but haven’t got access to a DPM environment anymore…sorry.
Get-ProtectionGroup -DPMServer DPMServerName | Get-Tape | Select Label, Barcode, Location | Sort-Object Label | ft -autosize | out-file c:ScriptsDPMTapeList.txt
[…] I have a long list of DPM tapes – a very long list… and most of them are offline. But how would you know what data is stored on what tape? Jeff Wouters wrote a blogpost about it at http://jeffwouters.nl/index.php/2012/04/list-all-tapes-in-dpm-with-a-powershell-oneliner/ […]