Sign in with
Sign up | Sign in
Your question

changing local admin password

Last response: in Windows 2000/NT
Share
Anonymous
August 24, 2004 3:36:37 PM

Archived from groups: microsoft.public.win2000.group_policy (More info?)

can i change local admin pass users in a domain at once ?
thanks...
Anonymous
August 24, 2004 7:20:10 PM

Archived from groups: microsoft.public.win2000.group_policy (More info?)

Dimitry,
can you help me for writing script.
thanks...
Anonymous
August 24, 2004 10:38:21 PM

Archived from groups: microsoft.public.win2000.group_policy (More info?)

Could you also use this script to rename any local ADministrator account
back to "Administrator" ?

Dmitry Korolyov [MVP] wrote:
> Sure, here's an example:
>
> ' BEGIN SCRIPT -------------------------------------
> Dim Container
> Dim ContainerName
> Dim User, UsrSID, b
> Dim WshNetwork
>
> Set WshNetwork = WScript.CreateObject("WScript.Network")
> ComputerName=WshNetwork.ComputerName
>
> Set objWMIService = GetObject("winmgmts:" _
> & "{impersonationLevel=impersonate}!\\" & ComputerName & "\root\cimv2")
>
> strSelect="Select * from Win32_UserAccount"
>
> Set colSystemUsers = objWMIService.ExecQuery (strSelect)
>
> For Each objSystemUser in colSystemUsers
> if Right(objSystemUser.SID,3)="500" Then
> Set objUser = GetObject("WinNT://" & ComputerName & "/" &
> objSystemUser.Name & ",user")
> NewPassword="MySuperPasswordNoBodyWouldGuess"
> Call objUser.SetPassword(NewPassword)
> Exit For
> End If
> Next
> ' END SCRIPT ---------------------------------------
>
> The script works with any renamed built-in administrator account as it
> uses RID lookup instead of name lookup (built-in administrator account
> always has RID=500).
>
> --
> Dmitry Korolyov [d__k@removethispart.mail.ru]
> MVP: Windows Server - Active Directory
>
>
>
> "browser" <xeontr@yahoo.com <mailto:xeontr@yahoo.com>> wrote in
> message news:o kHs2SdiEHA.2624@TK2MSFTNGP12.phx.gbl...
> Dimitry,
> can you help me for writing script.
> thanks...
>
Anonymous
August 25, 2004 2:49:37 PM

Archived from groups: microsoft.public.win2000.group_policy (More info?)

thank you very much Dmitry...
!