Search notes:

Registry: HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe

Values to configure cmd.exe.
In order for these values to have an effect, cmd.exe must not be started via the Start menu: this will use the values that are stored in an .lnk file. Start cmd.exe (or PowerShell) using Win+R however will use the values stored in the registry.

Set window and buffer size

Set the size of the window and buffer
set-strictMode -version latest

# $regKey = 'HKCU:\Console\%SystemRoot%_system32_cmd.exe'
  $regKey = 'HKCU:\Console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe'

if (! (test-path $regKey) ) {
   $null = new-item $regKey
}

$width        =  180
$windowHeight =   75
$bufferHeight = 9999

$screenBufferSize =  0x10000 * $bufferHeight + $width
$windowSize       =  0x10000 * $windowHeight + $width

$null = new-itemProperty -path $regKey -name ScreenBufferSize -value $screenBufferSize -force
$null = new-itemProperty -path $regKey -name WindowSize       -value $windowSize       -force
Github repository about-Windows-Registry, path: /HKEY_CURRENT_USER/Console/%25SystemRoot%25_system32_cmd.exe/size.ps1

Configure font

set-strictMode -version latest

# $regKey = 'HKCU:\Console\%SystemRoot%_system32_cmd.exe'
  $regKey = 'HKCU:\Console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe'

$fontName     = 'Consolas'
$width        =    0   # Does not seem to play a role for Lucida Console
$height       =   12

$fontSize     =  0x10000 * $height + $width

$null = new-itemProperty -path $regKey -name FontSize   -value  $fontSize   -force
$null = new-itemProperty -path $regKey -name FaceName   -value  $fontName   -force
$null = new-itemProperty -path $regKey -name FontWeight -value   400        -force
Github repository about-Windows-Registry, path: /HKEY_CURRENT_USER/Console/%25SystemRoot%25_system32_cmd.exe/font.ps1

Allow copying

If QuickEdit is enabled, a portion of the screen can be selected with the mouse and copied into the clipboard by pressing the enter key.
TODO: Is this possible in Windows 10 with a common control-c?
$eatOutput = new-itemProperty -path "HKCU:\Console\%SystemRoot%_system32_cmd.exe" -name QuickEdit -value 1 -force

Set color

set-strictMode -version latest

# $regKey = 'HKCU:\Console\%SystemRoot%_system32_cmd.exe'
  $regKey = 'HKCU:\Console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe'

[byte] $fg = [System.ConsoleColor]::White
[byte] $bg = [System.ConsoleColor]::Black

$color = 16*$bg + $fg

$null = new-itemProperty -path $regKey -name ScreenColors -value $color -force
Github repository about-Windows-Registry, path: /HKEY_CURRENT_USER/Console/%25SystemRoot%25_system32_cmd.exe/color.ps1

Index