1. 按


2. 用法实例

2.1. 以全屏模式打开远程桌面

echo 使用IPv4地址
mstsc /v: /f
echo 使用域名
mstsc / /f
echo 使用计算机名
mstsc /v:computer1 /f
mstsc /f

2.2. 指定长和宽

mstsc /v:computer1 /w:1920 /h:1080

2.3. To open a file called filename.rdp for editing

mstsc /edit filename.rdp

2.4. 编写bat脚本


start mstsc / /f


3. 语法详解

mstsc.exe [<connectionfile>] [/v:<server>[:<port>]] [/admin] [/f] [/w:<width> /h:<height>] [/public] [/span]
mstsc.exe /edit <connectionfile>
mstsc.exe /migrate
<connectionfile>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.
/adminConnects you to a session for administering the server.
/fStarts 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.
/publicRuns Remote Desktop in public mode. In public mode, passwords and bitmaps aren’t cached.
/spanMatches the Remote Desktop width and height with the local virtual desktop, spanning across multiple monitors if necessary.
/edit <connectionfile>Opens the specified .rdp file for editing.
/migrateMigrates legacy connection files that were created with Client Connection Manager to new .rdp connection files.
/?Displays help at the command prompt.
  • 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.
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页