Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: dsDeleteObj Issue Problem Delete Object LDAP
LDAP://CN=ComputerName,OU=Computers,OU=MyOU,DC=root,DC=MyDomain,DC=org which works fine for other ADSI commands in winbatch.The help file claims that this command always returns 0. That is kind of useless. I saw an example in the tech area of someone using the return to check the delete success, so is it even true that it always returns a 0?
You could give accessing AD via WinBatch COM a try. Post back if you need assistance with this.
As for the return value, don't believe everything you see on the internet {grin}. DsDeleteObj always returns 0. The underlying ADSI client API is supposed to report any errors that occur when the delete fails and the function will echo errors that occur during the process so returning anything other than 0 is not very meaningful. Do you have WinBatch error handling turned off?
Article ID: W17524
Filename: dsDeleteObj Issue.txt
File Created: 2012:12:06:08:39:46
Last Updated: 2012:12:06:08:39:46