PowerShell: How to Play a Sound

$soundFile="C:\Windows\media\tada.wav"
$sound = new-Object System.Media.SoundPlayer
$sound.SoundLocation=$soundFile
$sound.Play()

Leave a Reply

Your email address will not be published. Required fields are marked *