Solved

in the process of changing admin passwords, want a script ot get a list of computers

Posted on 2008-06-17
4
169 Views
Last Modified: 2010-05-18
we are in the process of changing the local administrator passwords of all our client computers. i have tested the utitlty pspasswd.exe to change the passwords and now want to implement it. need a script that can extract a list of computers in a text file that i can use for changing passwords.
0
Comment
Question by:mgmohiuddin
4 Comments
 
LVL 38

Accepted Solution

by:
Shift-3 earned 250 total points
ID: 21802976
Paste the script below into a text file with a .cmd extension.  Run it either from a 2003 server or a workstation with the Administration Tools installed.  It will create a list named computerlist.txt in the same directory.


@echo off

setlocal enabledelayedexpansion
 

for /F %%G in ('dsquery computer -o samid') do (

 set comp=%%~G1

 echo !comp:$=! >> computerlist.txt

)

Open in new window

0
 
LVL 17

Assisted Solution

by:Jared Luker
Jared Luker earned 250 total points
ID: 21807697
You can just do an export from your computers OU in Active Directory User and Computers and save it out to a text file if you like.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now