Payton Flint's Tech Blog
Menu
  • Home
  • Blog
  • Categories
  • Resources
  • About
  • Contact
Menu

PowerShell, Reddit, Confetti, and Rick Astley

Posted on August 21, 2023August 21, 2023 by paytonflint

The other day, I came across this Reddit post on r/sysadmin:

https://reddit.com/r/sysadmin/s/FkC30bMxCJ

The OP explains that his CEO has requested that he make confetti appear on everyone’s screen simultaneously to celebrate a milestone. I found the absurdity of the request hilarious. And, I took it as a challenge to script something similar- but I took the creative liberty of deciding to Rick Roll the target devices instead. 

Some weeks ago, I created my Invoke-Note and Invoke-Tune functions as a preliminary step in this endeavor. I wanted to be able to generate the music locally rather than pulling from the web. But, I did not have a great solution to execute to the target devices. Of course, a MECM deployment would make quick work of it, but I wanted something lightweight. I considered this an exercise, and was determined to find a way. In the weeks that have followed, I have been learning about and working with PsExec of the Windows Sysinternals suite to execute scripts to gather system information for diagnostics. 

PsExec allows one to execute scripts on systems that may not have PowerShell remoting, WinRM, or IIS enabled. And, using the appropriate switches, it allows for such actions to take place within the current interactive session! This is perfect for Rick Rolling the target devices! 

So, I had my means of execution and the music portions down, now I needed a visual component. Thanks to Filip Mårtensson @ https://github.com/fenwikk for his MIT-Licensed RickRoll project. I was able to reverse-engineer his looping ASCII animation and modify it for my use case, and integrate my musical component as well. 

So, the final product, while it does have a dependency on the lightweight PsExec, it has no other external dependencies and is self-contained. Unlike so many examples I have seen, my script does not need to call to the web to stream music or video, as I found that undesirable. 

Here it is in action: 

Here is the GitHub repo link: https://github.com/p8nflnt/RickRoll/tree/main

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

About The Author

Author's Portrait

In my journey as a technologist and 11 years of experience as an IT professional, I have found my niche as Director of Infrastructure Services; developing my skillsets in management, scripting, cloud infrastructure, identity management, and networking.

I have experience as a Systems Administrator and Engineer for large enterprises including the DoD, government agencies, and a nuclear-generation site.

I've been blessed to collaborate with engineers at esteemed Fortune 50 corporations, and one of Africa's largest, to ensure successful implementation of my work.

GitHub Button

Credentials

M365 Endpoint Administrator Associate
M365 Fundamentals
Microsoft AZ-900
CompTIA CSIS
CompTIA CIOS
CompTIA Security+
CompTIA Network+
CompTIA A+
  • April 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
© 2022 Payton Flint | The views and opinions expressed on this website belong solely to the author/owner and do not represent the perspectives of any individuals, institutions, or organizations, whether affiliated personally or professionally, unless explicitly stated otherwise. The content and products on this website are provided as-is with no warranties or guaranties, are for informational/demonstrative purposes only, do not constitute professional advice, and are not to be used maliciously. The author/owner is not responsible for any consequences arising from actions taken based on information provided on this website, nor from the use/misuse of products from this site. All trademarks are the property of their respective owners.