N.Y. Real Property Actions & Proceedings Law § 778
1. The court is authorized and empowered, in implementation of a judgment rendered pursuant to section seven hundred seventy-six or seven hundred seventy-seven of this article, to appoint a person other than the owner, a mortgagee or lienor, to receive and administer the rent moneys or security deposited with such owner, mortgagee or lienor, subject to the court's direction. The court may appoint the commissioner of the department of the city of New York charged with enforcement of the housing maintenance code of such city or the commissioner's designee as such administrator, provided that the commissioner or the commissioner's designee shall consent, in writing, to such appointment. Any administrator is authorized and empowered in accordance with the direction of the court, to order the necessary materials, labor and services to remove or remedy the conditions specified in the judgment, and to make disbursements in payment thereof; and to demand, collect and receive the rents from the tenants; and to institute all necessary legal proceedings including, but not limited to, summary proceedings for the removal of any tenant or tenants; and to rent or lease for terms not exceeding three years any part of said premises, however, the court may direct the administrator to rent or lease commercial parts of said premises for terms that the court may approve. In addition, such administrator is authorized and empowered in accordance with the direction of the court to accept and repay such moneys as may be received from the department charged with enforcement of the housing maintenance code of the city of New York for the purpose of managing the premises, replacing or substantially rehabilitating systems or making other repairs or capital improvements authorized by the court. All moneys expended by the department pursuant to the foregoing shall constitute a debt recoverable from the owner and a lien upon the building and lot, and upon the rents and other income thereof. Such lien shall be enforced in accordance with the provisions of article eight of subchapter five of the housing maintenance code of the city of New York. Such administrator, shall, upon completion of the work prescribed in such judgment, file with the court a full accounting of all receipts and expenditures for such work. Such administrator shall dispose of the rents and other monies deposited with such administrator according to the following order of priority: