Solved

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

Posted on 2008-06-17
4
173 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

756 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