none
Compare datasources between DPM servers RRS feed

  • Question

  • Hi everyone,

    We have two primary/secondary 2012 R2 DPM-servers in our environment, and would like to compare the datasources between these two in some way. Are there any ready reports for this? Or some PS-scripts for this purpose?

    /Amir
    Wednesday, May 20, 2015 9:29 AM

Answers

  • Hi Amir,

    Here is a simple script you can start out with and run on each DPM-server to get a list of its protected datasources and a list of available datasources:

    # Get all Production Servers that is attached to the DPM server
    $ps = Get-ProductionServer
    
    # Gets all Protection Groups
    $pg=Get-ProtectionGroup -DPMServerName (&hostname)
    
    # Queries the DPM-server for all protected datasources
    Write-Host "Querying DPM for protected datasources!" -ForegroundColor Yellow
    foreach ($ds in $pg) 
        {
        GET-DataSource -ProtectionGroup $ds
        }
    
    # Queries all Production Servers attached to the DPM server for its datasources
    foreach ($Allds in $ps) 
        { 
        Write-Host "Querying $Allds for available datasources!" -ForegroundColor Yellow 
        Get-DPMDatasource -ProductionServer $Allds
        }

    Hope it helps you get started!

    Kind Regards
    Markus

    Thursday, May 21, 2015 11:52 PM

All replies

  • Hi,

    I think you may find a way to do this as DPM support SQL query, if the build-in reports cannot meet your purpose.

    You can post your question to Scripting forum to see if anything further you can get. 

    https://social.technet.microsoft.com/Forums/en-US/home?forum=dpmpowershell


    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, May 21, 2015 11:47 AM
    Moderator
  • Hi Amir,

    Here is a simple script you can start out with and run on each DPM-server to get a list of its protected datasources and a list of available datasources:

    # Get all Production Servers that is attached to the DPM server
    $ps = Get-ProductionServer
    
    # Gets all Protection Groups
    $pg=Get-ProtectionGroup -DPMServerName (&hostname)
    
    # Queries the DPM-server for all protected datasources
    Write-Host "Querying DPM for protected datasources!" -ForegroundColor Yellow
    foreach ($ds in $pg) 
        {
        GET-DataSource -ProtectionGroup $ds
        }
    
    # Queries all Production Servers attached to the DPM server for its datasources
    foreach ($Allds in $ps) 
        { 
        Write-Host "Querying $Allds for available datasources!" -ForegroundColor Yellow 
        Get-DPMDatasource -ProductionServer $Allds
        }

    Hope it helps you get started!

    Kind Regards
    Markus

    Thursday, May 21, 2015 11:52 PM