N.Y. VAT. LAW § 511 : NY Code - Section 511: Operation while license or privilege is suspended or revoked; aggravated unlicensed operation

1. Aggravated unlicensed operation of a
  motor vehicle in the third degree. (a) A person is guilty of the offense
  of aggravated unlicensed operation of  a  motor  vehicle  in  the  third
  degree  when  such person operates a motor vehicle upon a public highway
  while knowing or having reason to know that  such  person's  license  or
  privilege  of operating such motor vehicle in this state or privilege of
  obtaining a  license  to  operate  such  motor  vehicle  issued  by  the
  commissioner  is  suspended,  revoked  or  otherwise  withdrawn  by  the
  commissioner.
    (b) Aggravated unlicensed operation of a motor vehicle  in  the  third
  degree is a misdemeanor. When a person is convicted of this offense, the
  sentence  of  the court must be: (i) a fine of not less than two hundred
  dollars  nor  more  than  five  hundred  dollars;  or  (ii)  a  term  of
  imprisonment  of  not more than thirty days; or (iii) both such fine and
  imprisonment.
    (c) When a person is convicted of this offense  with  respect  to  the
  operation  of a motor vehicle with a gross vehicle weight rating of more
  than eighteen thousand pounds, the sentence of the court must be: (i)  a
  fine of not less than five hundred dollars nor more than fifteen hundred
  dollars; or (ii) a term of imprisonment of not more than thirty days; or
  (iii) both such fine and imprisonment.
    2.  Aggravated  unlicensed  operation of a motor vehicle in the second
  degree. (a) A person is guilty of the offense of  aggravated  unlicensed
  operation  of  a  motor  vehicle  in  the second degree when such person
  commits the offense  of  aggravated  unlicensed  operation  of  a  motor
  vehicle  in  the  third  degree  as  defined  in subdivision one of this
  section; and
    (i) has previously been convicted of an offense that  consists  of  or
  includes  the  elements  comprising  the  offense  committed  within the
  immediately preceding eighteen months; or
    (ii) the suspension or revocation is based upon a refusal to submit to
  a chemical test pursuant to section eleven hundred ninety-four  of  this
  chapter, a finding of driving after having consumed alcohol in violation
  of  section  eleven  hundred  ninety-two-a  of  this  chapter  or upon a
  conviction for a violation of any of the provisions  of  section  eleven
  hundred ninety-two of this chapter; or
    (iii) the suspension was a mandatory suspension pending prosecution of
  a  charge  of  a  violation of section eleven hundred ninety-two of this
  chapter ordered pursuant to paragraph (e) of subdivision two of  section
  eleven hundred ninety-three of this chapter or other similar statute; or
    (iv)  such  person has in effect three or more suspensions, imposed on
  at least three separate dates, for failure to answer, appear  or  pay  a
  fine, pursuant to subdivision three of section two hundred twenty-six or
  subdivision four-a of section five hundred ten of this chapter.
    (b)  Aggravated  unlicensed operation of a motor vehicle in the second
  degree is a misdemeanor. When a person is convicted of this crime  under
  subparagraph  (i)  of paragraph (a) of this subdivision, the sentence of
  the court must be: (i) a fine of not less than five hundred dollars; and
  (ii) a term of imprisonment not to exceed one hundred  eighty  days;  or
  (iii)   where  appropriate  a  sentence  of  probation  as  provided  in
  subdivision six of this section; or (iv) a term  of  imprisonment  as  a
  condition  of  a  sentence of probation as provided in the penal law and
  consistent with this section. When a person is convicted of  this  crime
  under  subparagraph  (ii),  (iii)  or  (iv)  of  paragraph  (a)  of this
  subdivision, the sentence of the court must be: (i) a fine of  not  less
  than five hundred dollars nor more than one thousand dollars; and (ii) a
  term  of  imprisonment  of  not  less  than seven days nor more than one

  hundred eighty days, or (iii) where appropriate a sentence of  probation
  as  provided  in  subdivision  six  of  this  section; or (iv) a term of
  imprisonment as a condition of a sentence of probation  as  provided  in
  the penal law and consistent with this section.
    3.  Aggravated  unlicensed  operation  of a motor vehicle in the first
  degree. (a) A person is guilty of the offense of  aggravated  unlicensed
  operation  of  a motor vehicle in the first degree when such person: (i)
  commits the offense  of  aggravated  unlicensed  operation  of  a  motor
  vehicle  in the second degree as provided in subparagraph (ii), (iii) or
  (iv) of paragraph  (a)  of  subdivision  two  of  this  section  and  is
  operating a motor vehicle while under the influence of alcohol or a drug
  in violation of subdivision one, two, two-a, three, four, four-a or five
  of section eleven hundred ninety-two of this chapter; or
    (ii) commits the offense of aggravated unlicensed operation of a motor
  vehicle  in  the  third  degree  as  defined  in subdivision one of this
  section; and is operating a motor  vehicle  while  such  person  has  in
  effect  ten  or more suspensions, imposed on at least ten separate dates
  for failure to answer, appear or pay a  fine,  pursuant  to  subdivision
  three  of  section two hundred twenty-six of this chapter or subdivision
  four-a of section five hundred ten of this article; or
    (iii) commits the offense of  aggravated  unlicensed  operation  of  a
  motor  vehicle in the third degree as defined in subdivision one of this
  section;  and  is  operating  a  motor  vehicle  while  under  permanent
  revocation  as  set  forth  in  subparagraph  twelve of paragraph (b) of
  subdivision two of section eleven hundred ninety-three of this chapter.
    (b) Aggravated unlicensed operation of a motor vehicle  in  the  first
  degree  is  a  class E felony. When a person is convicted of this crime,
  the sentence of the court must be: (i) a fine in an amount not less than
  five hundred dollars nor more than five thousand  dollars;  and  (ii)  a
  term  of  imprisonment  as  provided  in  the  penal law, or (iii) where
  appropriate and a term of imprisonment is not required by the penal law,
  a sentence of probation as provided in subdivision six of this  section,
  or (iv) a term of imprisonment as a condition of a sentence of probation
  as provided in the penal law.
    4.  Defense.  In  any  prosecution  under this section or section five
  hundred eleven-a of this chapter,  it  is  a  defense  that  the  person
  operating  the  motor  vehicle  has at the time of the offense a license
  issued by a foreign country, state, territory or federal district, which
  license is valid for operation in this  state  in  accordance  with  the
  provisions of section two hundred fifty of this chapter.
    5.  Limitation  on  pleas.  Where  an  accusatory instrument charges a
  violation of this section, any plea of guilty entered in satisfaction of
  such charge must include at least  a  plea  of  guilty  of  one  of  the
  offenses  defined  by  this  section and no other disposition by plea of
  guilty to any other charge in  satisfaction  of  such  charge  shall  be
  authorized;  provided,  however,  that  if  the  district  attorney upon
  reviewing the  available  evidence  determines  that  the  charge  of  a
  violation  of  this  section is not warranted, he may set forth upon the
  record the basis for such determination and consent to a disposition  by
  plea of guilty to another charge in satisfaction of such charge, and the
  court may accept such plea.
    6. Sentence of probation. In any case where a sentence of probation is
  authorized  by this section, the court may in its discretion impose such
  sentence, provided however, if the  court  is  of  the  opinion  that  a
  program  of  alcohol  or drug treatment may be effective in assisting in
  prevention of future offenses of a similar  nature  upon  imposing  such
  sentence,  the  court  shall require as a condition of the sentence that
  the defendant participate in such a program.

    7.  Exceptions.  When  a  person  is  convicted  of  a  violation   of
  subdivision  one  of  two of this section, and the suspension was issued
  pursuant to subdivision four-e of  section  five  hundred  ten  of  this
  article  due  to a support arrears, the mandatory penalties set forth in
  subdivision one or two of this section shall not be applicable if, on or
  before  the  return  date  or  subsequent  adjourned  date,  such person
  presents proof that such support arrears have been satisfied as shown by
  certified check, notice issued by the court ordering the suspension,  or
  notice  from  a support collection unit. The sentencing court shall take
  the satisfaction of arrears into account when imposing  a  sentence  for
  any such conviction.