An angry neighbour warned "pupils were going to get it" when he stormed into a school with a five-foot long metal bar after being tormented by children throwing snowballs.
Paul Logan barged into reception at Thornhill School in Sunderland on January 14 and warned that next time his home came under attack the pupils would get the weapon "wrapped around their necks".
Newcastle Crown Court heard the 56-year-old had made multiple complaints to police about his home, and his elderly neighbour's, being a target for anti-social behaviour.
He had made a report to the police just minutes before he turned up at the school with the weapon.
Logan, of Beechwood Street, Sunderland, pleaded guilty to having an offensive weapon.
Miss Recorder Jo Kidd said in the " highly exceptional" circumstances Logan, who was facing a prison sentence, would be conditionally discharged for 12 months.
The judge, who had read a police log of complaints made by Logan in the past, said: "I have been enormously assisted by the log provided by the constabulary as confirmation of the enduring anti-social behaviour you have suffered.
"The circumstances of the possession of this offensive weapon are rather out of the ordinary."
The judge read a log of complaints made by Logan between September last year and January this year as well as confirmation of contact he had had with the school about anti-social behaviour.
Prosecutor Michael Bunch told the court Logan had attended the school with the enormous bar just after making another call to the police.
Mr Bunch said: "The background to this matter is a little involved.
"This defendant had made a number of complaints to the police that pupils from the school had been throwing snowballs with stones inside at his address."
Mr Bunch said Logan's call was made at just after 3.30pm, stating children had been "hoying snowballs at his window".
Logan confessed during the call that he had a metal bar and said his 80-year-old neighbour's windows had been damaged.
The court heard police arrived at his home just over five minutes later but Logan had already left, carrying the weapon.
Mr Bunch said when officers manged to contact Logan, he told them he was at the school and that "pupils were going to get it".
The court heard during a confrontation with the deputy head, Logan told him children had been throwing snowballs which almost broke his window again and that he was sick of his home coming under attack.
Mr Bunch added: "He said 'next time it happens, I will wrap the bar around their necks'."
The court heard the school receptionist had been "shocked and alarmed" by Logan's behaviour and said he was clearly agitated.
Julie Clemtison, defending, handed in a stack of references from Logan's friends and neighbours.
Miss Clemitson said Logan had suffered "torment at the hands of schoolchildren" and added: "He was at the end of his tether.
"Having attempted to deal with things in the correct manner, he then took things into his own hands.
"He said some words in the heat of the moment, which were extremely ill judged and foolish."
The court heard Logan made none of the threats to any of the children directly.
The school declined to comment when contacted by the Echo.