Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List the users on each computer

Status
Not open for further replies.

omegasa

Technical User
Mar 13, 2007
29
RO
Hi,


How can I list the users on each computer (win2000) to a .txt or .xls file ?

Something like this:

PC1 IP1 John
Steve
............
PCn IPn George
Tim
Frank
Thanks
 
Are you looking for a list of LOCAL user accounts or a list of domain accounts that have profiles on a given PC?

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
A list of domain accounts that have profiles on a given PC

thanks
 
You could use vbscript to enumerate the sub directories of Documents and Settings.

Something like:
Code:
Set fso = CreateObject("Scripting.FileSystemObject")
Set oFolder = fso.GetFolder("C:\Documents and Settings")
'Use the followign path instead of above for Vista
'Set oFolder = fso.GetFolder("C:\Users")
For Each userProfile in oFolder.subfolders
   wscript.echo userProfile.name
Next

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Thanks markdmac. But I need a procedure to access from my computer to another computer and get a list of users.

Thanks
 
The above script can access a remote system by binding to the remote machine via UNC.

Example: Set oFolder = fso.GetFolder("\\remotepc\c$\Documents and Settings")

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top