When a defendant against whom an action shall have been commenced shall be adjudged guilty of usurping, intruding into, or unlawfully holding or exercising any office, franchise, or privilege, judgment shall be rendered that the defendant be excluded from such office, franchise, or privilege and also that the plaintiff recover costs against the defendant.
N.D.C.C. § 32-13-11