The restraining order will be valid until April 3, the date when the next divorce hearing is scheduled.
The actress, 47, has solicited the restraining order because she was “scared of what he is capable of doing to me,” People reports.
Anderson has reportedly received text messages and e-mails in which she was harassed by Salomon, and he has also reportedly sent compromising photos of her, taken without her consent, then threatening her with them.
Solomon was the actress’ third husband, and their first marriage was annulled in 2007 after two months. They married for the second time in January 2014.