none
Script for a DPM move project RRS feed

  • Question

  • Hello, we have a new DPM 2012R2 UR9 server that we stood-up with new disks/library etc... and we want to move our DPM backups from an older DPM 2012 R2 UR9 server. I know the process but with over 100 servers to do the manual process would be time consuming. Anyone know of a script that can take from a list and process the following on the old DPM server:

    Stop protection and retain the data on disk and tape

    Disable protection of the server

    Then need another script to run the following on each server in the list:  From elevated command prompt in directory %ProgramFiles%\Microsoft Data Protection Manager\DPM\Bin run SetDpmServer.exe dpmServerName ServerName

    I can then perform the last step manually on new DPM Server of agent install/attach

    Friday, June 17, 2016 6:57 PM

All replies

  • Found the following script but need assistance modifying it to

    1) Feed a script a list (CSV or TXT file of server names) that connects to DPM Server 1 and stops protection and retains data for both disk and tape

    2) Script then disables protection in DPM for each server in list

    3) Script or new script connects to each server in list and via elevated command prompt runs SetDpmServer.exe –dpmServerName servername

    4) Not necessary but would be great. Script that connects to DPM- Server 02 and performs an agent install/attach agent for each server in list

    Important the list is of server names not protection groups and I want to retain data on disk and tape.

    FROM: http://yetanotherdpmblog.blogspot.com/2012/12/powershell-how-to-delete-protection.html

    2- Delete a Protection Group 

    Connect-DpmServer $env:COMPUTERNAME
    $StringSearch="YourStringSearch"
    $PgList = @()
    $pgList = Get-ProtectionGroup -DPMServerName $env:computername
    where {($_.friendlyname) -match $StringSearch}
    foreach($Pg in $PgList){
    write-host ""
    Write-host "# ProtectionGroup Name " -ForegroundColor red -Nonewline
    Write-host $Pg.FriendlyName -ForegroundColor green
    $mpg = Get-ModifiableProtectionGroup $Pg
    $dsList = @()
    $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
    }
    Disconnect-DpmServer $env:COMPUTERNAME

    Friday, June 17, 2016 10:36 PM