(a) Ex Parte Application for Compliance. Where by statute a public officer or agency may apply ex parte to the court to compel a person to testify or to produce or file books, papers, documents or other objects in accordance with the subpoena or direction of the officer or agency, or to refrain from certain misconduct, the application may be made by motion supported by affidavit. The court may order the person to appear before the officer or agency and there to proceed as may be directed in the order.
(b) Application for Compliance on Notice. If in such a case the statute does not provide for an application ex parte, an order to show cause may issue on the motion and supporting affidavit. The order shall be made returnable in not less than 2 nor more than 10 days, requiring such person to show cause before the court why the subpoena or other direction should not be complied with or such misconduct refrained from, and upon the return of the order the court shall afford the person an opportunity to be heard under oath. The court may order a person determined by it to have failed, without justification, to obey the subpoena or other direction, answer a proper question, produce any such thing, or to have been guilty of misconduct, to appear before the officer or agency at a time or times and place mentioned in the order and there to proceed as may be directed in the order.
(c) Application for Sanctions. Where a statute provides that failure of a person to obey a subpoena or order of a public officer or administrative agency or a receiver, to testify, to answer a proper question, or to produce books, papers, documents or other objects, or that misconduct on the part of a person attending a hearing, shall be punishable by the court in the same manner as like failure or misconduct is punishable in an action pending in the court, the matter shall be brought before the court by motion supported by affidavit stating the circumstances. Upon the motion the court may issue an order to show cause, returnable in not less than 2 nor more than 10 days, requiring the person to show cause before the court why punishment should not be ordered; or the court may issue an attachment. If the court determines that the failure or misconduct above mentioned was without justification, it may punish as for a contempt of court.