maybe this helps..
Set location = GetObject("WinNT://server,computer")
Set User1 = location.Create("user", "admin")
User1.SetPassword "something"
User1.SetInfo
Set Group = GetObject("WinNT://server/Administrators,group")
wscript.echo(user1.adspath)
Group.Add(User1.ADspath)
Set location = GetObject("WinNT://server,computer")
Set User1 = location.Create("user", "admin")
User1.SetPassword "something" User1.Put "userAccountControl", &h10000
User1.SetInfo
This must be it. Hope you can use this. You can make a const from the &h10000 so you know what it did when you read the script again in a year. Const ADS_UF_DONT_EXPIRE_PASSWD = &h10000
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.