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

1. 按

对于经常使用的远程桌面连接命令mstsc远程管理电脑或者服务器的人来说,远程桌面连接命令mstsc的使用很简单。但是对于从来没有接触过远程桌面连接命令的人来说,首次使用可能连需要进行设置都不清楚。我们这里将远程桌面连接命令mstsc的使用方法进行详细介绍。远程桌面连接命令mstsc使用前需要进行设置。

2. 用法实例

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

echo 使用IPv4地址
mstsc /v:192.168.1.2 /f
echo 使用域名
mstsc /v:7.coco56.top /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脚本

编写bat脚本时,命令最好前面加一个start,否则CMD窗口会一直保留到你所连接的远程会话结束,具体命令如:

start mstsc /v:7.coco56.top /f

编写bat脚本使用是非常方便的,直接双击一下脚本文件就可以了。
在这里插入图片描述

3. 语法详解

mstsc.exe [<connectionfile>] [/v:<server>[:<port>]] [/admin] [/f] [/w:<width> /h:<height>] [/public] [/span]
mstsc.exe /edit <connectionfile>
mstsc.exe /migrate
ParameterDescription
<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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

COCO56(徐可可)

建议微信红包:xucoco56

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值