Get display resolution inside Remote Desktop from windows command line

4

2

When I connect to another computer using Remote Desktop, How can I obtain, from Windows Command line in a batch, the screen resolution of the Remote Desktop window, not the screen resolution of the remote server desktop ?

For example if I connect with Rdp to a server with screen resolution 1920x1080 with a Rdp window of 1024x900:

mstsc /w:1024 /h:900 /v:remote_host

and inside the Rdp I try to get the resolution with wmic, i.e.

wmic desktopmonitor get screenheight, screenwidth
ScreenHeight  ScreenWidth
1080          1920

That is the server but not the Rdp resolution. How can be obtained the Rdp screen resolution ?

Baltar27

Posted 2015-12-05T18:17:31.050

Reputation: 41

Answers

0

The following command should give you both the configured display resolution as well as the RDP resolution:

wmic path Win32_VideoController get VideoModeDescription

When connected via RDP, output should look something like this:

VideoModeDescription
1920 x 1080 x 4294967296 colors
1704 x 942 x 4294967296 colors

dzampino

Posted 2015-12-05T18:17:31.050

Reputation: 680