PoshCode Logo PowerShell Code Repository

Set-ConsoleProperties.ps by Marcus 6 days ago (modification of post by Lee Holmes view diff)
diff | embed code: <script type="text/javascript" src="http://PoshCode.org/embed/6851"></script>download | new post

From Windows PowerShell Cookbook (O’Reilly) by Lee Holmes

  1. ## From Windows PowerShell Cookbook (O'Reilly)
  2. ## by Lee Holmes (http://www.leeholmes.com/guide)
  4. Set-StrictMode -Version Latest
  6. Push-Location
  7. Set-Location HKCU:\Console
  8. New-Item '.\%SystemRoot%_system32_WindowsPowerShell_v1.0_powershell.exe'
  9. Set-Location '.\%SystemRoot%_system32_WindowsPowerShell_v1.0_powershell.exe'
  11. New-ItemProperty . ColorTable00 -type DWORD -value 0x00562401
  12. New-ItemProperty . ColorTable07 -type DWORD -value 0x00f0edee
  13. New-ItemProperty . FaceName -type STRING -value "Lucida Console"
  14. New-ItemProperty . FontFamily -type DWORD -value 0x00000036
  15. New-ItemProperty . FontSize -type DWORD -value 0x000c0000
  16. New-ItemProperty . FontWeight -type DWORD -value 0x00000190
  17. New-ItemProperty . HistoryNoDup -type DWORD -value 0x00000000
  18. New-ItemProperty . QuickEdit -type DWORD -value 0x00000001
  19. New-ItemProperty . ScreenBufferSize -type DWORD -value 0x0bb80078
  20. New-ItemProperty . WindowSize -type DWORD -value 0x00320078
  21. Pop-Location

Submit a correction or amendment below (
click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

Remember me