none
Sorting DPM size information using Powershell RRS feed

  • Question

  • Is it possible to determine the agenttype (SQL, FS, Exchange etc) when using DPM 2007 and powershell?  I am looking at the methods and properties of get-protectiongroup etc.  I am trying to sort replica and shadowcopy sizes into their respective buckets....  (SQL Exchange etc...

     

    • Moved by MarcReynolds Friday, May 20, 2011 3:14 PM (From:Data Protection Manager)
    Friday, October 15, 2010 11:21 PM

Answers

  • Hi,

    suppose you collected all datasources like this;
    $dss = (Get-protectiongroup (&hostname) | foreach {get-datasource -protectiongroup $_}

    you could sort like this;
    $dss | sort -property Type

    $dss[0].Type.Name gives the name string of the data source type

     


    \R2 This posting is provided "AS IS" with no warranties, and confers no rights
    Monday, October 18, 2010 6:23 PM

All replies

  • Given that the agent is essentially the same codebase regardless of the data you are protecting - then no, you cannot determine based on the agenttype.

    You can pick the datasource type for an entire DPM server using the get-datasource -dpmservername servername | fl command which will provide you with the Type field indicating whether the protection if a Volume, SQL Database etc. and also provide you with the replica and recovery point volume size for that datasource.

    Where I get stuck is how to sort that list to then provide only the data sources of a specific type.......

    Monday, October 18, 2010 7:05 AM
  • Hi,

    suppose you collected all datasources like this;
    $dss = (Get-protectiongroup (&hostname) | foreach {get-datasource -protectiongroup $_}

    you could sort like this;
    $dss | sort -property Type

    $dss[0].Type.Name gives the name string of the data source type

     


    \R2 This posting is provided "AS IS" with no warranties, and confers no rights
    Monday, October 18, 2010 6:23 PM
  • Awsome thanks.   I tried looking at type but because of a typo in my script it did not report correctly.  This works!

     

    Monday, October 18, 2010 10:29 PM
  • I am having trouble extracing the PG name in DPM 2007 when using get-datasource.

    I am using this method that works great in DPM2010, however in DPM 2007 I am getting an exception with:

        $PSList = get-productionServer dpm | where { $_.AreRecoveryPointsPresent -eq $true } | sort name
        $DataSourceList = Get-Datasource $PSList[0] | where { $_.Protected -eq $true} | sort name
        $PGName=$DataSourceList.ProtectionGroup.FriendlyName
        $PGName             

    I know there are other easier ways to get the PG name but I am working with the datasource name within a script and that is what I have to work with.  

    Is $DataSourceList.ProtectionGroup.FriendlyName available as a different prprty name in DPM2007?

    Wednesday, October 20, 2010 6:46 AM