question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add opt-in/opt-out for multiple monitors on `az network bastion rdp` command

See original GitHub issue

Related command az network bastion rdp --name MyBastionHost --resource-group MyResourceGroup --target-resource-id vmResourceId

Is your feature request related to a problem? Please describe. While connecting to an Azure resource through Azure Bastion Standard native client, generated RDP file will always use all monitors by default, which is not always desired when working with multiple screens.

Generated RDP file excerpt:

hostname:s:<serverName>
full address:s:<serverName>
alternate full address:s:<serverName>
use multimon:i:1
serverport:i:3389
gatewaycredentialssource:i:5
gatewayusagemethod:i:1
gatewayprofileusagemethod:i:1
gatewayhostname:s:<bastionPIPName>.bastion.azure.com
gatewayaccesstoken:s:<gatewayAccessToken>
signscope:s:Full Address,Alternate Full Address,GatewayHostname,GatewayUsageMethod,GatewayProfileUsageMethod,GatewayCredentialsSource
signature:s:<AuthSignature>

Describe the solution you’d like Would be interesting to give option to administrator while connecting to bastion to opt-in or opt-out for the multiple monitor options based in a command switch (eg. az network bastion rdp --name MyBastionHost --resource-group MyResourceGroup --target-resource-id vmResourceId --use-multimon)

Describe alternatives you’ve considered As generated RDP file comes from managed Remote Desktop Gateway, the solution would be to modify conn.rdp in rdp_bastion_host function to replace the integer value of use multimon to 0 in the presence or absence of a parameter to use multiple monitors, which should be modified in src/azure-cli/azure/cli/command_modules/network/custom.py.

As a workaround, whenever needed to use a single monitor, we can cancel connection and then replace value in conn.rdp file as snippet below

(Get-Content .\conn.rdp).Replace("use multimon:i:1","use multimon:i:0") | Set-Content .\conn.rdp
mstsc .\conn.rdp

Additional context N/A

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:21 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
PramodValavala-MSFTcommented, Sep 13, 2022

@davi-cruz Thanks for the feedback! Looks like the RDP file content is retrieved from an API on the service side, so we are routing this to the service team for review.

2reactions
PramodValavala-MSFTcommented, Oct 28, 2022

Thanks all for the feedback and @skmkzyk for the workaround! We have worked up a PR that adds support for a new flag (--configure) that would open up the Remote Desktop Connection UI instead of directly connecting, allowing you make changes to the session configuration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Connect to a VM using a native client and Azure Bastion
Connect to a VM using the az network bastion tunnel command. This lets you do the following: Use native clients on non-Windows local...
Read more >
Azure Bastion Native Client Support With the Windows RDP ...
Launch the native Remote Desktop client using the az network bastion rdp command as shown below to connect to virtual machines in the...
Read more >
Azure Bastion: Use Native RDP Client to Connect to VMs
Use the az network bastion rdp command to connect to the Windows virtual machine using the native RPD client. Use the --name parameter...
Read more >
Can I use Multiple Monitors with Remote Desktop (RDP)? Yes ...
A common scenario is to use Remote Desktop to connect to a VM running in Windows Azure. I have always been disappointed that...
Read more >
Azure Bastion with native tools & AAD
... remote desktop tool. connect to the Ubuntu 20.04 virtual machine via Azure Bastion ... Run the az network bastion rdp command you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found