Powershell – List information being Backed up in DPM

Powershell

One of the nice things in Powershell is that Microsoft has made it so easy to translate information that is sitting in the GUI to useful scriptable data or just even a simple report.

Point at hand.  If you want to show what your DPM server is monitoring or backing up, do you…

 

a) Make lots of screen shots of the configurations and keep them in a binder

or

b) Have Powershell do the work for you in a repeatable manner?

 

Well although I LIKE wasting lots of Color paper on the Company Color Laser Printer, I also prefer being efficient.   Sometimes being “efficient” means sitting down for about 30 minutes to figure how to do it.   But once done you have solid repeatable process.

 

So I decided I wanted a way to be “Efficient”, at a moments notice dump that configuration into something useful that could be read at any time

Now A poke for the DPM team.  Beautiful job in Putting in Powershell, Bad job documenting the Cmdlets.   They DO work but the examples were a little buggy.   

 

But here’s what we’re interested in, two nice CmdLets in DPM called “GET-PROTECTIONGROUP” and “GET-DATASOURCE

The first CmdLet will allow us to list all the available protection Groups in a particular DPM server.

 

Get-ProtectionGroup -DPMServerName MYDPMSERVER

Name                                Protection method
—-                                    —————–
ProtectedFileServers        Short-term using disk
MailServers                       Short-term using disk
 

That’s all fine, but really I wanted to be able to show my boss, at any point in time WHAT we’re backing up.  Make’s him happier.  I like having a happy boss.  That’s where “GET-DATASOURCE” comes into play.  It’s job is to show you the “Source” of the “Data” being backed up.  (well maybe not, but that’s how *I* remember it) 😉

You just have to pipe in a “Protection Group” in the GET-DATASOURCE to get the list.

So I cheat and throw the results in a variable called $GROUPLIST and just do a FOREACH-OBJECT to pull out the lists for each ProtectionGroup.  If you only have one, you can simplify it.

 

$GROUPLIST=GET-PROTECTIONGROUP -DPMSERVERNAME MYDPMSERVER; foreach ( $MEMBER of $GROUPLIST ) { GET-DATASOURCE -ProtectionGroup $Member}

 

And now you have a perfectly viewable and format able list of what you’re backing up.   Where it gets NEAT is if you plug in a GET-MEMBER into the results on a GET-DATA, you can see what OTHER useful information shows up, like say Oooooo the STATUS of those Protection Groups?

 

I am saddened the GUI interface for DPM cannot sit on my PC.  I am brightened and cheered up DAILY when I discover just how MUCH of it is not needed once you start into the DPM Management Shell, with Powershell driving it.

 

Sean
The Energized Tech

One Reply to “Powershell – List information being Backed up in DPM”

  1. This is a great script, but the problem I have found is that you can’t filter out things like SQL servers, so if a server has multiple instances you end up with skewed numbers. Is there a way to filter this to see the servers being backed up? I did come up with a filter but the next issue is HyperV servers, the filter I did shows only the list of members of all protection groups, but you can’t see the vms being backed up on the hyperv host….
    Thx, this is a GREAT BLOG!!

Leave a Reply