If you are looking for a query that will display all machines and their last logged on user, the below will do this for you without any prompts. This allows you to search on the data to find what you would like across the information provided by the query.
The query below is the full code to bring back all sorts of information, you can strip this right back if you like to just bring back simple information like username and machine name…
If you wish to use this same query but be prompted for a user name of a last logged on user and then be supplied with that users machine information, a slightly amended version of this code is available here:
There is also a query that you can use that will prompt for a NetBIOS name and supply you with all the information you require:
The query code to do this is below:
If you have any questions about this, feel free to leave a comment.
Enter your email address below and click the Subscribe button to receive email notifications about new and exciting downloads available through our website at https://www.techygeekshome.com
You will also receive notifications about new technical guides, latest news and MSI installer downloads that are available through our blog here at https://blog.techygeekshome.info
We will not spam you and we will not pass on any of your details to anyone else. We tend to post new content once or twice a week.
You can unsubscribe any time you like.