#Credit http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-change-ps-window-size-on-the-fly

 

Ændre vindue størrelse:

Function Set-Wide
{
    $aff= (Get-Host).UI.RawUI
    $bff= $aff.BufferSize
    $bff.Width = 170
    $bff.Height = 9000
    $aff.BufferSize = $bff
    $wff= $aff.WindowSize
    $wff.Width = 170
    $wff.Height = 60
    $aff.WindowSize = $wff
}
 
Function Set-Small
{
    $aff= (Get-Host).UI.RawUI
    $wff= $aff.WindowSize
    $wff.Width = 90
    $wff.Height = 45
    $aff.WindowSize = $wff
    $bff= $aff.BufferSize
    $bff.Width = 90
    $bff.Height = 9000
    $aff.BufferSize = $bff
}