Leon Robinson, 36, of no fixed abode, is originally from Royston and assaulted the police employees after they acted 'swiftly' to apprehend him for breaching the conditions of the order.
According to police, Robinson jumped across a table while in an interview and caused minor injuries to one of the officers.
Detective Inspector Kate Leake said: “Our officers acted swiftly to arrest Robinson after learning of his breach of a restraining order, which placed specific conditions on him in order to protect a vulnerable victim.
“It is appalling that, once in custody, Robinson then chose to assault two officers in a completely unprovoked attack.
"This type of behaviour is unacceptable and I am pleased he has received a custodial sentence for his crimes.”