List all tapes in DPM with a PowerShell oneliner

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 Knipogende emoticon 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…

7 comments

  1. That is very handy, thanks very much. I had to change the | sort to  | sort barcode though to list the tapes in order.

  2. Vikneshvaran Thinakaran says:

    Hi Guys, Could you kindly advise on a brief command to view both the barcode and expiry date. Thank You.

  3. Hi there,
    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

    Russell

  4. Jeff Wouters says:

    Hi Vikneshvaran,
    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…?
    http://gallery.technet.microsoft.com/scriptcenter/fab7b8df-5288-4a67-bc11-61c9d3a27ed3
    Jeff.

  5. Jeff Wouters says:

    Hi Russell,
    I would love to help but haven’t got access to a DPM environment anymore…sorry.
    Jeff.

  6. Dennis Mutsaers says:

    Get-ProtectionGroup -DPMServer DPMServerName | Get-Tape | Select Label, Barcode, Location | Sort-Object Label | ft -autosize | out-file c:ScriptsDPMTapeList.txt

  7. […] 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/ […]

Leave a Reply

Your email address will not be published. Required fields are marked *