远程桌面 URI 方案

适用于:Windows Server 2022、Windows Server 2019、Windows Server 2016、Windows 11、Windows 10

本文档定义了远程桌面的统一资源标识符 (URI) 的格式。 通过这些 URI 方案,可使用各种命令调用远程桌面客户端。

ms-rd URI 方案

注意

ms-rd URI 方案当前仅支持用于 Windows 桌面客户端 (MSRDC)。

通过 ms-rd URI,可按以下格式为客户端指定一个命名并指定一组该命令特定的参数:

ms-rd:command?parameters

参数采用查询字符串格式“键=值对”(用 & 分隔)为给定命令提供额外的信息:

param1=value1&param2=value2&…

命令和参数

下面列表中是当前支持的命令及其相应的参数。

使用不带任何命令的 ms-rd: 启动客户端。

Subscribe

此命令会启动客户端和订阅过程。

命令名称: subscribe

命令参数:

参数 说明
url 指定工作区 URL。 有效的 URL,例如 https://contoso.com

示例: ms-rd:subscribe?url=https://contoso.com

旧的 rdp URI 方案

注意

以下 URI 方案仅支持用于 macOS、iOS 和 Android 设备的客户端。 它将被上述新的 ms-rd URI 取代。

Microsoft 远程桌面使用 URI 方案 rdp://query_string 来存储启动客户端时使用的预配置的特性设置。 查询字符串表示 URL 中提供的单个实例或一组 RDP 特性。

RDP 属性用与号 (&) 分隔。 例如,连接到 PC 时,该字符串是:

rdp://full%20address=s:mypc:3389&audiomode=i:2&disable%20themes=i:1

此表提供可以与 iOS、Mac 和 Android 远程桌面客户端一起使用的受支持特性的完整列表。 (平台列中的“x”指示该特性受支持。 通过尖括号 (<>) 指示的值表示远程桌面客户端支持的值。)

RDP 特性 Android Mac iOS
allow desktop composition=i:<0 或 1> x X x
allow font smoothing=i:<0 or 1> x X x
alternate shell=s:<字符串> x X x
audiomode=i:<0、1 或 2> x X x
authentication level=i:<0 或 1> x X x
connect to console=i:<0 或 1> x X x
disable cursor settings=i:<0 或 1> x X x
disable full window drag=i:<0 或 1> x X x
disable menu anims=i:<0 或 1> x X x
disable themes=i:<0 或 1> x X x
disable wallpaper=i:<0 或 1> x X x
drivestoredirect=s:* (这是唯一受支持的值) x x
desktopheight=i:<以像素为单位的值> x
desktopwidth=i:<以像素为单位的值> x
domain=s:<字符串> x X x
full address=s:<字符串> x X x
gatewayhostname=s:<字符串> x X x
gatewayusagemethod=i:<1 或 2> x X x
prompt for credentials on client=i:<0 或 1> x
loadbalanceinfo=s:<字符串> x X x
redirectprinters=i:<0 或 1> x
remoteapplicationcmdline=s:<字符串> x X x
remoteapplicationmode=i:<0 或 1> x X x
remoteapplicationprogram=s:<字符串> x X x
shell working directory=s:<字符串> x X x
Use redirection server name=i:<0 或 1> x X x
username=s:<字符串> x X x
screen mode id=i:<1 或 2> x
session bpp=i:<8、15、16、24 或 32> x
use multimon=i:<0 或 1> x