2023年12月6日发(作者:)

Windows远程桌面mstsc命令在CMD中运行的使用说明

文章目录

1. 按

对于经常使用的远程桌面连接命令mstsc远程管理电脑或者服务器的人来说,远程桌面连接命令mstsc的使用很简单。但是对于从来没有接

触过远程桌面连接命令的人来说,首次使用可能连需要进行设置都不清楚。我们这里将远程桌面连接命令mstsc的使用方法进行详细介绍。

远程桌面连接命令mstsc使用前需要进行设置。

更多关于远程桌面的连接方法,可以参考:

2. 用法实例

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

echo 使用IPv4地址

mstsc /v:192.168.1.2 /f

echo 使用域名

mstsc /v: /f

echo 使用计算机名

mstsc /v:computer1 /f

mstsc /f

2.2. 指定长和宽

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

2.3. To open a file called for editing

mstsc /edit

2.4. 编写bat脚本

编写bat脚本时,命令最好前面加一个

start

,否则CMD窗口会一直保留到你所连接的远程会话结束,具体命令如:

start mstsc /v: /f

编写bat脚本使用是非常方便的,直接双击一下脚本文件就可以了。

3. 语法详解

[] [/v:[:]] [/admin] [/f] [/w: /h:] [/public] [/span]

/edit

/migrate

Parameter

/v:[:]

/admin

/f

Description

Specifies the name of an .rdp file for the connection.

Specifies the remote computer and, optionally, the port number to which you want to connect.

Connects you to a session for administering the server.

Starts Remote Desktop Connection in full-screen mode./fParameter/w:/h:/publicStarts Remote Desktop Connection in full-screen ptionSpecifies the width of the Remote Desktop ies the height of the Remote Desktop Remote Desktop in public mode. In public mode, passwords and bitmaps aren’t s the Remote Desktop width and height with the local virtual desktop, spanning across multiple monitors ifnecessary./span/edit/migrate/?Opens the specified .rdp file for es legacy connection files that were created with Client Connection Manager to new .rdp connection ys help at the command is stored for each user as a hidden file in the user’s Documents created .rdp files are saved by default in the user’s Documents folder, but can be saved 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.