To prove your case at trial or defeat the landlord's claims you will usually need witnesses to testify or to send documents to the court in a proper form, so the evidence comes into the record. Unfortunately, people don't usually come forward voluntarily in time for trial or the court date. You can ask the Clerk at Housing Court for a subpoena form, commanding specific parties to appear or to produce documents and records by a certain date. After you fill them out and a judge signs them, the subpoena becomes a court order directing witnesses to come to court or to supply specific evidence. In this way you can even subpoena government agencies or other organizations. When the subpoena is properly delivered, the recipient is under court order to show up or supply the records. Failure to do so can result in charges of contempt of court, which is serious. So the witness's compliance in providing what you need is far more likely.
Attention New York City Tenants: Get more information on Landlord Tenant matters at the McAdams Law main site here.