none
Removing multiple computers from a protection group simultaneously RRS feed

  • Question

  • I am moving from DPM2010 to DPM2012 on a new server.  I need to remove computers from the protection group on DPM2010 before I can uninstall the agent.  Is there a way to remove more than one PC at a time?  I have 500+ agents on various computers in our domain and this could take a long time doing it one by one. 

    Thanks

    Monday, December 3, 2012 9:04 PM

Answers

  • Hi Deceks7,

    You should use DPM powershell to achieve your goals.

    I use this sample script to remove all datasources (Data are retained for recovery purpose) from a list of Protection Group:

    $search = "YourStringHere"
    $pgList = Get-ProtectionGroup -DPMServerName $env:computername | where { ($_.friendlyname) -match $search }
    foreach($pg in $pgList) { 
    $mpg = Get-ModifiableProtectionGroup $pg
    $dsList = Get-DataSource -ProtectionGroup $pg
    foreach($ds in $dsList) {
    write-host ("Remove data source " + $ds.Name)
    Remove-ChildDataSource -ProtectionGroup $mpg -ChildDataSource $ds -keepDiskData
    }
    Set-ProtectionGroup $mpg
    }

    Stephane.


    Please remember to click “Mark as Answer” on the post that helps you. This posting is provided "AS IS" with no warranties. knowledge is valid only if it is shared by All.

    My DPM blog Yet Another DPM Blog

    • Marked as answer by Deceks7 Monday, December 3, 2012 10:25 PM
    Monday, December 3, 2012 9:33 PM

All replies

  • Hi Deceks7,

    You should use DPM powershell to achieve your goals.

    I use this sample script to remove all datasources (Data are retained for recovery purpose) from a list of Protection Group:

    $search = "YourStringHere"
    $pgList = Get-ProtectionGroup -DPMServerName $env:computername | where { ($_.friendlyname) -match $search }
    foreach($pg in $pgList) { 
    $mpg = Get-ModifiableProtectionGroup $pg
    $dsList = Get-DataSource -ProtectionGroup $pg
    foreach($ds in $dsList) {
    write-host ("Remove data source " + $ds.Name)
    Remove-ChildDataSource -ProtectionGroup $mpg -ChildDataSource $ds -keepDiskData
    }
    Set-ProtectionGroup $mpg
    }

    Stephane.


    Please remember to click “Mark as Answer” on the post that helps you. This posting is provided "AS IS" with no warranties. knowledge is valid only if it is shared by All.

    My DPM blog Yet Another DPM Blog

    • Marked as answer by Deceks7 Monday, December 3, 2012 10:25 PM
    Monday, December 3, 2012 9:33 PM
  • Hi Deceks7,

    You should use DPM powershell to achieve your goals.

    I use this sample script to remove all datasources (Data are retained for recovery purpose) from a list of Protection Group:

    $search = "YourStringHere"
    $pgList = Get-ProtectionGroup -DPMServerName $env:computername | where { ($_.friendlyname) -match $search }
    foreach($pg in $pgList) { 
    $mpg = Get-ModifiableProtectionGroup $pg
    $dsList = Get-DataSource -ProtectionGroup $pg
    foreach($ds in $dsList) {
    write-host ("Remove data source " + $ds.Name)
    Remove-ChildDataSource -ProtectionGroup $mpg -ChildDataSource $ds -keepDiskData
    }
    Set-ProtectionGroup $mpg
    }

    Stephane.


    Please remember to click “Mark as Answer” on the post that helps you. This posting is provided "AS IS" with no warranties. knowledge is valid only if it is shared by All.

    My DPM blog Yet Another DPM Blog


    Thanks so much!
    Monday, December 3, 2012 10:25 PM