Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I disable select mode in a PowerShell script?

Tags:

powershell

PowerShell default is that when you click inside the PowerShell console, PowerShell goes into "select mode" and pauses the script until you hit space, enter or escape.

I have a Script with an infinite-loop while ($true) {} which should always run, how can I tell PowerShell to not stop the script when someone accidentally clicks into the PowerShell window?

like image 230
SimonS Avatar asked Jun 22 '17 11:06

SimonS


1 Answers

In Windows PowerShell, this can be achieved by:

  1. Right click on PowerShell window icon;

enter image description here

  1. Select "Properties";

  2. Disable "Edit Options" > "QuickEdit Mode".

Powershell Properties

like image 97
Samuel Avatar answered Sep 27 '22 18:09

Samuel