How to change PowerShell ISE font Size using command?

PowerShellMicrosoft TechnologiesSoftware & Coding

To change the font size of the PowerShell ISE editor using the command, we need to use the cmdlet $PSISE which is only loaded inside the PowerShell ISE console. You won’t find it in the main PowerShell console.

Once you run this command, there are various properties available. For example,

PS C:\> $psISE
CurrentPowerShellTab          :
Microsoft.PowerShell.Host.ISE.PowerShellTab
CurrentFile                   :
 Microsoft.PowerShell.Host.ISE.ISEFile
CurrentVisibleHorizontalTool  :
CurrentVisibleVerticalTool    :
Options : Microsoft.PowerShell.Host.ISE.ISEOptions
PowerShellTabs                :  {PowerShell 1}

You need to select the Options Property and then need to set its FontSize attribute as shown below.

$psISE.Options.FontSize = 12

The above command will immediately change the font size of the ISE console.

raja
Published on 18-Jan-2021 07:40:14
Advertisements