Windows see logged in user

Windows 10: Find Who is Logged in

By Mitch Bartlett 17 Comments

If you’re wondering how to find out who is currently logged into a Microsoft Windows 10 computer, there are several ways to proceed. Here are a few common methods you can use from a remote computer or logged into the local computer you are querying.

WhoAmI Command

The “whoami” command displays the user you are currently logged in and using in Windows.

  1. Hold down the Windows Key, and press “R” to bring up the Run window.
  2. Type “CMD“, then press “Enter” to open a command prompt.
  3. At the command prompt, type the following then press “Enter“:
    whoami
  4. The computer name or domain followed by the username is displayed.

Query User Command

This command allows you to see all users currently logged into the computer.

Locally

  1. Hold down the Windows Key, and press “R” to bring up the Run window.
  2. Type “CMD“, then press “Enter” to open a command prompt.
  3. At the command prompt, type the following then press “Enter“:
    query user
  4. The computer name or domain followed by the username is displayed.

Remotely

  1. Hold down the Windows Key, and press “R” to bring up the Run window.
  2. Type “CMD“, then press “Enter” to open a command prompt.
  3. At the command prompt, type the following then press “Enter“:
    query user /server:computername
    Replace “computername” with the actual computer name of the system you are querying.
  4. The computer name or domain followed by the username is displayed.

Task Manager

  1. Right-click the taskbar, then select “Task Manager“.
  2. Select the “Users” tab.
  3. Details on the users logged into the machine are displayed.
  1. Hold down the Windows Key, and press “R” to bring up the Run window.
  2. Type “CMD“, then press “Enter” to open a command prompt.
  3. At the command prompt, type the following then press “Enter“:
    WMIC /NODE:»computername» COMPUTERSYSTEM GET USERNAME
    Replace “computername” with the actual computer name of the system you are querying. You can also replace “computername” with the IP address of the system.
    WMIC /NODE:192.168.1.1 COMPUTERSYSTEM GET USERNAME
Читайте также:  Create file from console windows

You Might Also Like

Filed Under: Windows Tagged With: Windows 10

How do I view login history for my PC using Windows 7

I want to see the login history of my PC including login and logout times for all user accounts.

I want to see the login history of my PC including login and logout times for all user accounts.

You can also use Windows® Even Viewer, to view log-in information.

How can I: Access Windows® Event Viewer?
1.
Press + R and type eventvwr.msc” and click OK or press Enter.
2. Expand Windows Logs, and select Security.
3. In the middle you’ll see a list, with Date and Time,Source, Event ID
and Task Category. The Task Category pretty much explains the event,
Logon, Special Logon, Logoff and other details.

I hope you find this information useful. If you need any further assistance,
please feel free to contact me and let me know.

I hope this information was helpful…

Have a nice day…

Best regards,
Fisnik

Itknowledge24.com — Follow me on Twitter: http://twitter.com/itknowledge24
— UAC Trust Shortcut 2.0 is on its way.

145 people found this reply helpful

Was this reply helpful?

Sorry this didn’t help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

Windows see logged in user

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

Windows Server 2008 R2 Enterprise.

I had a snap-in in Windows Server 2003 that allowed me to see who was currently logged onto the domain. How can I do this in Windows Server 2008 R2? I am the administrator, so there is no privilege issue. Thanks for any help.

Doug Pruiett Good News Jail & Prison Ministry Richmond, Virginia www.goodnewsjail.org

Answers

There is no direct way to check the same if auditing is enabled you can check the DC event log to track the same.You can also use thrid party tool (PSLogggedON or ManageEngine )or script to check the same.

Читайте также:  Что такое корень диска с windows

Hope this helps

Disclaimer: This posting is provided «AS IS» with no warranties or guarantees , and confers no rights.

You can either scan the event id from the security log on the DC. You can utilize EventcombMT to read or search the particular event id from single server. The other way is using Pslogged on tool or some other method mentioned in the below article.

Awinish Vishwakarma — MVP — Directory Services

Disclaimer This posting is provided AS-IS with no warranties/guarantees and confers no rights.

What’s the best way to see logged in users in Windows Server 2012?

Right now I use a powershell script to see the currently logged in users. But I don’t see if their session is idle, active or inactive. I can see when the session was started, that’s it. Is there an easy way to see how many users are currently logged in to the server I am logged in and see their status? It should not be remotely executed. I would like to avoid third party tools if possible.

7 Answers 7

Use the query user command

Open the Task-Manager and see the users tab. There you will find a list of users and their status.

where 192.168.1.9 is the IP of the server

«quser» command will give you the active now users

the same result will give you the «qwinsta» command

Use quser or query user to check users connected

Use qwinsta or query session to check sessions connected

Also you can use the «UserLock» application to see which users logged in. By this 3rd party tool you can manage the session of the users as well as remote desktop sessions. It is a great tool in this case. I suggest you try this tool.

Its easy in Server 2016 when you are in a session:

Click the search glass bottom left on task bar

Type gateway in the box and this should bring up «Remote Desktop Gateway Manager»; select it.

Click on the «>» next to the RDS server you want to view (RDS-01) for most I guess, then select the monitoring folder

You can now see who is logged on, how long for, since what time and can disconnect them or set connection limits.

Please note you probably need certain admin rights to do this, but it works for me.

Читайте также:  Как защищает компьютер windows

How do I get the currently loggedin Windows account from an ASP.NET page?

I have an ASP.NET 3.5 application that uses ASP.NET forms authentication. I want to be able to get the Windows user name currently logged into the computer (NOT logged into the ASP.NET application, but into Windows) when data is edited in a page.

If I use Context.User.Identity.Name.Tostring() , I get the user name logged into the ASP.NET application, but I need the Windows account name.

Also, it only works when I run the website from Visual Studio, but after deploying to IIS it returns NT AUTHORITY\SYSTEM.

8 Answers 8

You have to set authentication mode to Windows in your configuration & also disable anonymous users in authorization tag.

To get the currently logged in user to a Windows account you have to use Windows authentication instead of Forms authentication :

System.Security.Principal.WindowsIdentity.GetCurrent().Name.Tostring() also only works when i run the website from visual studio but after deploying to IIS it returns NT AUTHORITY\SYSTEM

It shows the application current user. When you host your application on the Visual Studio web server it uses your local account. However, when you will log in to the web application with different credentials it will always show your current Windows login.

An application deployed to IIS uses the NT AUTHORITY\SYSTEM account in your case.

To get the currently logged-in user to Windows in C#, use:

I struggled and struggled and struggled with this. One of the things is that I don’t have access to IIS, that is locked down, so I couldn’t change any of the server settings. I had to go with what I was capable of doing in code. When I researched it, many of the replies said, «set up IIS like this». . .well, that’s great when you have access to IIS, but I didn’t — I had to work with what I could do in code. So, I ended up handling it like this:

In my web config file, I added the following lines of code within the section:

Then, it returned an error on my local, which I had to go in and fix. I went to the applicationhost.config file located in the following path on my machine (yours might be different):

C:\users\»your user name»\My Documents\»yourIISInstallation»\config\applicationhost.config

and I changed the following settings to «allow», which had been set to «deny»:

Оцените статью