N.Y. Real Property Actions & Proceedings Law § 768
1.
(a) It shall be unlawful for any person to evict or attempt to evict an occupant of a dwelling unit who has lawfully occupied the dwelling unit for thirty consecutive days or longer or who has entered into a lease with respect to such dwelling except to the extent permitted by law pursuant to a warrant of eviction or other order of a court of competent jurisdiction or a governmental vacate order by: