Shawn.
Since AD is installed on this domain I think I should use ADSI. By searching in the board I found piece of code done by you (OU BAD BOYS)and I think it’s answer 80% of what I need. http://kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=002588


I still need your help please.

Please excuse me if the following questions seem to you silly, I am totally new to AD & I didn’t tack any course about it.

The user who I want to disable/enable his account is in the following path (I got this path from the domain LAN administrator)

LDAP://ABCD-00730-nd05.zain.com/CN=noor NIaa.,OU=Test,OU=Messaging,DC=zain,DC=com

My question are:
In $sysinfo = createobject("adsysteminfo")

Should I put this path as ("adsysteminfo") ?

How can I get this path through the script? I mean can I search for it if I have only the users account which I want to disable his account?

In $user = getobject("LDAP://"+$sysinfo.username)
Should I place the user account in username?
Thank you.