N.Y. Criminal Procedure Law § 530.12
1. When a criminal action is pending involving a complaint charging any crime or violation between spouses, former spouses, parent and child, or between members of the same family or household, as members of the same family or household are defined in subdivision one of section 530.11 of this article, the court, in addition to any other powers conferred upon it by this chapter may issue a temporary order of protection in conjunction with any securing order committing the defendant to the custody of the sheriff or as a condition of any order of recognizance or bail or an adjournment in contemplation of dismissal.
(6)
(7)
(8)
5. * Upon sentencing on a conviction for any crime or violation between spouses, between a parent and child, or between members of the same family or household as defined in subdivision one of section 530.11 of this article, the court may in addition to any other disposition, including a conditional discharge or youthful offender adjudication, enter an order of protection. Where a temporary order of protection was issued, the court shall state on the record the reasons for issuing or not issuing an order of protection. The duration of such an order shall be fixed by the court and: (A) in the case of a felony conviction, shall not exceed the greater of: (i) eight years from the date of such sentencing, except where the sentence is or includes a sentence of probation on a conviction for a felony sexual assault, as provided in subparagraph (iii) of paragraph (a) of subdivision three of section 65.00 of the penal law, in which case, ten years from the date of such sentencing, or (ii) eight years from the date of the expiration of the maximum term of an indeterminate or the term of a determinate sentence of imprisonment actually imposed; or (B) in the case of a conviction for a class A misdemeanor, shall not exceed the greater of: (i) five years from the date of such sentencing, except where the sentence is or includes a sentence of probation on a conviction for a misdemeanor sexual assault, as provided in subparagraph (ii) of paragraph (b) of subdivision three of section 65.00 of the penal law, in which case, six years from the date of such sentencing, or (ii) five years from the date of the expiration of the maximum term of a definite or intermittent term actually imposed; or (C) in the case of a conviction for any other offense, shall not exceed the greater of: (i) two years from the date of sentencing, or (ii) two years from the date of the expiration of the maximum term of a definite or intermittent term actually imposed. For purposes of determining the duration of an order of protection entered pursuant to this subdivision, a conviction shall be deemed to include a conviction that has been replaced by a youthful offender adjudication. In addition to any other conditions, such an order may require the defendant: * NB Effective until September 1, 2027 * Upon sentencing on a conviction for any crime or violation between spouses, between a parent and child, or between members of the same family or household as defined in subdivision one of section 530.11 of this article, the court may in addition to any other disposition, including a conditional discharge or youthful offender adjudication, enter an order of protection. Where a temporary order of protection was issued, the court shall state on the record the reasons for issuing or not issuing an order of protection. The duration of such an order shall be fixed by the court and, in the case of a felony conviction, shall not exceed the greater of: (i) five years from the date of such sentencing, or (ii) three years from the date of the expiration of the maximum term of an indeterminate sentence of imprisonment actually imposed; or in the case of a conviction for a class A misdemeanor, shall not exceed three years from the date of such sentencing; or in the case of a conviction for any other offense, shall not exceed one year from the date of sentencing. For purposes of determining the duration of an order of protection entered pursuant to this subdivision, a conviction shall be deemed to include a conviction that has been replaced by a youthful offender adjudication. In addition to any other conditions, such an order may require the defendant: * NB Effective September 1, 2027
(f)
11. If a defendant is brought before the court for failure to obey any lawful order issued under this section, or an order of protection issued by a court of competent jurisdiction in another state, territorial or tribal jurisdiction, and if, after hearing, the court is satisfied by competent proof that the defendant has willfully failed to obey any such order, the court may: