§ 221.05 Unlawful possession of marihuana.
A person is guilty of unlawful possession of marihuana when he
knowingly and unlawfully possesses marihuana.
Unlawful possession of marihuana is a violation punishable only by a
fine of not more than one hundred dollars. However, where the defendant
has previously been convicted of an offense defined in this article or
article 220 of this chapter, committed within the three years
immediately preceding such violation, it shall be punishable (a) only by
a fine of not more than two hundred dollars, if the defendant was
previously convicted of one such offense committed during such period,
and (b) by a fine of not more than two hundred fifty dollars or a term
of imprisonment not in excess of fifteen days or both, if the defendant
was previously convicted of two such offenses committed during such
period.
The most you will get is the $100 fine. No probation and probably no drug classes or tests or anything like that. Most likely you will be given an Adjudicated Conditional Discharge (ACD) which means if you don't get arrested again for 6 months or maybe a year, the charge gets thrown out and wiped from your record. Lucky for you, possession of marijuana in New York is no worse than a speeding ticket. The fact that you're only 17 makes it more likely that you will get an ACD. Whether you need your parents there or not is up to the judge, so I would call the court clerk's office and ask since it varies from court to court.

When you talk to the judge, be as respectful as possible and act like you made a stupid mistake that won't happen again. Also, make sure you dress up for your court appearance. I wouldn't sweat it too much since you're only facing a maximum $100 fine. Good luck and I hope your more careful about smoking from now on.