Tech Support > Microsoft Windows > Windows Server > Force all domain users to change their password.
Force all domain users to change their password.
Posted by Julian on November 24th, 2005


How can I do this on a Windows2003 domain with XP & 2000 clients?

--
|
+-- Julian
|



Posted by Todd J Heron on November 24th, 2005


"Julian" <admin@JDMils.com> wrote in message...
If you are using Windows 2003 you can highlight and select multiple users at
once in AD Users & Computers, right-click and choose Properties, Account
tab, check the box "User must change password at next logon". This
obviously allows you to change this on all selected users at once. As an
alternative method, you can also do this using VBScript and WMI, exporting a
list of users and then use the following code to script against it:

' This VBScript code sets the flag that requires a user to change their
password
'
' ---------------------------------------------------------------
' From the book "Active Directory Cookbook" by Robbie Allen
' Publisher: O'Reilly and Associates
' ISBN: 0-596-00466-4
' Book web site: http://rallenhome.com/books/adcookbook/code.html
' ---------------------------------------------------------------
' ------ SCRIPT CONFIGURATION ------
strUserDN = "<UserDN>" ' e.g. cn=rallen,ou=Sales,dc=rallencorp,dc=com
' ------ END CONFIGURATION ---------

set objUser = GetObject("LDAP://" & strUserDN)
objUser.Put "pwdLastSet", 0
objUser.SetInfo
WScript.Echo "User must change password at next logon: " & strUserDN

Firther reference:
http://www.microsoft.com/technet/com...r/scrug30.mspx


--
Todd J Heron, MCSE
Windows Server 2003/2000/NT; CCA
----------------------------------------------------------------------------
This posting is provided "as is" with no warranties and confers no rights



Similar Posts