Jump to content

Find computer name by searching Username


Recommended Posts

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

Link to comment
Share on other sites


Lol, I was trying to write this self same program myself one day. This is what I came up with.

There is no way using the WMI framework to evaluate the user which is currently on the machine remotely.

You can however read the registry remotely using the OpenRemoteBaseKey Method in .Net.

Create a script that writes the username of the logging in user to the registry.

Create a program in a .Net language and create a list of all of the host names on the network, read the registry key that you have written too.

Now you must search through a list of hostname and read their registries when you have found the username, you have succeded.

Good luck,

d3

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...