Prohibition and mandamus are extraordinary remedies. Prohibition is available only where there is a clear legal right, and only in cases where judicial authority is at issue, and the court acts, or threatens to act, either without jurisdiction or in excess of its powers. Mandamus will lie only to compel the performance of a ministerial act, and only where there is a clear legal right to the relief sought.
Matter of Taffet v. Cozzens, NY Slip Op 00149 (2d Dep't January 8, 2020)
Here is the decision.