I need to login to a remote Win7 or Vista computer but when I connect I get a Logon Message "Another user is currently logged on..." but it does not specify who.
I have a domain username with admin privileges on the computer, how can I see who is logged in?
You can use the commands listed here to manage Terminal Server connections.
query session /server:<servername>
is probably the first one you want.These all require remote procedure call, which is part and parcel with CIFS/SMB (the IPC$ share). Check that the RPC service is enabled first. Second, you can't/shouldn't (depending on network configuration) run these services over anything but the local network. If you're trying to do this sort of management over the Internet, you should be using a VPN or some creative SSH tunneling.
Use the eventvwr to remotely view the security log for the remote computer, and scroll through the security logs until you find a login event for the other user:
Use this command:
Use powershell, MUCH easier, already instealled, no 3rd party tool required:
Note that this will always return the user logged on to the physical machine. It will not return terminal service user or users inside a virtual machine. You will need administrator privileges on the target machine. Get-WmiObject supports the -Credential parameter if you must authenticate as someone else.
Another easy way I find it to UNC connect to the C:\users folder and sort profile by date updated. Bam easy as.
You should be able to use Terminal Services Manager. If you don't have this on your machine, you can RDP into a server that has it (any server should) under Control Panel -> Administrative Tools -> Terminal Services Manager. Then, go to Actions and choose "Connect to Computer". That will list all active and inactive sessions and users.
An easy way to do this would be to use PSLOGGEDON http://technet.microsoft.com/en-gb/sysinternals/bb897545.aspx
from CMD navigate to where you extract the file and run psloggedon \\machinename
OR
Without downloading any software use the following command from CMD
qwinsta /server:[NAME] or [IP]
Another option i've thought of recently - use PSExec and get the output of netstat on the remote computer. You can easily get the IPs or hostnames of any remotely connected computers.
We had an issue where no one could log on as the limit was reached, so we used Remote Desktop Services Manager. That allowed us to see who was RDP in and disconnect the user who forgot to log off.
(gwmi -ComputerName [computername] -Class win32_computersystem).username