PoshCode Archive  Artifact Content

Artifact 9eb38f7d74222b4b0dac63d34d68c782dd9bce34ca4e54072ae88b9bc7bbb3e8:

  • File Set-ConsoleProperties.ps1 — part of check-in [9ac56b7523] at 2018-06-10 14:21:53 on branch trunk — From Windows PowerShell Cookbook (O’Reilly) by Lee Holmes (user: Lee Holmes size: 1273)

# encoding: ascii
# api: powershell
# title: Set-ConsoleProperties.ps
# description: From Windows PowerShell Cookbook (O’Reilly) by Lee Holmes
# version: 1.0
# author: Lee Holmes
# license: CC0
# x-poshcode-id: 6851
# x-archived: 2017-04-24T03:52:56
# x-published: 2017-04-20T19:17:00
#
#
## From Windows PowerShell Cookbook (O'Reilly)
## by Lee Holmes (http://www.leeholmes.com/guide)

Set-StrictMode -Version Latest

Push-Location
Set-Location HKCU:\Console
New-Item '.\%SystemRoot%_system32_WindowsPowerShell_v1.0_powershell.exe'
Set-Location '.\%SystemRoot%_system32_WindowsPowerShell_v1.0_powershell.exe'

New-ItemProperty . ColorTable00 -type DWORD -value 0x00562401
New-ItemProperty . ColorTable07 -type DWORD -value 0x00f0edee
New-ItemProperty . FaceName -type STRING -value "Lucida Console"
New-ItemProperty . FontFamily -type DWORD -value 0x00000036
New-ItemProperty . FontSize -type DWORD -value 0x000c0000
New-ItemProperty . FontWeight -type DWORD -value 0x00000190
New-ItemProperty . HistoryNoDup -type DWORD -value 0x00000000
New-ItemProperty . QuickEdit -type DWORD -value 0x00000001
New-ItemProperty . ScreenBufferSize -type DWORD -value 0x0bb80078
New-ItemProperty . WindowSize -type DWORD -value 0x00320078
Pop-Location