none
Is it possible to list Protected Computers attached to a DPM Primary from a DPM Secondary using powershell RRS feed

  • Question

  • Example I can use the following code to get a list of availble datasources on the Primary (Note: Code runs on Secondary):

    $ps

     

     

    = Get-ProductionServer -DPMServerName DPMSecondary | ?{($_.machinename,$_.name) -contains "DPMPrimary"}

    Get-Datasource

     

     

     

    -ProductionServer $ps -Inquire

    The output below does not list servers that are protected by the Primary.

    Output:

    Computer     Name                                    Type      
    --------     ----                                   ----      
    DPMPrimary  C:\                                      Volume
    DPMPrimary  C:\Program Files\Microsoft DPM\DPM\Vo... Volume
    DPMPrimary  C:\Program Files\Microsoft DPM\DPM\Vo... Volume
    DPMPrimary  DPMPrimary\MSDPM2010\master              SQL Server 2008 database
    DPMPrimary  DPMPrimary\MSDPM2010\model               SQL Server 2008 database
    DPMPrimary  DPMPrimary\MSDPM2010\msdb                SQL Server 2008 database
    DPMPrimary  DPMPrimary\MSDPM2010\ReportServer$MS...  SQL Server 2008 database
    DPMPrimary  DPMPrimary\MSDPM2010\ReportServer$MS...  SQL Server 2008 database
    DPMPrimary  DPMPrimary\MSDPM2010\DPMDB               SQL Server 2008 database
    DPMPrimary  Computer\System Protection               System Protection
                 \\DPMPrimary.test.local\MTATempStore$  Share

    Is it possible to get a list of Protected Servers and their datasources from the primary by using powershell, like you would if you use the Secondaries DPM UI by expanding the Primaries Protected Servers?

    ...Thor

    Friday, November 26, 2010 6:29 AM

Answers

  • Yes you can. But the logic should be as follows

    1. $pDPM= Get-ProductionServer -DPMServerName DPMSecondary | ?{($_.machinename,$_.name) -contains "DPMPrimary"}

      $dpmid = $pDPM.serverid

    2. $psList= Get-ProductionServer -DPMServerName DPMSecondary | ?{($_.DPMServerid -contains $dpmid}

       // you all the psList which are protected by primary DPM

    3. now iterate over this list and get datasources with extra option of -replica for only thing protected on primary

       Get-Datasource -ProductionServer $ps -Inquire -replica


    Thanks, NikhilKumar.R [MSFT] - This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, February 10, 2011 2:51 PM