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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determining logon server 1

Status
Not open for further replies.

nickhills

Programmer
Oct 18, 2001
34
0
0
GB
Is there anyway of finding out which DC has logged a user on.

going to each machine and doing 'echo %logonserver%' is gonna take a bit long with 500 machines, especially as when it can change in a couple of seconds, is there anyway of doing it centrally???


cheers all,

 
First, can I ask why you want to do this?

I thought the logonserver was set at login time so won't change very much. As such, the simplest way is to put a line in the login script like so:

@echo %logonserver% > \\someserver\someshare\%username%.txt

I tend to add a few more things in as well:

REM --- USERINFO LINES
@echo off
echo ----------------- >> \\someserver\someshare\%username%.txt
Date /t >> \\someserver\someshare\%username%.txt
time /t >> \\someserver\someshare\%username%.txt
echo %computername% >> \\someserver\someshare\%username%.txt
ipconfig /all >> \\someserver\someshare\%username%.txt
echo %logonserver% >> \\someserver\someshare\%username%.txt
REM --- END USERINFO

This gives me date/time of login, IP info and I ahve included the logonserver.

This is useful if the user can't remember which computer they are logged onto. You also have a a full history of every logon which the user makes. You can make it cleaner.
 
cheers loopy....

the reason i want to know is because we are having some problems with some one of our domain controllers, problem is we cant be sure which one.

the above suggestion would be great had it already been in place ;)

what i'm looking for is an app that can tell me how many users are currently logged on, and to which server (just like in the citrix management console)

there must be api's to do this, i'm just looking for the SW to do it!

once again, cheers loopy....

nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top