mstsc
Создает подключения к серверам узла сеансов удаленных рабочих столов или другим удаленным компьютерам и изменяет существующий файл конфигурации подключения к удаленному рабочему столу (RDP).
Синтаксис
mstsc.exe [] [/v:[:]] [/g:] [/admin] [/f ] [/w: /h:] [/public] [/multimon] [/l] [/restrictedadmin] [/remoteguard] [/prompt] [/shadow:] [/control] [/noconsentprompt] mstsc.exe /edit
Параметры
Параметр | Описание |
---|---|
Указывает имя RDP-файла для подключения. | |
/v: [:] | Указывает удаленный компьютер и при необходимости номер порта, к которому требуется подключиться. |
/Г: | Указывает сервер шлюза удаленных рабочих столов, используемый для подключения. Этот параметр считывается, только если компьютер с конечной точкой указан с параметром /v. |
/Администратора | Подключается к сеансу для администрирования сервера. |
/f | Запускает подключение к удаленному рабочему столу в полноэкранном режиме. |
/Ж: | Задает ширину окна удаленного рабочего стола. |
/H: | Указывает высоту окна удаленного рабочего стола. |
/Общественного | Запускает удаленный рабочий стол в общедоступном режиме. В общедоступном режиме пароли и растровые изображения не кэшируются. |
/multimon | Настраивает макет монитора сеанса служб удаленных рабочих столов так, чтобы он был идентичен текущей конфигурации на стороне клиента. |
/l | Перечисляет монитор, подключенный к локальному компьютеру, и идентификатор, связанный с каждым монитором. Идентификатор монитора можно использовать для заполнения выбранных параметров RDP-файла мониторов. |
/Редактировать | Открывает указанный RDP-файл для редактирования. |
/restrictedAdmin | В этом режиме учетные данные не будут отправляться на удаленный компьютер, который может защитить вас при подключении к скомпрометированному устройству. Подключения, созданные с удаленного компьютера, могут не проходить проверку подлинности на других компьютерах, что влияет на функциональность и совместимость приложений. Подразумевается параметр /admin . |
/remoteGuard | Этот режим предотвращает отправку учетных данных на удаленный компьютер, что помогает защитить учетные данные при подключении к скомпрометированному устройству. В отличие от режима ограниченного администратора, Remote Guard также поддерживает подключения, созданные с удаленного компьютера, перенаправляя все запросы обратно на устройство. |
/Строке | Запрашивает учетные данные при подключении к удаленному компьютеру. |
/Тень: | Указывает идентификатор сеанса для затенения. |
/Управления | Разрешает управление сеансом при затенение. |
/noConsentPrompt | Разрешает тенирование без согласия пользователя. |
/? | Отображение справки в командной строке. |
Комментарии
- Default.rdp хранится для каждого пользователя в виде скрытого файла в папке «Документы » пользователя.
- Созданные пользователем RDP-файлы по умолчанию сохраняются в папке «Документы » пользователя, но их можно сохранить в любом месте.
- Для охвата мониторов мониторы должны использовать одинаковое разрешение и должны быть выровнены по горизонтали (то есть рядом). В настоящее время нет поддержки для охвата нескольких мониторов по вертикали в клиентской системе.
Примеры
Чтобы подключиться к сеансу в полноэкранном режиме, введите:
mstsc /f
mstsc /v:computer1 /f
telnet
Communicates with a computer running the telnet server service. Running this command without any parameters, lets you enter the telnet context, as indicated by the telnet prompt (Microsoft telnet>). From the telnet prompt, you can use telnet commands to manage the computer running the telnet client.
You must install the telnet client software before you can run this command. For more information, see Installing telnet.
Syntax
telnet [/a] [/e ] [/f ] [/l ] [/t ] [ []] [/?]
Parameters
Parameter | Description |
---|---|
/a | Attempts automatic logon. Same as /l option, except that it uses the currently logged on user’s name. |
/e | Specifies the escape character used to enter the telnet client prompt. |
/f | Specifies the file name used for client side logging. |
/l | Specifies the user name to log on with on the remote computer. |
/t | Specifies the terminal type. Supported terminal types are vt100, vt52, ansi, and vtnt. |
[] | Specifies the hostname or IP address of the remote computer to connect to, and optionally the TCP port to use (default is TCP port 23). |
/? | Displays help at the command prompt. |
Examples
To use telnet to connect to the computer running the telnet Server Service at telnet.microsoft.com, type:
telnet telnet.microsoft.com
To use telnet to connect to the computer running the telnet Server Service at telnet.microsoft.com on TCP port 44 and to log the session activity in a local file called telnetlog.txt, type:
telnet /f telnetlog.txt telnet.microsoft.com 44
Related links
- Command-Line Syntax Key
- Installing telnet
- telnet Technical Reference
mstsc
Creates connections to Remote Desktop Session Host servers or other remote computers and edits an existing Remote Desktop Connection (.rdp) configuration file.
Syntax
mstsc.exe [] [/v:[:]] [/g:] [/admin] [/f ] [/w: /h:] [/public] [/multimon] [/l] [/restrictedadmin] [/remoteguard] [/prompt] [/shadow:] [/control] [/noconsentprompt] mstsc.exe /edit
Parameters
Parameter | Description |
---|---|
Specifies the name of an .rdp file for the connection. | |
/v: [:] | Specifies the remote computer and, optionally, the port number to which you want to connect. |
/g: | Specifies the RD Gateway server to use for the connection. This parameter is only read if the endpoint PC is specified with /v. |
/admin | Connects you to a session for administering the server. |
/f | Starts Remote Desktop Connection in full-screen mode. |
/w: | Specifies the width of the Remote Desktop window. |
/h: | Specifies the height of the Remote Desktop window. |
/public | Runs Remote Desktop in public mode. In public mode, passwords and bitmaps aren’t cached. |
/multimon | Configures the Remote Desktop Services session monitor layout to be identical to the current client-side configuration. |
/l | Enumerates the monitor attached to the local PC and the ID associated with each monitor. The monitor ID can be used to populate the selected monitors RDP file setting. |
/edit | Opens the specified .rdp file for editing. |
/restrictedAdmin | This mode won’t send your credentials to the remote PC, which can protect you if you connect to a compromised device. Connections made from the remote PC might not be authenticated by other PCs, which impact application functionality and compatibility. The /admin parameter is implied. |
/remoteGuard | This mode prevents credentials from being sent to the remote PC, which can help protect your credentials if you connect to a compromised device. Unlike Restricted Administrator mode, Remote Guard also supports connections made from the remote PC by redirecting all requests back to your device. |
/prompt | Prompts you for your credentials when you connect to the remote PC. |
/shadow: | Specifies the ID of the session to shadow. |
/control | Allows control of the session when shadowing. |
/noConsentPrompt | Allows shadowing without user consent. |
/? | Displays help at the command prompt. |
Remarks
- 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’s currently no support for spanning multiple monitors vertically on the client system.
Examples
To connect to a session in full-screen mode, type:
mstsc /f
mstsc /v:computer1 /f
При подготовке материала использовались источники:
https://learn.microsoft.com/ru-ru/windows-server/administration/windows-commands/mstsc
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/telnet
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/mstsc