8

Sometimes I run grep (aka select-string) that has string that occurs too often, then PowerShell goes crazy, sometimes I manage to kill it with Ctrl+C, but even then I have to endure irritating beeping sound for 30 + seconds. Can this be disabled also without killing terminal where it is running?

Giacomo1968
  • 58,727

4 Answers4

9

Open your PowerShell profile, or type:

if (!(Test-Path $profile)) {New-Item -Type File -Path $profile -Force}

to make a profile if one doesn't exist.

Then add Set-PSReadlineOption -BellStyle None to the profile to turn the sound off.

(that sound drives my dog insane, it was sapping my will to live)

Chris
  • 1,425
LibbyC
  • 91
2

This powershell is the SC equivalent that was already answered.

Get-Service Beep | Stop-Service -PassThru | Set-Service -StartupType Disabled
MFT
  • 723
1

Right-click the window menu bar, select 'Settings', then on the left click on the 'Windows PowerShell' profile, on the right and at the bottom choose 'Advanced', then unclick all the checkboxes for the 'Bell Notification' style.

PowerShell Appearance Settings

Toto
  • 19,304
H3007
  • 11
  • 1
0

Adding to @H3007's post, if you are able to use Windows Terminal (from MS store), you can disable the error noise. The noise persisted with the change in my PowerShell specific options, but when I changed the default handling of the noise, it seemed to have worked.

For reference:

SETTINGS
  v
PROFILES
  v
DEFAULTS
  v
ADVANCED
  v
BELL NOTIFICATION STYLE