Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Can I lock an AD account manually

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,64612
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Can I lock an AD account manually
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Can I lock an AD account manually - 9/27/2008 3:59:29 PM   
  netxman

 

Posts: 113
Score: 0
Joined: 8/1/2005
Status: offline
I want sometimes to lock an account but not to disable it.

Set objUser = GetObject _
("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com")
objUser.IsAccountLocked = True
objUser.SetInfo



This code seems not work. It only works when you change the True to False, means Unlock an account.

Thanks.
 
 
Post #: 1
 
 RE: Can I lock an AD account manually - 9/28/2008 3:53:13 PM   
  the_apostle21


Posts: 54
Score: 0
Joined: 7/29/2005
Status: offline
Hi netxman,

To my knowledge, you cannot force an account to be locked.  The only way would be to exceed the password retry limit by logging on as the specific user with a dummy passsword.

Can you not disable the account, as that would work...

(in reply to netxman)
 
 
Post #: 2
 
 RE: Can I lock an AD account manually - 9/28/2008 5:55:22 PM   
  netxman

 

Posts: 113
Score: 0
Joined: 8/1/2005
Status: offline
Yes thanks the_apostle21.
 
I can disable the account and can try the wrong password for the specific account to lock it.

But it is not a wise way.

I thought if change the FALSE to TRUE will effect but it seems not work.


(in reply to the_apostle21)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Can I lock an AD account manually Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts