Scripting the DPM agent installation...
Published Feb 14 2019 07:48 PM 1,966 Views
First published on TECHNET on Jul 02, 2007

Installing the DPM protection agent in your environment can be a challenging task if you have a large number of computers to backup. This may be made harder by security lockdowns, firewalls or other configurations in your environment. Given the challenges, the out-of-box experience team for DPM 2007 implemented an alternative, scriptable way to install the agent. This allows you to do the following:

·         Use software deployment tools like SMS to manage large no. of agent installations.

·         Create a standard server image with the DPM protection agent already rolled into it! Just assign the DPM server name using a tool when bringing up a new box and you are ready to go.

·         Install agent on firewalled computers without having to manually configure the firewall (for Windows Firewall).

·         Workaround other security lockdowns or configurations in your environment that cause the agent installation to fail via DPM. No more “DPM Protection Agent install failed with Access is denied”!!!

Installing the agent manually on the target computer:

1.       From the download, find the DPMAgentInstaller.exe in DPM2008\Agents folder. Use DPMAgentInstaller_AMD64.exe for 64-bit computers. Place these files on a share.

2.       On each target computer, run DPMAgentInstaller.exe <DPM computer name>. Ensure that an entry for the DPM Protection Agent appears in the Add/Remove Programs applet. At end of the install on Windows Server 2003 or 2008, you will require to restart the computer. You may use SMS to automate this step.

3.       Now for some Powershell scripting to make life easy. Put the list of all machines to be attached to the DPM server into a computer_list.txt and run the following script from the bin folder in the DPM installation. This script works assuming the same account/password can be used for administrator access to all the servers in the list.

- - - - - save the script below as a powershell script (.ps1) and run it - - - - -

param([string] $DPMServerName, [string] $PSFileList)





$DPMServerName = read-host "DPMServer:"





$PSFileList = read-host "PSFileList:"


$UserName =  read-host "UserName:"

$Pwd = read-host "Password:"

$Domain = read-host "Domain:"

type $PSFileList | foreach -process {

if (!$_.Equals(""))


.\Attach-ProductionServer.ps1 -DPMServerName $DPMServerName -PSName $_ -Username $UserName -Password $Pwd -domain $Domain



- - - - - - - - - - - - - - - End of script - - - - - - - - - - - - - - - - - - - -

4.       Open the DPM administration console and refresh the status of the agents in the Agents tab.

5.       You are ready to setup protection!

Creating a ready to protect image:

Many IT departments and administrators use images of the OS with the required software rolled in. Like anti-viruses, you can update your OS image with the DPM protection agent installation so that it is ready to protect when a computer is brought up with this image. Here’s what to do:

Preparing the image:

1.       Create the OS installation.

2.       Run DpmAgentInstaller.exe (without any parameters) to install the agent.

3.       Capture the image with your favorite software… done!

When applying an image:

1.       Boot up the machine and join machine to a domain.

2.       Log on as a domain user with administrator permissions on the machine.

3.       From %Program Files%\Microsoft Data Protection Manager\bin folder, run SetDpmServer.exe <DPM Server Name>.

4.       On the DPM server, open the DPM management shell. Run Attach-ProductionServer.ps1 with the required parameters.

5.       Refresh the status of the agents tab in the UI to complete the attach.

- Prashant Kumar

Version history
Last update:
‎Mar 11 2019 07:55 AM
Updated by: