Title: Message
This vbscript unlocks all users in a OU, modify for your needs
 
while TRUE
 
Set objOU = GetObject("LDAP://OU=Spider,OU=Betalingsverkeer,DC=rnbvu,DC=rabobank,DC=corp")
objOU.Filter = Array("User")
 
For Each objUser In objOU
     call unLockUser(objUser.sAMAccountName)
Next
 
Wscript.Sleep(120000)
 
wend
 
function unLockUser(userName)
   set oUser = GetObject("WinNT://RNBVU/" & userName)
   if oUser.IsAccountLocked then
      oUser.IsAccountLocked = FALSE
      oUser.SetInfo
   end if

end function
 

 



From: Steve Rochford [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 1:53 PM
To: [EMAIL PROTECTED]

I know that your program is far better than any script but an unlock script is easy to do and might give a starting point to people wanting to write scripts. What I've done before is:
 
net user > users.txt
 
Load the users.txt file into Excel and remove the header/footer. Make the 3 columns one longer column of users.
Now add a formula in (say) B1 which does ="net user " & a1 & "/active:yes"
fill this down, copy it to notepad and save it as a .cmd file
 
It's hardly elegant but it's easy to create and might get people thinking about other things which can be done easily with a batch file :-)
 
Steve
-----Original Message-----
From: Joe [mailto:[EMAIL PROTECTED]
Sent: 07 July 2003 20:26
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] Taking DC Offline

Check out unlock at www.joeware.net. Its free, its fast. Will display locked accounts or unlock them. Saves you the scripting time... Plus it runs faster than any script I have seen.
 
:o)
 
 

================================================
De informatie opgenomen in dit bericht kan vertrouwelijk zijn en
is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht
onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken en
de afzender direct te informeren door het bericht te retourneren.
================================================
The information contained in this message may be confidential
and is intended to be exclusively for the addressee. Should you
receive this message unintentionally, please do not use the contents
herein and notify the sender immediately by return e-mail.

Reply via email to