========================================================================== Check-ProductionServer (save as .ps1 file) ========================================================================== param([string] $DPMServerName, [string] $PSName) if(!$args[0]) { if(!$DPMServerName) { $DPMServerName = read-host "DPMServer:" } } else { if(("-?","-help") -contains $args[0]) { write-host Usage:: write-host Check-ProductionServer.ps1 -DPMServername [DPMServer] -PSName [Production server] write-host Help:: write-host -Checks whether DPM server can enumerate datasources from a given production server. write-host exit 0 } else { write-host "Usage -? for Help" exit 1 } } if(!$PSName) { $PSName = read-host "PSName:" } $dpmServer = Connect-DPMServer $DPMServerName if (!$dpmServer) { Write-Error "Unable to connect to $dpmServerName" exit 1 } $PS = Get-ProductionServer -DPMServerName $DPMServerName | where { ($_.machinename,$_.name) -contains $PSName } if(!$ps) { write-Error "Could Not Find Production Server::$PSName" Disconnect-dpmserver exit 1 } $ds = Get-Datasource -productionserver $PS -Inquire -ErrorVariable inquiryError if($inquiryError -and (!$ds -or $ds.Length -eq 0)) { Write-Host "If this is a Secondary DPM server, you cannot add secondary protection for datasources under $PSName. Try disable and enable protection to fix this issue" } else { write-host "No issues detected. DPM Server could successfully enumerate datasources from production server $PSName" } Disconnect-dpmserver ========================================================================== UpdatePrimaryDPM (save as .cmd file) ========================================================================== @echo off if (%1)==() goto :DEFAULT set DPMINSTALLPATH=%1 goto :PROCESSING :DEFAULT set DPMINSTALLPATH=%ProgramFiles%\Microsoft DPM\DPM echo Using the default Install Path %DPMINSTALLPATH% :PROCESSING reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Data Protection Manager\Setup" /v InstallPath /t REG_SZ /d "%DPMINSTALLPATH%" /f sc config DPMRA binPath= "\"%DPMINSTALLPATH%\bin\DPMRA.exe\" -DPMRA"