How to change the contrast of your monitor from command line on Windows operating system

The ControlMyMonitor utility allows you to change the settings of your monitor from command-line and GUI.
In order to set the contrast of your monitor from command-line, simply run the following command:
ControlMyMonitor.exe /SetValue Primary 12 70

The above command will set the contrast of your primary monitor to 70% (You can set any value between 0 and 100). The '12' number specifies the VCP Code of contrast. For every monitor setting there is a different VCP Code.
If you want to increase or decrease the monitor contrast, relatively to the current contrast, you can use the /ChangeValue command, for example:
ControlMyMonitor.exe /ChangeValue Primary 12 -8

The above command will decrease the contrast of your monitor by 8%.

If you have multiple monitors on your system, you have to specify the name or ID or serial number of the monitor you want to change, for example:
ControlMyMonitor.exe /ChangeValue "\\.\DISPLAY1\Monitor0" 12 10

There is also an option to switch between 2 or more contrast values, by using the /SwitchValue command.
For example, the following command switches between 3 contrast values - 50%, 70%, and 90%:
ControlMyMonitor.exe /SwitchValue "\\.\DISPLAY1\Monitor0" 12 50 70 90

Be aware that ControlMyMonitor will work on your system only if your hardware supports DDC/CI, and you have Windows Vista or later version of Windows (Including Windows 10). Windows XP is not supported.