script to log rdp connection information

Posted on 2009-02-07
Last Modified: 2012-08-13
when someone connects via rdp to the server, you can view more information about the user in terminal

what i am looking for is basically a start up script, that dumps this information into a text file on the computer somewhere so i can look it up later on.

Question by:funnymanmike
    LVL 31

    Accepted Solution


    This is one solution, but is not free:

    You could specify logon (not startup) script only for terminal services users:

    "How to Set Up a Logon Script Only for Terminal Server Users"

    Script should contain at least the following line:

    echo %username%,%computername%,%date%,%time% >> C:\logs\TSlog.txt


    LVL 5

    Author Closing Comment

    LVL 5

    Author Comment

    crap sorry this only prints out the computer name of the computer they are connecting to, not the one they are connecting from.
    LVL 31

    Expert Comment

    by:Toni Uranjek

    echo %username%,%clientname%,%date%,%time% >> C:\logs\TSlog.txt

    Open in new window


    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Suggested Solutions

    When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
    Let’s list some of the technologies that enable smooth teleworking. 
    How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now