How to remove a server from Univention directory
You want to decomission one of the UCS servers running in your UCS domain.
Note: A UCS master server can not be decomissioned. Only backup, slave and member roles can be decomissioned.
Power off your server to be decommissioned.
In the UMC remove the server from LDAP:
Remove the server from the Samba-AD replication by:
samba-tool domain demote --remove-other-dead-server=<server name>
samba-tool drs kcc
Step 4 (optional)
If you still see fragments of the server you can use the old build-in script to remove all entries from OpenLDAP directory and Samba/AD. (was needed before samba-tool domain demote was published)
/usr/share/univention-samba4/scripts/purge_s4_computer.py --computername=<server name>
You may receive errors, as normally step 2 should have done this allready.