Friday, August 29, 2014

#24 : How to play music from Powershell Script?


While doing something, I thought to add some alerting music. Just to notify that script has completed execution. Just for fun and in effort to do everything in Powershell, I wrote the below :

$sound.SoundLocation="c:\WINDOWS\Media\notify.wav"
$sound.Play()
$sound.Stop()

You may use this script when you have to check something related with Sound-Card or it may be useful to give some interactive help. You may run any of the WAV file with this.

Hope you liked this article.

5 comments:

  1. hi!,I like your writing so a lot! share we keep in touch more
    approximately your post on AOL? I need an expert on this area to solve my problem.

    Maybe that is you! Looking forward to peer you.

    My blog: Dedicated Hosting Service (http://methamin.com/profile/lauhulda)

    ReplyDelete
  2. The code looked incomplete, so I did some research. The missing piece to this puzzle is:
    $sound = New-Object System.Media.SoundPlayer

    ReplyDelete
  3. This is very useful post for me. This will absolutely going to help me in my project. play free slots online

    ReplyDelete
  4. I recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing. shindo life codes 2182

    ReplyDelete
  5. Nice information thanks for share. you should read about this tips and tricks

    ReplyDelete

#112: How to handle xml document in Powershell?

 In PowerShell, you can handle XML data using various cmdlets and methods provided by the .NET Framework. Here's a basic guide on how to...