The series of posts on configuring RDP properties for a host pool is ending. In this latest post, I’ll show you how to configure display settings for your Azure virtual desktop environment using PowerShell and the Azure CLI. Ok, let’s go through each setting one by one.

Azure PowerShell Workaround

First, you need to ensure the Az.DesktopVirtualization module is installed on your computer and imported into your Powershell session. To do that, you should use the following commands.

Once you’ve imported the module, you’re ready to go. The easiest way to get started is to log in interactively at the command line.

This cmdlet will bring up a dialog box prompting you for your email address and password associated with your Azure account.
You can choose the default subscription if you have more than one associated with your mail account. To perform this task, we will use the following commands:

Once you set your default subscription, you’re ready to start.

Set the variables

Here, we define the characteristics of our environment and the resource’s properties.

Define RDP properties for Local devices redirection

To set a custom RDP property, you should use the Update-AzWvdHostPool cmdlet.

Multiple displays

This setting determines whether the session should use true multi-monitor support when connecting to the remote computer. These are the accepted values.
  • use multimon:i:0 – Don’t enable multiple display support.
  • use multimon:i:1 – Enable multiple display support.

Selected monitors

This setting specifies which local screens to use from the remote session. These are the accepted values.
Important: Requires the setting “use multimon” to be set to 1.
  • use multimon:i:1;selectedmonitors:s: – All displays.
  • use multimon:i:1;selectedmonitors:s:IDXXXX,IDXXXX – Manually enter list of machine specific display IDs. The selected screens must be contiguous.

Maximize to current displays

This setting determines which screen the remote session goes full screen on when maximized. These are the accepted values.
Important: Requires the setting “use multimon” to be set to 1.
  • use multimon:i:1;maximizetocurrentdisplays:i:0 – Session goes full screen on the displays initially selected when maximizing.
  • use multimon:i:1;maximizetocurrentdisplays:i:1 – Session dynamically goes full screen on the displays touched by the session window when maximizing.

Multi to single display switch

This setting determines whether a multi-screen remote session automatically switches to a single screen when exiting full screen. These are the accepted values.
Important: Requires the setting multimon to be set to 1.
  • use multimon:i:1;singlemoninwindowedmode:i:0 – Session retains all displays when exiting full screen.
  • use multimon:i:1;singlemoninwindowedmode:i:1 – Session switches to single display when exiting full screen.

Screen mode

This setting determines whether the remote session window appears full screen when connected to the remote computer. These are the accepted values.
  • screen mode id:i:1 – The remote session will appear in a window.
  • screen mode id:i:2 – The remote session will appear full screen.

Smart sizing

This setting determines whether the client computer should scale content on the remote computer to fit the client computer’s window size when the window is resized. These are the accepted values.
  • smart sizing:i:0 – The local window content won’t scale when resized.
  • smart sizing:i:1 – The local window content will scale when resized.

Dynamic resolution

This setting determines whether the remote session resolution is automatically updated when resizing the local window. These are the accepted values.
  • dynamic resolution:i:0 – Session resolution remains static for the duration of the session.
  • dynamic resolution:i:1 – Session resolution update as the local window resizes.

Desktop size

This setting specifies the default dimensions of the remote session desktop. These are the accepted values.

  • desktop size id:i:0 – 640 x 480
  • desktop size id:i:1 – 800 x 600
  • desktop size id:i:2 – 1024 x 768
  • desktop size id:i:3 – 1280 x 1024
  • desktop size id:i:4 – 1600 x 1200

Desktop height (pixels) 

This setting sets the height of the remote session’s desktop (in pixels). Accepted values are between 200 and 8192.
  • desktopheight:i:value

Desktop width (pixels)

This setting sets the width of the remote session’s desktop (in pixels). Accepted values are between 200 and 8192.
  • desktopwidth:i:value

Desktop scale factor

This setting specifies the scale factor of the remote session to make the content appear larger. These are the accepted values.

  • desktopscalefactor:i:100
  • desktopscalefactor:i:125
  • desktopscalefactor:i:150
  • desktopscalefactor:i:175
  • desktopscalefactor:i:200
  • desktopscalefactor:i:250
  • desktopscalefactor:i:300
  • desktopscalefactor:i:400
  • desktopscalefactor:i:500

Define multiple custom RDP properties

You should use the Update-AzWvdHostPool cmdlet with the following syntax to set multiple custom RDP properties.

