Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Looking for adsi account options object

0 views
Skip to first unread message

Erin0

unread,
Sep 9, 2004, 3:44:33 PM9/9/04
to
I had that question:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q305144

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
>
>


modo

unread,
Sep 9, 2004, 5:23:03 PM9/9/04
to
Sorry I new to this. What am I doing wrong here.

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

Erin0

unread,
Sep 10, 2004, 9:00:24 AM9/10/04
to
This is what makes me not so happy about their answer.

Try:
objuser.UserAccountControl = 64


"modo" <mo...@discussions.microsoft.com> wrote in message

news:D7EA9C60-CAC9-45D1...@microsoft.com...

modo

unread,
Sep 10, 2004, 1:49:02 PM9/10/04
to
I tried this.
objuser.UserAccountControl = 64

This is the wierd part. The above line only works with number "128".

I tried 32, 64, 128, 256

thanks for the help

Erin0

unread,
Sep 10, 2004, 3:11:57 PM9/10/04
to
Huh. Try the hex 0x0040

"modo" <mo...@discussions.microsoft.com> wrote in message

news:E6E874E9-B123-443E...@microsoft.com...

Shivaram Siddappa

unread,
Nov 26, 2004, 11:39:03 AM11/26/04
to
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
I appriciate your help.
Thanks

Torgeir Bakken (MVP)

unread,
Nov 26, 2004, 2:21:34 PM11/26/04
to
Shivaram Siddappa wrote:

> 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

0 new messages