Lee Holmes, the author of the popular “Windows PowerShell Cookbook”, has made a little fun project for April Fool’s day (not sure in which year) that turns Rick Astley to Risk ASCII and made him to dance and sing one of his popular songs, Never Let You Down, right inside your PowerShell screen.
Sounds like a fun. Here is how you can do and watch for yourself.
1. Open a regular PowerShell screen. On Windows 8.1, you can simply press Win+X and choose PowerShell right from the menu. But if you are on Windows 7 or 8, you can press Win key, type “PowerShell”, and choose it from the list.
2. Run the following cmdlet. You can copy and paste the code in by right-click inside the PowerShell screen so that you don’t have to re-type them.
iex (New-Object Net.WebClient).DownloadString("http://bit.ly/e0Mw9w")
3. Turn up the volume, sit back, and enjoy.
Behind the scene, if you examine what’s in the short URL, it uses cmdlet iex, short for invoke-expression, to call up the external WebClient class to download a series text string pre-coded in the shortened URL, which also reset the size and the color of the PowerShell screen, while playing the song Never Let You Down from URL that is also encoded in the code.
Quite fascinating prank that shows the power of the PowerShell.