Opps I misread what you wanted.  I was reading account expires not password.  Sorry.  My response was no help.
 
-JS
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Matthew Saunders
Sent: Wednesday, December 05, 2001 6:10 AM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] Setting "Password Never Expires" for a user from a .vbs

Hi.  I use a vbscript to create users and folders from a commandline (like,
 
NEWUSER username firstname lastname group firstpasswd )
 
and I want to be optionally able to set "password never expires" for a user.  (which is appropriate in some situations I face).  I can do this via the GUI of course but my research has drawn a blank when I found this:
 
PasswordExpirationDate
The password expiration date is not a property on the user object. It is a calculated value based on the sum of pwdLastSet for the user and maxPwdAge of the user's domain. To get the password expiration date, call the IADsUser::get_PasswordExpirationDate method. You cannot modify this property for a user; instead, call IADsDomain::put_MaxPasswordAge method to change the setting for the domain. .
 
So does anyone have any ideas or is this basically impossible?  How does the gui change it per-user?
 
Many thanks,
 
Matthew Saunders
Just a humble ICT Teacher...

Reply via email to