Welcome to the Microsoft Script Center. We are dedicated to the system administrator scripters of the world. At the Microsoft Script Center, we focus on teaching people how to use Windows PowerShell to reduce time spent performing mundane tasks.
Â
What's new?
Check out the Hey, Scripting Guy! blog to catch all the latest news, events, and, of course, scripts!
PowerTip: Use PowerShell to Send Beep to Console Summary: Use the Beep command in Windows PowerShell.
How can I send a sound in Windows PowerShell to notify a user if an error occurs in the script?
Windows PowerShell can send a Beep to the console:
[console]::beep(500,300)
Change the value of the first number to alter the pitch (anything lower than 190 or higher than 8500 canât be heard), and change the value of the second number to alter the duration:
[console]::beep(2000,500)
Saturday, Sep 21