Playing Sound in PowerShell

by Jan 7, 2011

If you would like to catch a user’s attention, you can make PowerShell beep like this:

[System.Console]::Beep()
[System.Console]::Beep(1000,300)

A nicer sound can be played this way:

[system.media.systemsounds]::Beep.play()
[system.media.systemsounds]::Asterisk.play()
[system.media.systemsounds]::Exclamation.play()
[system.media.systemsounds]::Hand.play()

Twitter This Tip!
ReTweet this Tip!