At Ignite 2020, Jeffery Snover (Inventor of PS) and Jason Helmick (an Epic colleague of Mr Snover. and PM for PS) showed us a Feature much appreciated for us PowerShell lovers. PSReadLine with Predictive IntelliSense.

Prediction based on History & Plugins. PSReadline 2.2.0-beta1 PowerShell 7.1+
https://techcommunity.microsoft.com/t5/azure-tools/announcing-az-predictor/ba-p/1873104

To get started with Predictive IntelliSense. Run Below from an Administrator PowerShell Console.

Install-Module PSReadLine -RequiredVersion 2.1.0
Set-PSReadLineOption -PredictionSource History

Once above call has been made you’re good to go but you can also change the default color of the prediction by typing:

Set-PSReadLineOption -Colors @{ InlinePrediction = '#C0C0C0'}
Blue Text in my case for clarity sake, is User input and the rest is predicted by PSReadLine

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s