![]() |
|
|
|||||||
| Petri.co.il is happy to award auglan the title of Most Valuable Member !!! |
| Register | Calendar |
Search |
Today's Posts |
Mark Forums Read |
| Notices |
|
|
Disable Active Directory user accountthis thread has 2 replies and has been viewed 12092 times
|
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||||||
|
||||||||
|
Hi everyone!
I am new to scripting but please bear up with me. I am trying to run the script below to disable a user account in Windows 2000 Server Active Directory. Const ADS_UF_ACCOUNTDISABLE = 2 Set objUser = GetObject _ ("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com") intUAC = objUser.Get("userAccountControl") objUser.Put "userAccountControl", intUAC OR ADS_UF_ACCOUNTDISABLE objUser.SetInfo When I run this code, I get the 8007202B error: A referral was returned from the server. Could anyone assist me with this please? I would highly appreciate it. |
|
#2
|
||||||||||
|
||||||||||
|
This maybe a daft question but you have changed the LDAP query to point to your own domain and not the MS test one from Script Center.
topper.
__________________
There are 10 types of people in this world, those who understand binary and those who do not. |
|
#3
|
||||||||
|
||||||||
|
Hi topper,
I certainly appreciate your hint. Actually, I never modified the script from Script Center--which is why I am not getting any good result. The LDAP query should point to my domain. Again, thanx. I will try to play around with the LDAP line a bit. Further hints on this, still much appreciated. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| User login problem ! | sco1984 | Windows 2000 Pro, XP Pro | 5 | 5th September 2006 16:14 |
| help on net user add | netwarbler | Active Directory | 3 | 18th November 2005 22:27 |
| Problems w/ unlock user account script in Active Directory | Shane | General Scripting | 1 | 25th July 2005 23:29 |
| Active Directory User Logon Name Change | tech25 | Active Directory | 4 | 4th July 2005 09:14 |
| reject mail if user in Active Directory | pstacks | Exchange 2000 / 2003 | 3 | 4th May 2005 18:48 |