I'm trying to add a bunch of users via a script and a delimited file.
Here's the snippet:
objUser.AccountDisabled = False
objUser.Put "PasswordExpired", 1
objUser.Put "pwdLastSet", 0
objUser.SetInfo
It is all working except the "PasswordExpired" option, which according to all I've read is correct for forcing the users to reset their passwords the first time they login.
However, when the script is run it errors on the subsequest SetInfo since "The specified directory service attribute or value does not exist".
Has anyone else ever encountered this? Even using ADSI Edit I cannot see the PasswordExpired attribute in the Optional list for a user object.
Any help would be appreciated. Thanks.
Here's the snippet:
objUser.AccountDisabled = False
objUser.Put "PasswordExpired", 1
objUser.Put "pwdLastSet", 0
objUser.SetInfo
It is all working except the "PasswordExpired" option, which according to all I've read is correct for forcing the users to reset their passwords the first time they login.
However, when the script is run it errors on the subsequest SetInfo since "The specified directory service attribute or value does not exist".
Has anyone else ever encountered this? Even using ADSI Edit I cannot see the PasswordExpired attribute in the Optional list for a user object.
Any help would be appreciated. Thanks.