Daniel Keevill, 44, of Celadine Avenue, Locks Heath, was found guilty of assaulting a police officer and breaching a criminal behaviour order.
He was caught shouting and swearing, and behaving aggressively on April 16 last year.
Portsmouth magistrates imposed an 18-week prison sentence suspended for 18 months.
He must complete 25 days of rehabilitation activity requirements.
Keevill assaulted the police officer on May 20. He must pay a Â£115 victim surcharge and Â£310 prosecution costs.
He admitted failing to turn up to court on November 26.