Ever wanted to pull a list of all members of a computers local administrator group without physically touching a computer?

Here is how you do it:

Create yourself an emtpy batch (.BAT) file.

Edit the batch file with so it contains the following commands:

view plain print about
1REM --------------------------------------------------------------
2
3net localgroup administrators >
c:\"text file of your choice"
4
5REM --------------------------------------------------------------

Set the script to run at login. The next time a user logs in, the data will be recorded to your file.

Now lets get a little bit creative with this script. Lets say you have an Active Directory domain and you need to get this iformation off of several hundred computers and don't want to physically touch each computer. Try this:

First make sure you have some place you can store all of the data to be generated (i.e fileserver). Set permissions as needed.

Create yourself an emtpy batch file.

Edit the batch file to contain the following commands:

view plain print about
1REM ------------------------------------------------------------------------
2
3@echo off
4
5REM This will create the folder with the computer name on the server you specify
6
7mkdir \\"server name"\%computername%
8
9REM Retrieve user data from administrators group and copy to the appropriate folder
10
11net localgroup administrators >
\\"server name"\%computername%\"your filename.txt"
12
13EXIT
14
15REM -------------------------------------------------------------------------

Set up a Group Policy Object to run this batch file at login and watch the data pour into your data repository.