Hi all,

I am looking to bind to LDAP and delete a Computer Name from the 'Workstations' Organizational Unit (OU) from my Active Directory

There a no problems binding and connecting, have been able to do searches in Active Directory for users etc... but so far, am confused at the correct way to delete objects

I have found the function

ldap_delete

but cannot see any examples of using this and each time I attempt to code something, nothing happens

Anyone have any examples or suggestions that could help?

e.g. I would like to delete the Computer named 'UKW1TESTER01' from the OU 'Workstations' from the domain named 'UK'

Thanks in advance, 🙂

    After a quick search on google, I have found:

    http://www.phpdig.net/ref/rn33re622.html.

    If this function does not work and you are authenticating with a user with sufficient priv's, check your Event Viewer to see if there is any error output available.

    Another option may be to use phpLdapAdmin - to see if it is capable of deleting the Workstation, and what kind of output it returns, you can also look at the code to inpect the method they used to delete an entry.

    If you are planning on deploying/selling this software be sure to check phpLdapAdmin's license before using ANY of their code.

    Good Luck!

      Write a Reply...