The Enabling Technologies Blog


Dealing with Orphaned Lync/Skype Contact Objects

When working with Microsoft Lync and/or Skype for Business Server, there may be situations where contact objects become orphaned. This can occur, for example, when removing trusted application servers (e.g. contact center application, etc.), decommissioning of a prior OCS/Lync deployment, or even response groups. I have also seen cases where a Standard Edition server virtual machine crashed, was rebuilt, added back into the topology exactly the same as before, and response group contacts remained even though they didn’t show up in Skype for Business control panel or management shell; they only existed in AD (discovered via ADSI edit).

You can use the details outlined below to backup/restore Active Directory before deleting objects as well as for searching for orphaned objects.

Backup the “Applications Contacts” Organizational Unit:

  • Open up ADSI Edit, connect to a DC, click the radio button “Select a well known naming context”, and select to “Configuration”.

Daveborphanblog1

  • Within ADSI Edit - Drill down into Configuration -> Services -> RTC Service -> Application Contacts. From here we can search for the objects we want to remove manually in ADSI edit, or we can export the objects and search the output file for the objects we want to remove. Either way, before removing anything, export the objects in the Application Contacts OU outlined below:
    • Open a CMD prompt and export all Contact Objects in "Application Contacts" using ldifde. Ensure to update this command with the you OU and file location (highlighted).
      • ldifde -d "CN=Application Contacts,CN=RTC Service,CN=Services,CN=Configuration,DC=domain,DC=com" -p subtree -o "uSNCreated,uSNChanged,objectguid,whencreated,whenchanged" -f .\AppContactsOUExport.ldfDaveorphanblog2 
        • Once Application Contacts are exported, you can open the file in notepad and search for the orphaned objects you want to remove. A common field to search is the “Display Name” field. Another suggestion would be to save a copy of the file that contains all the objects, then remove everything except the orphaned objects you are going to remove. Rename that file as “OrphanedObjectsRemoved.ldf”. That way, if you must import the objects back into AD, you are only importing the objects that were removed.
        • If an error occurs, you can view the .log and .err file(s) logged to this directory.
        • Once you discover the orphaned objects, you can delete them (at your own risk) from AD via ADSI edit (right click the object and delete). If by chance you have to import the deleted orphaned objects back in to AD, you can run the following command:
          • Import deleted orphaned objects back into AD:
            • ldifde -i -k -f .\ OrphanedObjectsRemoved.ldf -j .\
        Daveorphnablog3

 

Subscribe to Email Updates

Refine by

To expand the list, please click on the double arrows.

 

Search by Category or Author: