Powershell : Play Music, Shuffle, Loop, Stop, Next Track Notification


Hello Reader!  🙂

This is in continuation to one of my previous blogpost where in I wrote a script to play random songs in background using the Powershell console.

Though there are already some Windows Media player automation scripts available in the commmunity, but I was looking for something that easy as  “Single cmdlet” and provides easy controls like Shuffle, Loop, Stop. Hence I wrote this script.

PURPOSE : 

I’ve included few more functionalities to the script which are following

  1. PLAY IN BACKGROUND :

    Plays all music in background on a hidden Windows Media Player Instance and you can continue with your work.

    1

  2. MUSIC CONTROL :

    Enables you to Control your music from the Shell no need to switch windows, by providing options like Shuffle, Loop and Stop

    1

  3. NEXT TRACK NOTIFICATION

    You get Notified by a Information balloon in bottom right corner of your screen whenever a new track starts playing.

    1
    On Windows 10 Machine

    tray
    On Windows 7 Machine
  4. CACHES DIRECTORY LOCATION: 

    Function caches information of last accessed directory so that you don’t have to provide Music directory every time you run the function

    1

  5. INFORMATION AND USER PREFERENCES :

    Provides Information like Total Songs, Total Play duration, and Mode chosen by the user in the PowerShell console itself.

    1\

  6. SUPPORT SWITCH ALIASES :

    All Music control switches support Aliases for all those lazy people out there 😛 😉

    1

HOW IT WORKS (The Core Logic) : 

1

Following is the Script for your reference

HOW TO RUN : 

MediaPlayer

GRAB THE SCRIPT : 

Get the complete script from my GitHub Repository here

 

Hoping you’ll find it useful in your day to day use! 🙂

Prateek Singh

Advertisements

One thought on “Powershell : Play Music, Shuffle, Loop, Stop, Next Track Notification

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s