I have to admit, I wasn't real happy with the answer.
"modo" <mo...@discussions.microsoft.com> wrote in message
news:ABE084CB-F4EF-475C...@microsoft.com...
>I am trying to find the object names I can set for things like
>
> account disabled
> user cannot change password.
> password never expires
> user must change password on next login
>
>
> Thanks
> Modo
>
>
Example
objUser.pwdLastSet = 0 "this sets the user must change password on login.
Now I want to set the flag to user cannot change password. I tried this
below but with no luck. Thans
objuser.UserAccountControl.PASSWD_CANT_CHANGE = 64
Try:
objuser.UserAccountControl = 64
"modo" <mo...@discussions.microsoft.com> wrote in message
news:D7EA9C60-CAC9-45D1...@microsoft.com...
This is the wierd part. The above line only works with number "128".
I tried 32, 64, 128, 256
thanks for the help
"modo" <mo...@discussions.microsoft.com> wrote in message
news:E6E874E9-B123-443E...@microsoft.com...
> I tried this option for local user account. It didn't worked. Could you
> please send me the script how to change local user account properties
> *user cannot change password.
> *password never expires
Hi
An example here:
http://groups.google.com/groups?selm=400D9FB5.FB0F7F88%40hydro.com
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx