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

Change local Admin password on all domain PCs

4 views
Skip to first unread message

Ken

unread,
Aug 30, 2004, 11:25:02 AM8/30/04
to
Is there as group policy setting that will allow resetting all local
administrator passwords centrally?
If not does anyone know of a utility that would do this on 400 desktops?

-Ken


Dmitry Korolyov [MVP]

unread,
Aug 30, 2004, 11:31:59 AM8/30/04
to
You can script it. Just add the script to the startup scripts. Here's a code example:
 
Dim Container
Dim ContainerName
Dim User, UsrSID, b
Dim WshNetwork
 
Set WshNetwork = WScript.CreateObject("WScript.Network")
'--- Set objFSO=WScript.CreateObject("WScriopt.FileSystemObject")
 
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="MySuperPassword"
    Call objUser.SetPassword(NewPassword)
    Exit For
   End If
Next
The script doesn't care about built-in admin account's name, can be used with any name.
 

--
Dmitry Korolyov [d_...@removethispart.mail.ru]
MVP: Windows Server - Active Directory
 
 

Mike Herchel

unread,
Aug 30, 2004, 3:47:10 PM8/30/04
to
You can also use Sysinternal's pspwd.exe utility (I use it). www.sysinternals.com
"Dmitry Korolyov [MVP]" <d_...@removethispart.mail.ru> wrote in message news:u1lghaqj...@TK2MSFTNGP10.phx.gbl...

Hank Arnold

unread,
Aug 31, 2004, 4:20:49 AM8/31/04
to
Could you provide a link? I did a search on their site and it wasn't
found....

--
Regards,
Hank Arnold

"Mike Herchel" <michael.herchel[@]wavecrestlabs.com> wrote in message
news:eyUHjosj...@tk2msftngp13.phx.gbl...

Jerold Schulman

unread,
Aug 31, 2004, 11:31:46 AM8/31/04
to
On Tue, 31 Aug 2004 04:20:49 -0400, "Hank Arnold" <ras...@aol.com> wrote:

>Could you provide a link? I did a search on their site and it wasn't
>found....

http://www.sysinternals.com/files/pspasswd.zip

After unzipping, copy to a folder in your path.

pspasswd /?

PsPasswd v1.21 - Local and remote password changer
Copyright (C) 2003-2004 Mark Russinovich
Sysinternals - www.sysinternals.com

PsPasswd changes passwords on a local or remote system.

Usage: pspasswd [\\[computer[,computer,[,...]|Domain]|@file] [-u Username [-p
Password]]] Username [NewPassword]
computer Direct PsPasswd to perform the command on the remote
computer or computers specified. If you omit the computer
name PsPasswd runs the command on the local system,
and if you specify a wildcard (\\*), PsPasswd runs the
command on all computers in the current domain.
@file PsPasswd will change the password on the computers listed
in the file.
-u Specifies optional user name for login to remote
computer.
-p Specifies optional password for user name. If you omit this
you will be prompted to enter a hidden password.
Username Specifies name of account for password change.
NewPassword New password. If ommitted a NULL password is applied.

Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com

0 new messages