The script that does that forces user to change password on next login is
something like
Set objUser = GetObject ("LDAP://CN=user,OU=yourou,DC=domain,DC=com")
objUser.Put "pwdLastSet", 0
objUser.SetInfo
now you just need to wrap this with a LDAP query, so that the final result
is someting like this
Set objDSE = GetObject("LDAP://rootDSE")
strBase= "<LDAP://OU=yourstartOU," & objDSE.Get("defaultNamingContext") &
">;"
strFilter = "(&(objectClass=user)(objectCategory=person));"
strAttrs = "ADsPath;"
strScope="Subtree"
Set objConn = CreateObject("ADODB.Connection")
objConn.Open "Provider=ADsDSOObject"
Set objRS = objConn.Execute(strBase & strFilter & strAttrs & strScope)
While not objRS.EOF
' Attach to the user object
Set objUser = GetObject(objRS.Fields("ADsPath"))
objUser.Put "pwdLastSet", 0
objUSer.SetInfo
Wscript.Echo "Done"
objRS.MoveNExt
Wend
Schedule this script as a task to run after few days (under account that has
permission to modify user objects) and notify users prior.
Hope this helps. You could also use ADModify (search google.com) to do this.
--
Regards
Matjaz Ladava
MVP Windows Server - Directory Services
(e-mail address removed), (e-mail address removed)