Set-PSReadLineOption

noun

say it: “SET PEE-ESS REED-lyn OP-shun” /ˈsɛt ˌpiˌɛs ˈridˌlaɪn ˈɑpʃən/

A PowerShell command that changes the settings of the command line, such as how much history it keeps.

What does Set-PSReadLineOption do?

Set-PSReadLineOption changes how the PowerShell command line behaves: how predictions show, how many commands history keeps, which set of keys it uses. A change lasts for this window only, so try it first, then put the same line in your profile to keep it.

Set-PSReadLineOption -MaximumHistoryCount 10000
(Get-PSReadLineOption).MaximumHistoryCount     # 10000

In a sentence

  • “Sam used Set-PSReadLineOption to keep 10,000 commands in his history.”
  • “A line with Set-PSReadLineOption in her profile keeps Maya's list view in every window.”

Level: Journeyman · More PowerShell terms at this level

Updated