user867621 Asked: 2017-01-11 08:28:50 +0800 CST2017-01-11 08:28:50 +0800 CST 2017-01-11 08:28:50 +0800 CST 如何使用命令提示符或 powershell 在 Windows 10 中获取屏幕分辨率 772 我一直在尝试运行 wmic path Win32_VideoController get VideoModeDescription 它给了我 1920 x 1080 这很好。我改变了分辨率来测试它,它仍然返回同样的东西。 有人知道为什么吗? 我将第一个屏幕设置为 1360 x 768 第二个屏幕设置为 1600 x 900 powershell command-line-interface windows-command-prompt windows-10 2 个回答 Voted Felipe Martinez Pineda 2017-01-11T09:18:18+08:002017-01-11T09:18:18+08:00 如https://stackoverflow.com/questions/7967699/get-screen-resolution-using-wmi-powershell-in-windows-7所述 PS> Add-Type -AssemblyName System.Windows.Forms PS> [System.Windows.Forms.Screen]::AllScreens BitsPerPixel : 32 Bounds : {X=0,Y=0,Width=1280,Height=800} DeviceName : \\.\DISPLAY1 Primary : True WorkingArea : {X=0,Y=0,Width=1280,Height=770} BitsPerPixel : 32 Bounds : {X=1280,Y=0,Width=1920,Height=1200} DeviceName : \\.\DISPLAY2 Primary : False WorkingArea : {X=1280,Y=0,Width=1920,Height=1170} Best Answer user867621 2017-01-11T11:22:34+08:002017-01-11T11:22:34+08:00 我在powershell中找到了一种方法。 "Background {0}x{1}" -f [System.Windows.Forms.SystemInformation]::PrimaryMonitorSize.Width,[System.Windows.Forms.SystemInformation]::PrimaryMonitorSize.Height
如https://stackoverflow.com/questions/7967699/get-screen-resolution-using-wmi-powershell-in-windows-7所述
我在powershell中找到了一种方法。