Appeal from a judgment of the County Court of Albany County (Herrick, J.), rendered September 7, 2004, convicting defendant upon his plea of guilty of the crime of criminal possession of a weapon in the third degree.
In satisfaction of a four-count indictment, defendant waived his right to appeal and pleaded guilty to criminal possession of a weapon in the third degree with the understanding that the sentence imposed would not exceed seven years in prison, with a three-year period of postrelease supervision. It was further discussed that the sentence could be less depending on defendant’s cooperation on an unrelated matter. Defendant was sentenced to 6V2 years in prison, followed by three years of postrelease supervision.
Initially, although defendant’s contention that he did not enter a knowing and voluntary plea survives his waiver of appeal, it is nevertheless unpreserved for our review insofar as he *976did not move to withdraw his plea or vacate the judgment of conviction (see People v Smith, 34 AD3d 1127, 1127 [2006]). Furthermore, to the extent that defendant indicates that his plea was factually insufficient, such is foreclosed by the waiver of the right to appeal (see People v Bagley, 34 AD3d 992, 992 [2006]). In any event, were we to consider defendant’s contention, we would find that the terms of the plea agreement were sufficiently set forth on the record and defendant entered a knowing, voluntary and intelligent plea of guilty (see People v Tatro, 8 AD3d 823, 824 [2004], lv denied 3 NY3d 682 [2004]).
Finally, in light of defendant’s waiver of the right to appeal, he is precluded from challenging the sentence imposed as harsh and excessive (see People v Lopez, 6 NY3d 248, 255-256 [2006]; People v Talback, 32 AD3d 559, 560 [2006], lv denied 7 NY3d 870 [2006]). Were we to consider this issue, we would find no reason to disturb the sentence imposed.
Spain, Carpinello, Rose and Kane, JJ., concur. Ordered that the judgment is affirmed.