I have a script that creates a local account on a server
and puts the user in the Users group. I need it to also
check the following boxes: User cannot change password
and Password never expires.
Here is what I have:
'Create gssrdp local user account
strComputer = "MyComputer"
Set colAccounts = GetObject("WinNT://" & strComputer
& ",computer")
Set objUser = colAccounts.Create("user", "gssrdp")
objUser.SetPassword "password"
objUser.SetInfo
'Add gssrdp user to the local Users group
strComputer = "MyComputer"
Set objGroup = GetObject("WinNT://" & strComputer
& "/Users,group")
Set objUser = GetObject("WinNT://" & strComputer
& "/gssrdp,user")
objGroup.Add(objUser.ADsPath)
Any thoughts?
Thanks,
Jeff