Solved

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

Posted on 2008-06-17
4
172 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

860 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