Re: Help with Logon Script
- From: "Pegasus \(MVP\)" <I.can@xxxxxxx>
- Date: Thu, 20 Dec 2007 23:13:22 +0100
"BALEMAN" <BALEMAN@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C4757A38-EBED-4D92-95E9-331EBF30BB12@xxxxxxxxxxxxxxxx
1) Windows Server 2003 Standard
2) Remote Users access server with Remote Desktop Connection
3) Usernames and Passwords already setup on the server and remote pc
As Administrator, I need to document the Username, Login Date, Login Time,
and IP Address of the remote PC of all users who access the server.
Below is the batch file I'm using:
:Logging
If Exist \\bem-srvr\Logs\LogOns.txt GoTo START
Echo Log File > \\bem-srvr\Logs\LogOns.txt
:START
Echo >> \\bem-srvr\Logs\LogOns.txt
Echo Log On: %USERNAME% %COMPUTERNAME% %Date:~0,16% %Time:~0,5% >>
\\bem-srvr\Logs\LogOns.txt
netstat -an |find "3389" |find /I "established" >>
\\bem-srvr\Logs\LogOns.txt
I can place this batch file on the root drive of the server, double click
on
the batch file's icon, and the information displays in the LogOns.txt
file.
I have used the "profile tab" under USERS and placed the batch file
there -
doesn't work. I utilized gpedit.msc-->user settings-->logon scripts and
put
it there - doesn't work. No matter where I place the batch file, when a
remote user logs on, the information does not post to LogOns.txt unless I
manually run the batch file.
Please help.
Logon batch files must reside in the "netlogon" share, which usually
points to %SystemRoot%\SYSVOL\sysvol\{DomainName}\SCRIPTS.
.
- Follow-Ups:
- Re: Help with Logon Script
- From: BALEMAN
- Re: Help with Logon Script
- Prev by Date: Re: get date - 1 day
- Next by Date: Re: [ann] using KixForms as a vbs gui -- worth a look...
- Previous by thread: Re: simple text encrypt / decrypt
- Next by thread: Re: Help with Logon Script
- Index(es):
Relevant Pages
|