Hi, I created a script to import users from a file. Everything's ok except user options. A red a lot about the User flags that you can set to get what you want but I don't know how to set the "user must change password at next logon" option.
This part of the script goes like this:
It doesn't work like it should, options never change.
You can find information on that site:
Can anyone help me!
thanks a million.
This part of the script goes like this:
Code:
Set usr = GetObject("LDAP://CN=username,organization,DC=domain,DC=com" )
flag = usr.Get("UserAccountControl")
newFlag = flag OR &h220 ' here is where you mask the
' the good bits
usr.Put "UserAccountControl", newFlag
wscript.echo usr.Get("UserAccountControl")
usr.setinfo
It doesn't work like it should, options never change.
You can find information on that site:
Can anyone help me!
thanks a million.