"We're off to drink champagne now," Mr Ponosov told the Associated Press news agency after the court ruling.
"Of course, it was trivial," he said.
Mr Ponosov earlier told the BBC that Russian prosecutors had brought the case against him and he was unaware of any Microsoft claim against him.
He said the 12 new computers at his school had been delivered with the unlicensed software already installed. The school in the Urals village of Sepych has 380 pupils.
Both Russian President Vladimir Putin and former Soviet leader Mikhail Gorbachev had publicly voiced support for Mr Ponosov.