(2) An ex parte order to have the unlawful occupant or unlawful occupants removed from property containing a residential dwelling entered by the court shall take effect when entered and shall remain in effect until there is valid service of process and a hearing is held on the motion. Such hearing shall be held within forty-eight hours of filing the verified petition unless good cause is shown for a delay. The court shall deny the ex parte order and dismiss the petition if the petitioner is not authorized to seek relief or does not show good cause.
(3) Failure to serve an ex parte order on the respondent shall not affect the validity or enforceability of such order.
6. Any ex parte order granted under this section shall be to protect the petitioner from trespass by an unlawful occupant or unlawful occupants and may include such terms as the court reasonably deems necessary to ensure the petitioner's safety including, but not limited to:
(1) Restraining the respondent from committing or threatening to commit any act of violence, molestation, stalking, assault, or disturbing the peace of the petitioner or the petitioner's property, including violence against a pet;
(2) Restraining the respondent from entering the petitioner's premises or dwelling unit or coming within a certain proximity of the petitioner's premises or dwelling unit; and
(3) Restraining the respondent from communicating with the petitioner in any manner or through any medium.
7. When the court has, after a hearing on the petition, issued an order for relief to permanently exclude an unlawful occupant or unlawful occupants from the petitioner's property, it may additionally: