November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Logoff user remote session using CMD

 

Using CMD to kick user not properly logoff in remote session.
This command to list out the user. Have 2 command :

1 – quser /SERVER : [server name]

2 – qwinsta /SERVER : [server name]
This command to kick the user :

1 – logoff /SERVER : [server name] [session id]
Example :

C:\x>quser /SERVER:xxxx-xxxSxAPP
USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME
root console 0 Active . 5/21/2011 5:09 AM
anuar 1 Disc none 6/7/2011 9:45 AM
izuan rdp-tcp#42 2 Active 59 6/9/2011 10:47AM
C:\x>qwinsta /SERVER:xxxx-xxxSxAPP
USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME
root console 0 Active . 5/21/2011 5:09 AM
anxxxxr 1 Disc none 6/7/2011 9:45 AM
izxxx rdp-tcp#42 2 Active 59 6/9/2011 10:47AM
C:\Users\azam>logoff /SERVER:xxxx-xxxSxAPP 1

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>