Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Use PowerShell to Send Beep to Console

$
0
0

Summary: Use the Beep command in Windows PowerShell.

Hey, Scripting Guy! Question How can I send a sound in Windows PowerShell to notify a user if an error occurs in the script?

Hey, Scripting Guy! Answer 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)


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>