Ldapsearch and Ldapdelete Examples

It happens sometimes that you want to run some command but you do not remember the whole syntax. Then you go to the man page to find that it has a ton of switches, you scroll to the bottom hoping to find an example you can re-use but there is none, then you Google it hoping that you won’t have to read the ton of switches. Here is my contribution for those Google searches with two useful ldap commands.

This is a simple script that connects to Active Directory, looks for a computer record and then deletes it.