Re: Password Expiration Date.
- From: "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 Jun 2009 07:19:33 -0500
"Florian Frommherz [MVP]" <florian@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:u4HsbmW%23JHA.1336@xxxxxxxxxxxxxxxxxxxxxxx
Howdie!
Luca wrote:
I need to set same expiration date to all passwords for all users in my
domain ...
Could anyone help me ?! I am able to find how to ...
Thanks in advance.
Check the script from the Scripting Guys:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/jul05/hey0706.mspx
Are you sure you want ALL users to have their passwords expired? I can
imagine that causes a call storm at the help desk and a huge load on the
DCs. I, personally, would opt for expiring users' passwords in batches (1
division/week,...)
Cheers,
Florian
As noted in the link, you can expire passwords by running a script that
assigns 0 to the pwdLastSet attribute. You cannot assign any other value.
You cannot make passwords expire at some date in the future. Your script
must run at the moment you want all passwords to expire. You would do this
for all users desired. For example, for all users in an OU:
' Bind to the organizational unit.
Set objOU = GetObject("LDAP://ou=West,dc=MyDomain,dc=com")
' Enumerate users.
For Each objUser In objOU
' Only operate on users.
If (LCase(objUser.Class) = "user") Then
' Expire password.
objUser.pwdLastSet = 0
objUser.SetInfo
End If
Next
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
.
- References:
- Password Expiration Date.
- From: Luca
- Re: Password Expiration Date.
- From: Florian Frommherz [MVP]
- Password Expiration Date.
- Prev by Date: Re: sysvol folders missing
- Next by Date: Re: Password Expiration Date.
- Previous by thread: Re: Password Expiration Date.
- Next by thread: Re: Password Expiration Date.
- Index(es):
Relevant Pages
|
Loading