private/BootMedia/Steps/Step-BootImageConsoleSettings.ps1
|
#Requires -PSEdition Core function Step-BootImageConsoleSettings { <# .SYNOPSIS Applies console/terminal registry settings to the mounted WinPE image. .NOTES Author: David Segura Version: 0.1.0 #> [CmdletBinding()] param () $MountPath = $global:BuildMedia.MountPath $RegConsole = @' Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\MountedHive\Console] "CursorType"=dword:00000000 "FaceName"="Consolas" "FontFamily"=dword:00000036 "FontSize"=dword:00140000 "FontWeight"=dword:00000190 "WindowAlpha"=dword:000000ff "WindowPosition"=dword:00000000 [HKEY_LOCAL_MACHINE\MountedHive\Console\%SystemRoot%_System32_cmd.exe] "FaceName"="Consolas" "ScreenBufferSize"=dword:012c0064 "WindowSize"=dword:001e0064 [HKEY_LOCAL_MACHINE\MountedHive\Console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe] "FaceName"="Consolas" "FontSize"=dword:00120000 "ScreenBufferSize"=dword:0bb8008c "WindowSize"=dword:0028008c '@ Write-OSDeployCoreProgress 'Modifying WinPE CMD and PowerShell Console settings' $RegConsole | Out-File "$env:TEMP\RegistryConsole.reg" -Encoding ascii -Width 2000 -Force reg.exe LOAD HKLM\MountedHive "$MountPath\Windows\System32\Config\DEFAULT" reg.exe IMPORT "$env:TEMP\RegistryConsole.reg" Start-Sleep -Seconds 3 reg.exe UNLOAD HKLM\MountedHive } |