How to remove old retired or orphaned agents from DPM 2010
DId you remove/reinstall a Server which had a DPM Agent installed, without removing it from DPM before?
In DPM 2007 you could easily go on uninstall, the uninstall would fail, but it will ask you afterwards if you want
to remove the agent from the database. In DPM 2010 this behavior changed, the uninstall fails, and no option to remove the the orphaned agents.
This is what you may need to do if you get the following error.
o C:Program FilesMicrosoft DPMDPMbinRemove-ProductionServer.ps1 : DPM was unable to remove the protected computer DPM02 from one of the following groups:
1. Distributed COM users
2. DPMRADmTrustedMachines
3. MSDPMTrustedMachines
At line:1 char:30
+ .Remove-ProductionServer.ps1 <<<<
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Remove-ProductionServer.ps1
Now remove all SIDs from the above groups, since the server was no longer in there by name due to domain removal. When you reran the command with the FQDN, you may receive the following error:
There is failure while removing production server
C:Program FilesMicrosoft DPMDPMbinRemove-ProductionServer.ps1 : DPM was unable to remove the protected computer DPM02.mydomain.com.
At line:1 char:30
+ .Remove-ProductionServer.ps1 <<<<
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Remove-ProductionServer.ps1
However, after refreshing the console, the agent is now removed.
Comments
Anonymous
January 01, 2003
What about a workgroup added computer that fails. The script above throws an error that the server can not be found in AD. Well DUH it is not in AD it is in a workgroup. MS documentation has really been coming up short in the past few years. Especially when forcing users to use scripting and power shell to do mundane tasks that should be no-brainers.Anonymous
January 01, 2003
The comment has been removedAnonymous
November 30, 2010
The comment has been removedAnonymous
March 15, 2011
Yeah i have to agree on this one .. its a very simple addition to the GUI why can't it just be done right.Anonymous
March 31, 2011
The comment has been removedAnonymous
November 10, 2011
@Fred, Thanks. It worked perfectly.Anonymous
February 16, 2012
Nice solution Fred, that works beautifully...Anonymous
August 14, 2012
Worked Perfectly, thanks!Anonymous
April 12, 2013
The comment has been removedAnonymous
May 08, 2013
Fred's advice does not work it the agent was from a workgroup or from none trusted domain. The uninstall option does not exist.Anonymous
February 15, 2014
Thank you FRED!Anonymous
May 26, 2014
have to say - stop whining about having to use the management shell - its only one command and it works spot on - even if the target is a non domain or workgroup machineAnonymous
June 19, 2015
The comment has been removed