Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to disable suggestion while typing in powershell

While executing commands in PowerShell it’s automatically suggesting texts

enter image description here

How can I disable these suggestions and also in future if I want to enable the suggestions how can I do it?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Use the Set-PSReadLineOption cmdlet:

To disable all suggestions:

Set-PSReadLineOption -PredictionSource None

Enabling offers several options, depending on what source(s) should be used for completions: History, Plugin, or HistoryAndPlugin (the default).

See this blog post for details.


Note:

  • Perhaps surprisingly, the cmdlets that configure the behavior of the PSReadLine module, such as Set-PSReadLineOption, do not do so persistently – they only affect the session at hand.

  • Therefore, in order to make (what are effectively) persistent configuration changes, place the command above in your $PROFILE file.

    • Note: Said file and its parent directory do not exist by default.

    • To create it on demand, use the following command:

      if (-not (Test-Path $PROFILE)) { $null = New-Item -Force $PROFILE }
      
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading