He was also credited with time served after spending 64 days in Ventura County Jail since his arrest.
During a previous hearing, security guard Richard N Eubeler claimed Alexander - who married Britney in a whirlwind Las Vegas ceremony in 2004 before their union was annulled 55 hours later - had tried to get through the Gimme More singer's locked bedroom door after making his way through the grounds of his home.
He testified: "He started reaching into his right pocket ... I drew my weapon and held it to my chest."
Eubeler added that Alexander went into the property's games room and he followed him, shutting the door behind them.
He added: "He was just yelling for Britney. He said, 'F*** it. I'm going back inside the way I came'. "
He claimed Alexander broke the handle to a door Eubeler was holding shut with his foot.
Judge Worley said: "It's been established that he appears to be a continuing threat given the efforts he went through to insert himself into this event."