Get users name from computer name?
As above is it possible?
I can get the users ID on our network, using nbtstat -a computername. But I need the users real name, any help appreciated thanks. |
try this
Code:
|
|
Kix is just a scripting language, you would still need to query the remote machine to find the users that have an explorer.exe process running or using wmi as I did..
I can also use kix if you want it writing in that, but that involves a download, where as cscript / wscript shouldnt. David |
That looks awesome Dave, but as I'm a complete coding noob, how do I run it? :)
Just save it as a .vbs and run it? Or something (cscript) else? Thanks. |
save it as a vbs file, for example RetrieveLoggedOnUsers.Vbs
Then in a command prompt do: Cscript //NoLogo RetrieveLoggedOnUsers.Vbs computerName AnotherComputer Name You can pass either one computer name or multiple computernames. You will need admin rights on the remote pc though. David |
Ace, works a treat:thumb:
|
Originally Posted by David_Wallis
(Post 6720436)
Kix is just a scripting language, you would still need to query the remote machine to find the users that have an explorer.exe process running or using wmi as I did..
I can also use kix if you want it writing in that, but that involves a download, where as cscript / wscript shouldnt. David |
Originally Posted by David_Wallis
(Post 6722295)
save it as a vbs file, for example RetrieveLoggedOnUsers.Vbs
Then in a command prompt do: Cscript //NoLogo RetrieveLoggedOnUsers.Vbs computerName AnotherComputer Name You can pass either one computer name or multiple computernames. You will need admin rights on the remote pc though. David It works a treat thanks alot Dave :thumb: |
No probs.
|
All times are GMT +1. The time now is 06:31 AM. |
© 2024 MH Sub I, LLC dba Internet Brands