This question already has an answer here:
In Chapter Thirty-Six of Deathly Hallows we have the following passage:
The house-elves of Hogwarts swarmed into the entrance hall, screaming and waving carving knives and cleavers, and at their head, the locket of Regulus Black bouncing on his chest, was Kreacher, his bullfrog's voice audible even above this din: "Fight! Fight! Fight for my Master, defender of house-elves! Fight the Dark Lord, in the name of brave Regulus! Fight!"
They were hacking and stabbing at the ankles and shins of Death Eaters, their tiny faces alive with malice, and everywhere Harry looked Death Eaters were folding under sheer weight of numbers, overcome by spells, dragging arrows from wounds, stabbed in the leg by elves, or else simply attempting to escape, but swallowed by the oncoming horde.
It is well established that house-elves are capable of combative magic. For example, in Chapter Twenty-Three of Deathly Hallows Dobby is able to easily disarm Narcissa:
“Dobby!” she screamed and even Bellatrix froze. “You! You dropped the chandelier – ?”
The tiny elf trotted into the room, his shaking finger pointing at his old mistress.
“You must not hurt Harry Potter,” he squeaked.
“Kill him, Cissy!” shrieked Bellatrix, but there was another loud crack, and Narcissa’s wand too flew into the air and landed on the other side of the room.
And in Chapter Eighteen of Chamber of Secrets he was able to throw Lucius backward:
But Dobby shouted, "You shall not harm Harry Potter!"
There was a loud bang, and Mr. Malfoy was thrown backward.
Why, then, did the elves at Hogwarts resort to crude Muggle tactics when they could have been disarming Death Eaters, throwing them around, and who knows what else?