网站地图    收藏   

主页 > 后端 > 网站安全 >

利用qwinsta和rwinsta查看和断开会话 - Windows操作系

来源:自学PHP网    时间:2015-04-17 18:33 作者: 阅读:

[导读] 察看连接:qwinsta用法:Display information about Terminal Sessions.QUERY SESSION [sessionname | username | sessionid][/SERVER:servername] [/MODE] [/FLOW] [/CONNECT] [/COUNTER]sessionname Identifies the session name...

察看连接:qwinsta

用法:
Display information about Terminal Sessions.

QUERY SESSION [sessionname | username | sessionid]
[/SERVER:servername] [/MODE] [/FLOW] [/CONNECT] [/COUNTER]

sessionname Identifies the session named sessionname.
username Identifies the session with user username.
sessionid Identifies the session with ID sessionid.
/SERVER:servername The server to be queried (default is current).
/MODE Display current line settings.
/FLOW Display current flow control settings.
/CONNECT Display current connect settings.
/COUNTER Display current Terminal Services counters information.

用法示例:qwinsta /server:test-machine
显示结果
SESSIONNAME USERNAME ID STATE TYPE DEVICE
console 0 Conn wdcon
rdp-tcp 65536 Listen rdpwd
Gogboy 1 Disc rdpwd
Sunny 2 Disc rdpwd
这个结果显示有两个普通用户(Gogboy, Sunny)保留着对该机器(test-machine)的会话。可以通过下面的rwinsta段开

断开连接:rwinsta
用法:
Reset the session subsytem hardware and software to known initial values.

RESET SESSION {sessionname | sessionid} [/SERVER:servername] [/V]

sessionname Identifies the session with name sessionname.
sessionid Identifies the session with ID sessionid.
/SERVER:servername The server containing the session (default is current).
/V Display additional information.

用法示例:rwinsta 2 /server:test-machine
这样就把上面用户Sunny的会话从该机器断开了。

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号-1@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com

添加评论