Solved

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

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

776 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