How to play beep and other system sounds in powershell script ?
Below piece of code can be used to play a beep from a Powershell script.
I have used in many of scripts where user interaction is required.
Presenting a list of different sounds which can be played from a
Powershell script.
Beep:
Hand:
Asterisk:
Beep:
- #--Statement to play beep from Powershell Scripts --#
- clear
- [System.Media.SystemSounds]::Beep.Play()
- #--Statement to play hand from Powershell Scripts --#
- clear
- [System.Media.SystemSounds]::Hand.Play()
- #--Statement to play Asterisk from Powershell Scripts --#
- clear
- [System.Media.SystemSounds]::Asterisk.Play()
Exclamation:
1 comment:
good one
if it is helpfull then please subscribe and for more help you can contact me by above informatin
Post a Comment