Announcement

Collapse
No announcement yet.

Find computer name by searching Username

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Find computer name by searching Username

    Do any of you know how to find out a computer's name based on the login user name, remotely?
    i.e. The script prompts you for a user name, based on the user name, it returns the computer name that the user is currently logged on?

    Thanks,

    K

  • #2
    Re: Find computer name by searching Username

    Originally posted by kizzle911 View Post
    prompts you for a user name, based on the user name, it returns the computer name that the user is currently logged on?
    As far as I know, no good way exists. You could audit security logs for logon/logoff events or maintain a list of all the workstations and run psloggedon against each computer.

    -vP

    Comment


    • #3
      Re: Find computer name by searching Username

      Yeah I tried those methods already. I was hoping I can execute a script that will allow me to do that.

      Comment


      • #4
        Re: Find computer name by searching Username

        Yeah I don't know of any practical script that can do that...IP to logon name isn't that hard, but logon name to IP is.

        Maybe instead you can create some sort of logon script:
        • create a txt file for appending
        • create a network object (WScript.Network)
        • get computername
        • get logon name
        • write to txt file


        And then just watch the log grow...and when you want to find someone just search the log.

        Comment


        • #5
          Re: Find computer name by searching Username

          We have a program here made by one of the it-workers here.

          We can search for "ip-adress" "computername" "username"

          And if we search for username, the ip-adress AND the computername comes up.

          I'm sorry for not knowing the code but i know it's made in visual basic 2008 express.

          The reason why I'm writing this, even tough it will not help. Is to tell you that it is possible.

          And i know it is based on what ekrengel says. The log is beeing made, and the script search the logs for the last logon. i belive this is how it works.
          Last edited by Conda; 8th July 2009, 11:36.

          Comment

          Working...
          X