DPI Scaling in Windows 8.1 via command line

The correct registry key for monitor independent scaling is HKCU:\Control Panel\Desktop with the value LogPixels. More Information about all DPI-related registry settings can be found here: http://technet.microsoft.com/en-us/library/dn528846.aspx#system There are also information for the case when you enabled different scaling for each display.

I wrote a tiny PowerShell script that changes the DPI scaling for all displays depending on the current scaling and performs the user logoff so i just have to execute the script when I put my device to a different monitor.

cd 'HKCU:\Control Panel\Desktop'
$val = Get-ItemProperty -Path . -Name "LogPixels"
if($val.LogPixels -ne 96)
{
    Write-Host 'Change to 100% / 96 dpi'
    Set-ItemProperty -Path . -Name LogPixels -Value 96
} else {
    Write-Host 'Change to 150% / 144 dpi'
    Set-ItemProperty -Path . -Name LogPixels -Value 144
}

logoff;exit

I think you can modify it for your needs with the information of the TechNet article.


There is PowerShell script to change screen resolution which might help. I have no idea if the change it does is immediate on Windows 8.1, but with a bit of luck this script might use the same API as used by the Control Panel applet.

The complete Set-ScreenResolution.ps1 script is available in the Script Repository, but is too long to reproduce here.

Its description by the author can be found in the article :
Hey, Scripting Guy! How Can I Change My Desktop Monitor Resolution via Windows PowerShell?.

Some information on using it can be found in the article :
Changing Screen Resolution with Powershell.