The plaintiff may apply for a writ of possession at the time the complaint is filed or at any time thereafter prior to judgment. (CC 1861.5) A writ shall not be issued except after a hearing on a noticed motion. A writ may be issued ex parte if probable cause exists (CC 1861.6):
(1) The property is not necessary for the support of the defendant or his family;
(2) There is an immediate danger that the property will become unavailable to levy, by reason of being transferred, concealed, or removed from the state, or the premises of the motel, hotel, inn, boardinghouse, or lodginghouse, or will become substantially impaired in value by acts of destruction or by failure to take care of the property in a reasonable manner; and
(3) The ex parte issuance of a writ of possession is necessary to protect the property.
(4) The plaintiff establishes the probable validity of the plaintiff’s claim.
If the plaintiff establishes at the hearing the probable validity of the claim and that the described property is located on the premises of the hotel, a writ of possession shall issue if the plaintiff has provided the required undertaking. (CC 1861.10) The undertaking shall be in an amount not less than twice the value of the property. (CC 1861.21)