The first casualty, as it were, is Severus Snape, who takes a swung paint can to the side of the head and spends the first half hour of the war locked in a disused classroom, before he can do more than demand Harry Potter’s whereabouts from Minerva McGonagall.
When Voldemort arrives with his Death Eaters, giants, werewolves, and assorted other lackeys in tow, and demands Harry Potter, the answer–from Neville Longbottom–is “If you want him, come and get him, you snake-fucking arsehole.”
Minerva has to turn a laugh into a hacking cough, and surrepticiously awards ten points to Gryffindor when nobody’s paying attention.
When Voldemort strides up to the doorway, the lawn collapses and he finds himself chest-deep in a Portable Swamp.
Ginny Weasley, responsible for the first line of defense at her own request, is downright gleeful as she activates the hundreds of freezing charms the students had added to it, and he and several Death Eaters find themselves temporarily stuck in the ice.
Everything is brought to bear. Electricity, zapping some Death Eaters. Tar and feathers, turning some werewolves into a sticky mess. Maple-syrup balloons, hidden in nets suspended from the ceilings. Legos and D4 dice, scattered across the ground after a set of permanent sticking charms that attach the attackers’ boot soles to the floor.
Some traps are magical in nature. The suits of armor, charmed to attack, and both sides of the giant magical chess set that used to guard the Sorcerer’s Stone. Others are purely mundane: tripwires that drop trapdoors full of stones, rotten pumpkins, and metal shavings on the heads of unsuspecting giants. Still more are a spectacular mix: hand grenades that bounce down stairways before exploding at the touch of a button from some second-year in the Hog’s Head.
Hogwarts’ defenders throw spells, gunfire, and molotov cocktails at the enemy, and whenever a Death Eater aims a spell at someone, a trap is sprung upon them by a watchful younger student.
When Voldemort retreats, his robes tattered and dripping with substances he can’t name and his follower count cut in half, there are no deaths among the other side.
He delivers his ultimatum anyway.
Snape, at this point, has awoken and escaped by the simple means of opening a window and flying next door; he tracks down Harry by listening to students talk, and heads to the room of requirement, dodging two or three traps (impressed despite himself) until one of the watchers contacts Harry via radio and Harry says to let the bastard at him.
What the two talk about, only they know. Hermione and Ron grab the diadem while watching them dubiously, and Snape offers to call up Fiendfire to destroy it. This perhaps proves something to Harry, who accompanies Snape to the Headmaster’s office despite Hermione’s and Ron’s, and then Minerva’s, protests.
When they are done, Harry Potter walks out the front door of Hogwarts and duels Voldemort, who starts on the count of two and kills him.
Shock, then hundreds of protests of cheating, and when Voldemort starts to gloat the chants of “CHEATER! CHEATER!” drown him out. He tries to say that it’s irrevelant; Harry Potter is dead, but is heckled in the form of thrown objects. From the shadows, Snape flings the shattered, scorched remnants of the diadem, the cup, and Nagini’s severed head. Voldemort catches the first, and shock paralyzes him long enough to get beaned in the head with the second; his shriek of rage is cut short when the third bounces right off his face.
(The Sorting Hat, begging anyone who will listen to put it on, was listened to by Snape. Being hit on the head a second time did his oncoming headache no favors, but the Sword of Gryffindor appears for bravery, and on his way down, meeting Nagini trapped in something resembling a magical tar pit, he does with the sword what the sword is for.)
There is laughter, and then that laughter becomes a roaring, thundering cheer when Harry Potter stands back up and taps Voldemort on the shoulder. Voldemort turns, and is knocked flat to the ground by a devastating punch that held every bit of misery Harry’s been through in his whole life thanks to Voldemort’s work.
Then when he gets up, Harry makes his request that Voldemort try for some regret. The Elder Wand does its thing. Voldemort falls, never to rise again.
Death Eaters escape, only to find out that some of those traps were full of pigment visible under ultraviolet light, and it is very easy for Aurors to figure out who was present at the attack.
The cleanup is a trial and a half, but the story is told for centuries.