Haveing never worked with VB, but having perl and java exp I tried my hand at a script to change the local password on machine I came up with this:
'| /p:newPass4LocalAdministrator
Option Explicit: Dim Named, sPasswrdAdmin, oUser
Set Named = WScript.Arguments.Named
sPasswrdAdmin = Named.Item("p")
Set oUser = GetObject("WinNT://./Administrator, user")
oUser.SetPassword(sPasswrdAdmin)
oUser.SetInfo
It works on my local machine when I run it from the command prompt, but when I place it in the startup scripts on the GP server it does not seem to run as the password does not get changed. Any ideas on why? I know that the group policy server is working because I can change the policies and those take effect.
'| /p:newPass4LocalAdministrator
Option Explicit: Dim Named, sPasswrdAdmin, oUser
Set Named = WScript.Arguments.Named
sPasswrdAdmin = Named.Item("p")
Set oUser = GetObject("WinNT://./Administrator, user")
oUser.SetPassword(sPasswrdAdmin)
oUser.SetInfo
It works on my local machine when I run it from the command prompt, but when I place it in the startup scripts on the GP server it does not seem to run as the password does not get changed. Any ideas on why? I know that the group policy server is working because I can change the policies and those take effect.