Solved

Script that takes list of Machine Names and returns last logon user from WINS

Posted on 2004-08-17
12
241 Views
Last Modified: 2010-04-17
The title is basically what I am looking for.  We are doing a domain migration and we get a list of machines that have failed/succeded and need to be able to find out who was last logged in to the computer.  We are currently pulling up WINS and manually typing in the machine names for returns, but hopefully somebody has or can write a script that will take a text file of computer names and return a text file with a list of the computer names matched to the last logon user.  VBScript would probably be the easiest to work with, but any language that I can somewhat decipher will work.....

Thanks.
0
Comment
Question by:Lobo_NT
  • 5
  • 5
12 Comments
 
LVL 3

Expert Comment

by:kumvjuec
ID: 11829919
0
 
LVL 3

Expert Comment

by:kumvjuec
ID: 11829935
0
 

Author Comment

by:Lobo_NT
ID: 11830255
Thanks for the info kumvjuec.  I don't see were the netsh command can take a list of computer names and pipe out the WINS information for those computers to a file?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 3

Expert Comment

by:kumvjuec
ID: 11830303
you have to do that part in your batch file, or script. redirecting the output, or appending to the file is easy.
For redirecting the output to a file (for append) you can simple use

dir >> file.txt

the >> operator appends the output of dir command to the file. checking out how to do the read thing :)
0
 

Author Comment

by:Lobo_NT
ID: 11830339
Yes, I know how to pipe output to a file, but what is the netsh command to get the list from a text file and return WINS information?
0
 
LVL 3

Expert Comment

by:kumvjuec
ID: 11830356
can you tell me how do you manually do the stuff for getting user information
0
 

Author Comment

by:Lobo_NT
ID: 11830398
Open WINS, right click on Active Registrations, click on filter records matching this IP address, type in the IP address and the information on that IP is displayed.  [3h] Messenger typically has the Username of the person who last logged into the computer.
0
 
LVL 3

Expert Comment

by:kumvjuec
ID: 11835713
http://support.microsoft.com/?kbid=260324

See if that is similar to what you want
0
 

Author Comment

by:Lobo_NT
ID: 12044899
Question can be closed.  I worked out the solution to the problem on my own.  Although kumvjuec tried, his answers were not what I needed, that's why I didn't award him any points.
0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 12088052
PAQed - no points refunded (of 330)

GhostMod
Community Support Moderator
0
 

Author Comment

by:Lobo_NT
ID: 12088098
What kinda crap is this?  I ask a question, don't get the answer and lose points?  
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

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

856 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