Playing an Audio File Via PowerShell

Who doesn't want to add a little bit of excitement to their PowerShell? Find your favorite wave file and throw it in a directory somewhere on your system. Pop the path into the first line of the below two lines and enjoy a little pizazz in your PowerShell life!

$player = New-Object System.Media.SoundPlayer "$env:windir\Media\LOZ_Get_Heart.wav"

If you're unsure about what to use for your audio love, I highly reccomend getting some sound effects from the good folks over at Zelda Dungeon!


Popular Posts