How to manually remove duplicate Citrix servers from the CMC using DSCHECK.

Sometimes continually moving XenApp servers from folder to folder or in and out of a farm, you can end up with the server name becoming duplicated in the CMC.   Here is a method from David Paoleschi using DSCheck to manually clean up your server farm. 

Procedure or Steps

Using DSCHECK Version 5.15 or greater with the /DropMember parameter, you can manually remove the server from the folder that it does not belong to.

/DropMember <ParentGroupDN> <MemberUID> – Drops a member with the given UID (not equivalent to DN) from a parent group with the given DN

How to use:

Be sure to test on a backup datastore first as the procedure cannot be reversed. Customers will need to have a current backup of the datastore before proceeding.

1. You will first need to find the folders that the particular server belongs to.

  1. output the folder groups that the particular server belongs to, issue the following command:  dscheck /full groups
  2. You may want to output the results to a text file so that it may be searched**
  3. Search for the server in question and validate the folder groups in the output are the same folder groups that the server appears under in the CMC. Then note the UID of the server and folder groups. In the example below the server in question is named CITRIX1 and appears in two separate folder groups.
  4. /ZONE1/NE and /ZONE1/SE
  5. Group (UID=78d4-0002-00107bfe) (DN=78d4-0002-00107bfe) (Type=Group) (Name=Servers/ZONE1/NE)…Done.
  6. Member (UID=1cea-000b-00000369) (DN=1cea-000b-00000369) (Type=Server) (Name= CITRIX1)…Done.
  7. Group (UID=78d4-0002-0010801b) (DN=78d4-0002-0010801b) (Type=Group) (Name=Servers/ZONE1/SE)…Done.
  8. (UID=1cea-000b-00000369) (DN=1cea-000b-00000369) (Type=Server) (Name= CITRIX1)…Done.
  9. To remove a server from a particular group, run the following command: dscheck /full groups /dropmember First_Prameter Second_Parameter

The First_Parameter is the UID of the "Group"

The Second_Parameter is the UID of the "Server"

The Server (CITRIX1) was found in the following CMC group folders

In /ZONE1/NE folder (UID=78d4-0002-00107bfe)

In /ZONE1/SE folder (UID=78d4-0002-0010801b)

Server Name=CITRIX1 (UID=1cea-000b-00000369)

To remove from the /ZONE1/NE folder

dscheck /full groups /dropmember 78d4-0002-00107bfe 1cea-000b-00000369

To remove from the /ZONE1/SE folder

dscheck /full groups /dropmember 78d4-0002-0010801b 1cea-000b-00000369

TAGS