다음을 통해 공유


Access Remote Desktop Via Commandline

Command line syntax for Remote Desktop Connection

Syntax

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

Command line parameters for Remote Desktop Connection

Parameter Description

/v:<server[:port]>

Specifies the remote computer you want to connect to.

/admin

Is used for administration of a terminal server. In this version of Remote Desktop Connection, if the Terminal Server role service is installed on the remote computer, running mstsc /admin will do the following (for the current connection only):

  • Disable Terminal Services client access licensing.

  • Disable time zone redirection.

  • Disable TS Session Broker redirection.

  • Disable TS EasyPrint.

/admin also does the following on connections to Windows Server 2008 with the Terminal Server role service installed:

  • Disables Plug and Play device redirection for this connection only.

  • Changes the remote session theme to Windows Classic View for this connection only.

To connect to a remote computer with the Terminal Server role service installed, follow these steps:

  1. Open the Command Prompt window by clicking the Start button http://res2.windows.microsoft.com/resbox/en/Windows%20Vista/main/4f6cbd09-148c-4dd8-b1f2-48f232a2fd33_47.png, clicking All Programs, clicking Accessories, and then clicking Command Prompt.

  2. Type mstsc /v:server /admin.

/f

Starts Remote Desktop Connection in full-screen mode.

/w:<width>

Specifies the width of the Remote Desktop Connection window.

/h:<height>

Specifies the height of the Remote Desktop window.

/public

Runs Remote Desktop Connection in public mode.

/span

Matches the remote desktop width and height with the local virtual desktop, spanning across multiple monitors if necessary. To span across monitors, the monitors must all have the same height and be aligned side by side.

/edit "connection file"

Opens the specified .rdp connection file for editing.

/migrate

Migrates older connection files that were created with Client Connection Manager to new .rdp connection files.

/?

Lists these parameters.