Useful Commands for Remote Server

Sometimes you have urgency to access the server but server’s logging capacity is over. It means once any existing session log off, new user can enter.

1. To know how many session’s are active in the remote server.
  c:/> qwinsta /server:<<Server Name / IP address>>

Once you know the session, kill the session or logoff the remote computer.

using following command, we can kill the session

c:/> rwinsta {sessionname | sessionid} /SERVER:servername

using following command, we can logoff the remote machine.

C:\>logoff /server:<<ServerName>> 1 /v
Logging off session ID 1

2. Forcefully logging into the remote computer
   c:/> mstsc -v:<<ServerName>> /F –console

3.  Check for a list of running sessions by typing the following only on the server. we can call this Query where the Terminal services are available ;
  c:/> QUERY USER /SERVER:servername

4. This will list all current session on that server. Record the session ID for the session you want to kill.  Then
  c:/> RESET SESSION sessionID /SERVER:servername

For more reference read the following blog. http://ts.veranoest.net/ts_faq_administration.htm

Advertisement

About miteshisheth
Believe in sharing knowledge.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.