none
Remove decommissioned / surplused server from Unprotected computers with protection agent on Management tab... RRS feed

  • Question

  • How do you remove decommissioned / surplused  server from "Unprotected computers with protection agent" on Management tab.   The computer / server is no longer available and has been taken away....  Is there a SHELL command to remove this server?

    RLR:-)

    Tuesday, April 10, 2012 5:59 PM

All replies

  • Hi,

    You should simply right-click the agent and choose the uninstall option. If the server cannot be reached, it should supply the option to remove it from the DPM databases.   If that does not work, then you can use the DPM PowerShell command Remove-ProductionServer.ps1


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, April 10, 2012 7:02 PM
    Moderator
  • Normally, I think this is the way it should be done; however, in this case it does not.

    When I right-click to "Uninstall" the Uninstall Agents window pops up with "Uninstall protection agent from servername".    When I click the Uninstall Agents button, the Enter Credentials windows pops up.  I enter the user name and password for the server that no longer exists and the results are "Failed".

    Tuesday, April 10, 2012 7:15 PM
  • Hi

    Under the failed tab, is there a link to remove protected server from the database ?


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, April 10, 2012 7:17 PM
    Moderator
  • No there is not a link under the failed tab to remove protected server from the
    database. 

    Thanks.

    RLR:-)


    Tuesday, April 10, 2012 7:19 PM
  • How does the Remove-ProductionServer.ps1 work?  Open the DPM shell and enter the following command?

    Remove-ProductionServer.ps1 -DPMServerName "theDPMServerName" -PSName "theMissingServerNameIdLiketoRemove"

    Tuesday, April 10, 2012 8:20 PM
  • Hi

    Just run Remove-ProductionServer.ps1 and it will prompt you fo the rest of the parameters one at a time.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, April 10, 2012 8:22 PM
    Moderator
  • Result:

    PS C:\Program Files\Microsoft DPM\DPM\bin> Remove-ProductionServer.ps1
    DPMServer:: dmpservername
    PSName:: servername
    There is failure while removing production server
    C:\Program Files\Microsoft DPM\DPM\bin\Remove-ProductionServer.ps1 : DPM was unable to remove the protected computer servername.
    At line:1 char:28
    + Remove-ProductionServer.ps1 <<<<
        + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorExcep
       tion
        + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio
       n,Remove-ProductionServer.ps1

    Make sure that the protected computer is attached to the DPM server. If the protected computer is in the Active directory domain, make sure that you have provided the correct fully qualified domain name (FQDN) of the protected computer. If servername is a workgroup computer configured to use NETBIOS, specify the NETBIOS name. Otherwise specify the DNS name of the workgroup computer.

    Tuesday, April 10, 2012 8:29 PM
  • Hi

    Was that server part of a cluster by chance ?  Does this return anything ?

    USE DPMDB
    DECLARE @ServerId Guid
    SELECT @ServerId = ServerId 
    FROM tbl_AM_Server
    WHERE Servername = 'FQDN'   -- replace with FQDN of protected server IE: OldServer.domain.com  - maintain the single quotes.
    AND MarkedForDeletion = 0
    Select cn.ClusterID as ClusternodeClusterID, IA.ClusterID as InstalledAgentCusterID,CN.ServerName, IA.ServerId from dbo.tbl_AM_ClusterNode CN
    join dbo.tbl_AM_InstalledAgent IA on IA.clusterid = CN.clusterid
    where ServerId = @ServerId


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, April 10, 2012 10:17 PM
    Moderator
  • Sorry, that server was not part of a cluster.

    Thanks,

    RLR:-)

    Wednesday, April 11, 2012 1:20 PM
  • OK, See if this removes the agent.

    1. Make a backup of the DPMDB by running dpmbackup -db from an administrative command prompt,

    2. Run this SQL query.

     DECLARE @NOW DATETIME
      SET @NOW = GETDATE() --Current date and time
      use dpmdb
      Update tbl_am_installedagent
      set Deleted = '1', DeletedDateTime = @NOW, PatchID = NULL, ApprovedPatchByAdmin = NULL
      Where serverid in (select Serverid from tbl_am_server where serverName = 'FQDN')  -- replace with FQDN of protected server IE: OldServer.domain.com  - maintain the single quotes.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, April 11, 2012 1:58 PM
    Moderator
  • I had to run this same script to purge old servers off and I was able to reproduce the same error as original poster. However, if you provide the FQDN (instead of just server1, type server1.contoso.local) for when it prompts you for DPMServer and PSName, it works like a champ.


    Gary Adkins

    Friday, January 4, 2013 1:31 AM
  • Hi, I am having the same issue with 2 servers that are part of a cluster.  They were in a domain that no longer exists.  I am unable to remove them from the DPM UI or using remove-productionserver.ps1 for either server name or cluster name.

    Can I trash them directly from the database?

    Thursday, June 6, 2013 12:05 AM
  • Close the DPM console.

    Go into the DPMDB > dbo.tbl_AM_ClusterNode

    edit the table and find the row for the cluster nodes and the second to last column is called "IsDeleted", change the value from False ( shows as 0 when viewing the table, False when editing) to True (shows as 1 when viewing the table, True when editing) and then restart the DPM console. 

    If for some reason the servername column is empty and you can't figure out which row goes along with your nodes open the dbo.tbl_AM_ClusterDetail table and you will be able to identify the GUID for the cluster in the DPM DB which you can cross-reference the dbo.tbl_AM_ClusterNode ClusterID column with to locate the correct rows.

    Cheers,

    Michael




    Monday, February 17, 2014 10:33 PM
  • Hello

    yes, my nodes are member of a Cluster. how can i remove it?

    by researching about this Problem, i found that an older hyperv Cluster still exists in the dpm database (had to be several month or years old). how can i remove it? (i'm looking for a clean way, when possible not only by deleting it in the database)


    Martin Volkart, IMV Informatik

    Monday, January 12, 2015 1:03 PM
  • sorry.. there is an additional information:

    when removing the nodes with the script, there is an error, but later you will find, that the nodes are deleted.

    ..the Cluster object still exists in the database.


    Martin Volkart, IMV Informatik

    Monday, January 12, 2015 1:05 PM
  • Maybe related to DPM 2016 only:

    I've seen that in table tbl_am_server all records to the old servers remain untouched by above SQL statement.

    But there is a column "MarkedForDeletion" that cryes for an update like in following:

    Update tbl_am_server  
    set MarkedForDeletion = '1'  
    where servername in ('FQDN')  -- replace with FQDN of protected server IE: OldServer.domain.com  - maintain the single quotes.

    Does this makes sense to you all?

    Or should this column value remains untouched at value '0'?

    Currently, it doesn't seem to have any effect to me: the records don't disappear or anything after 10 minutes.

    But Get-DPMProductionServer still shows the old server entries after SQL by Mike and after above SQL by me.

    • Edited by Jochen Wezel Wednesday, February 1, 2017 1:56 PM Intermediate result: nothing happened yet
    Wednesday, February 1, 2017 1:45 PM
  • Old post but worked on 2012 R2 (4.2)  Archive server rebuilt with server 2016 but not removed from DPM or AD before rebuild so DPM in a flap.

    Tuesday, July 25, 2017 9:53 AM