How to check the properties of the Windows PowerShell Console?


You can check the Powershell console properties in two ways. The first method is by right-clicking on the title bar and open the properties.

For Example,


Command

You can find various properties there. Like Windows Size, Cursor size, Font Size, font colors, etc. But you can dynamically change the properties when the script runs using the RawUI properties in the $host UIconfiguration. You can view the properties of the console using the below command, which is the second method.

$host.UI.RawUI

Output

ForegroundColor       : DarkYellow
BackgroundColor       : Black
CursorPosition        : 0,6
WindowPosition        : 0,0
CursorSize            : 25
BufferSize            : 120,3000
WindowSize            : 120,43
MaxWindowSize         : 120,44
MaxPhysicalWindowSize : 151,44
KeyAvailable          : False
WindowTitle           : Administrator: Windows PowerShell

Updated on: 23-Jan-2020

592 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements