Scaling values are stored in registry at
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\GraphicsDrivers\ScaleFactors\%MonitorID%
and
HKEY_CURRENT_USER\Control Panel\Desktop\PerMonitorSettings\%MonitorID%
You can find ps scripts on Google, like : Force 100 DPI Scale.ps1
(by program (C++, C#, VB.NET, ...), it can be changed instantly with SystemParametersInfo and SPI_SETLOGICALDPIOVERRIDE)