Dzwebs.Net

撰写电脑技术杂文十余年

远程桌面连接Mstsc命令的语法介绍

Admin | 2010-8-13 15:52:36 | 被阅次数 | 12862

温馨提示!

如果未能解决您的问题,请点击搜索;登陆可复制文章,点击登陆

  一、英文版的Mstsc命令语法

  Creates connections to terminal servers or other remote computers, edits an existing Remote Desktop Connection (.rdp) configuration file, and migrates legacy connection files that were created with Client Connection Manager to new .rdp connection files.

  For examples of how to use this command, see Examples。

  Syntax

  mstsc.exe [<Connection File>] [/v:<Server>[:<Port>]] [/admin] [/f] [/w:<Width> /h:<Height>] [/public] [/span]

  mstsc.exe /edit <Connection File>

  mstsc.exe /migrate

  Parameters
 
  Parameter  Description 
  <Connection File>
   Specifies the name of an .rdp file for the connection.
 
  /v:<Server[:<Port>]
   Specifies the remote computer and, optionally, the port number to which you want to connect.
 
  /admin
   Connects you to a session for administering the server.
 
  /f
   Starts Remote Desktop Connection in full-screen mode.
 
  /w:<Width>
   Specifies the width of the Remote Desktop window.
 
  /h:<Height>
  Specifies the height of the Remote Desktop window.
 
  /public
  Runs Remote Desktop in public mode. In public mode, passwords and bitmaps are not cached.
 
  /span
  Matches the Remote Desktop width and height with the local virtual desktop, spanning across multiple monitors if necessary.
 
  /edit <Connection File>
  Opens the specified .rdp file for editing.
 
  /migrate
  Migrates legacy connection files that were created with Client Connection Manager to new .rdp connection files.
 
  /?
  Displays help at the command prompt.

  Remarks
  Default.rdp is stored for each user as a hidden file in the user's Documents folder. User created .rdp files are saved by default in the user's Documents folder but can be saved anywhere.

  To span across monitors, the monitors must use the same resolution and must be aligned horizontally (that is, side by side). There is currently no support for spanning multiple monitors vertically on the client system.

  Examples
  To connect to a session in full-screen mode, type:

  mstsc /f
  To open a file called filename.rdp for editing, type:

  mstsc /edit filename.rdp

  二、中文版的Mstsc命令语法

  语法:

  mstsc [<connection file>] [/v:<server[:port]>] [/admin] [/f[ullscreen]] [/w:<width>] [/h:<height>] [/public] | [/span] [/edit "connection file"] [/migrate] [/?]

  参数介绍:

  v:<server[:port]> 指定要连接的远程计算机。
 
  /admin 用于管理终端服务器。在此版本的远程桌面连接中,如果终端服务器角色服务安装在远程计算机上,则运行 mstsc /admin 将可完成以下操作(仅适用于当前连接):

  禁用终端服务客户端访问授权。

  禁用时区重定向。

  禁用 TS 会话代理重定向。

  禁用 TS EasyPrint。

  如果连接到安装了终端服务器角色服务的 Windows Server 2008,则运行 /admin 还将完成以下操作:

  禁用即插即用设备重定向(仅适用于此连接)。

  将远程会话主题更改为 Windows 经典视图(仅适用于此连接)。

  若要连接到安装了终端服务器角色服务的远程计算机,请按照下列步骤进行操作:

  A、通过单击“开始”按钮,再依次单击“所有程序”、“附件”,然后单击“命令提示符”,打开“命令提示符”窗口。

  B、类型 mstsc /v:server /admin。

  /f  以全屏模式启动远程桌面连接。
 
  /w:<width> 指定远程桌面连接窗口的宽度。
 
  /h:<height> 指定远程桌面窗口的高度。
 
  /public 以公共模式运行远程桌面连接。
 
  /span 使远程桌面的宽度和高度与本地 虚拟桌面相匹配,如有必要,可以扩展到多个监视器。若要扩展 到多个监视器,所有监视器的高度必须相同, 并且并排对齐。
 
  /edit "连接文件" 打开指定的 .rdp 连接文件进行编辑。
 
  /migrate 将使用客户端连接管理器创建的旧的连接文件迁移到新的 .rdp 连接文件中。
 
  /? 列出这些参数。

  注意哦,mstsc好像没有断开的参数,断开的时候你把电脑a的鼠标放到屏幕上方,就会看到一个叉,你点一下就可以了。


网站备案号:

网站备案号:滇ICP备11001339号-7

版权属性:

Copyright 2007-2021-forever Inc. all Rights Reserved.

联系方式:

Email:dzwebs@126.com QQ:83539231