I DO NOT recommend doing this at school. First off, you can get yourself in to big crap if you do.
Second, Administrators block cmd.exe so you can't do stuff like this.(Easy to pass though. They already have a bunch of Instructables on how.)
Also, I dont know if this is considered hacking or not, so only do it to people who wouldn't care.
Now that I am done being Mr. Strict, the boring old normal teacher, lets get started!
Step 1: Steal the IP Adress!
To shudown or whatever you want to do, you first need your victim's IP adress. This is the computer's connection to the Internet. The easist and fastest way to is to run cmd.exe (Command Prompt) on your victim's computer. Click start and then run. Type in cmd.exe and click the RUN button. Type in this afrer Command Prompt opens (NO QUOTES!):
Copy the IP down on a piece of paper.
Step 2: Run Back to Your Computer!!!
Get away from your victim's computer before they catch you!!!!
Step 3: The Fun Part
Ok, once you get back to your computer, you should wait until you know your victim is on his/her computer. Run cmd.exe on your computer (Wow, you can do a lot with Command Prompt, huh?). Type in (Without quotes):
This opens up a window called Remote Shutdown Dialog. Click on the "Add" button and type in your victim's IP adress (Yes, you can prank multiple victims at one time.). Click OK and choose what you want to do to thier computer (Shutdown, Restart, Logoff) If you want to rub it in thier face, check Warn Users of Action and set the time that it will take for them to save thier stuff. MAKE SURE YOU CHECK THE PLANNED BOX!!! If you don't it can mess up thier computer (Well, they can when it turns back on.) And if you really want to rub it in thier face, you can add a comment like: "Haha loser you just got PRANKED!!! You have exactly 20 seconds to save your stuff! What an idiot!!". You know, someting really sutle and light.