PowerShell Radio : Loop Random Music in Background


While programming all you need is a cup of coffee and Music (and Brain ~Implied 😛) . Well we can’t automate getting the coffee part, but today I’ve made a small script that automatically play random songs for you in background

PURPOSE :

To play Random music from a selection, Automatically when I open my PowerShell console or On demand in Background.

So that you can continue your work and don’t have to worry even changing the Music and let Powershell Manage the music randomly and you can just concentrate on your work.

HOW IT WORKS :

Following image explains the logic and script execution, which is self explanatory.

how_it_works

HOW TO RUN IT :

Playing the Music in background whenever you want like in animation below,

ezgif.com-optimize

Note that script will notify you will a balloon message in System tray whenever a new song is played.

tray

To Stop the music you can simply stop the Job

stop

And you can also try adding the script in your PowerShell Profile , if you want to run the script when you open PowerShell console, like I’ve done in my PS profile

profile

SCRIPT: 

NOTE :

There more ways through which, you can play Random music using powershell. Like one in below screenshot, which uses the ‘PLAY’ Verb associated with a music file to play music on default music player.

more

Hope you’ll enjoy scripting with some Automated music from today 🙂

@SinghPrateik

Advertisements

One thought on “PowerShell Radio : Loop Random Music in Background

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