Beep from PowerShell with [console]::beep

The one-liner to get an audible alert when your script or long command finishes — no modules, no audio files, no installs.

WindowsautomationmediapowershellLow risk
Run `[console]::beep(1000,500)` to play a 1000 Hz tone for 500 ms at the end of a script.

01Command

Command
$ [console]::beep(1000,500)

02What it does

[console]::beep(frequency, durationMs) synthesizes the tone in the console host itself, so it works even on systems with no media files available. Chain different tones to build simple melodies or distinguish success from failure: e.g. two short high beeps for done, a long low one for errors. It blocks the PowerShell prompt for the duration of the beep, and frequencies outside 37–32767 Hz throw an exception.

03Risk

RiskLow risk
RequirementsFrequency (37–32767 Hz) and duration in milliseconds; a default beep plays if arguments are omitted.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Console.Beep Method | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft documents Console.Beep(Int32, Int32) playing a beep of the specified frequency and duration through the console speaker.

Last verified: 2026-09-17 · Category: Media

06Related solutions