And verify your changes with the Get-AzWvdHostPool cmdlet.

Get-AzWvdHostPool

Reset all custom RDP properties

If you want to reset all custom RDP properties, you should use the Update-AzWvdHostPool cmdlet with the following syntax.

Azure CLI Workaround

In this case, we will use Azure Cloud Shell, a browser-based shell built into Azure Portal. This allows us to use the Azure command-line tools (Azure CLI and Azure PowerShell) directly from a browser. If you want to know more about Azure Cloud Shell, check out this link.
First, we define the characteristics of our environment and store the values in variables.

Define RDP properties for Local devices redirection

To set a custom RDP property, you should use the following command.

Multiple displays

This setting determines whether the session should use true multi-monitor support when connecting to the remote computer. These are the accepted values.
  • use multimon:i:0 – Don’t enable multiple display support.
  • use multimon:i:1 – Enable multiple display support.

Selected monitors

This setting specifies which local screens to use from the remote session. These are the accepted values.
Important: Requires the setting “use multimon” to be set to 1.
  • use multimon:i:1;selectedmonitors:s: – All displays.
  • use multimon:i:1;selectedmonitors:s:IDXXXX,IDXXXX – Manually enter list of machine specific display IDs. The selected screens must be contiguous.

Maximize to current displays

This setting determines which screen the remote session goes full screen on when maximized. These are the accepted values.
Important: Requires the setting “use multimon” to be set to 1.
  • use multimon:i:1;maximizetocurrentdisplays:i:0 – Session goes full screen on the displays initially selected when maximizing.
  • use multimon:i:1;maximizetocurrentdisplays:i:1 – Session dynamically goes full screen on the displays touched by the session window when maximizing.

Multi to single display switch

This setting determines whether a multi-screen remote session automatically switches to a single screen when exiting full screen. These are the accepted values.
Important: Requires the setting “use multimon” to be set to 1.
  • use multimon:i:1;singlemoninwindowedmode:i:0 – Session retains all displays when exiting full screen.
  • use multimon:i:1;singlemoninwindowedmode:i:1 – Session switches to single display when exiting full screen.

Screen mode

This setting determines whether the remote session window appears full screen when connected to the remote computer. These are the accepted values.
  • screen mode id:i:1 – The remote session will appear in a window.
  • screen mode id:i:2 – The remote session will appear full screen.

Smart sizing

This setting determines whether the client computer should scale content on the remote computer to fit the client computer’s window size when the window is resized. These are the accepted values.
  • smart sizing:i:0 – The local window content won’t scale when resized.
  • smart sizing:i:1 – The local window content will scale when resized.

Dynamic resolution

This setting determines whether the remote session resolution is automatically updated when resizing the local window. These are the accepted values.
  • dynamic resolution:i:0 – Session resolution remains static for the duration of the session.
  • dynamic resolution:i:1 – Session resolution update as the local window resizes.

Desktop size

This setting specifies the default dimensions of the remote session desktop. These are the accepted values.

  • desktop size id:i:0 – 640 x 480
  • desktop size id:i:1 – 800 x 600
  • desktop size id:i:2 – 1024 x 768
  • desktop size id:i:3 – 1280 x 1024
  • desktop size id:i:4 – 1600 x 1200

Desktop height (pixels) 

This setting sets the height of the remote session’s desktop (in pixels). Accepted values are between 200 and 8192.
  • desktopheight:i:value

Desktop width (pixels)

This setting sets the width of the remote session’s desktop (in pixels). Accepted values are between 200 and 8192.
  • desktopwidth:i:value

Desktop scale factor

This setting specifies the scale factor of the remote session to make the content appear larger. These are the accepted values.

  • desktopscalefactor:i:100
  • desktopscalefactor:i:125
  • desktopscalefactor:i:150
  • desktopscalefactor:i:175
  • desktopscalefactor:i:200
  • desktopscalefactor:i:250
  • desktopscalefactor:i:300
  • desktopscalefactor:i:400
  • desktopscalefactor:i:500

Define multiple custom RDP properties

To set multiple custom RDP properties, you should use the following command.

And verify your changes with the following command.

display settings

Reset all custom RDP properties

If you want to reset all custom RDP properties, you should use the following command.

Thanks for reading my post. I hope you find it helpful.

Check out this link to learn more about supported RDP settings.