The Compact Muon Solenoid (CMS) is fully equipped to measure quarkonia in the di-muon decay channel in the high multiplicity environment of nucleus-nucleus collisions. Quarkonia are especially relevant for studying the quark-gluon plasma since they are produced at early times and propagate through the medium, mapping its evolution. CMS has measured the nuclear modification factors of non-prompt J/psi (from b-hadron decays), prompt J/psi, inclusive psi(2S), and the first three Y states in PbPb collisions at $\sqrt{s_{NN}}$ = 2.76 TeV. A suppression of non-prompt J/psi, which is sensitive to the in-medium b-quark energy loss, has been measured at relatively high p_T (6.5 < p_T < 30 GeV/c) in PbPb collisions, compared to the yield in pp collisions scaled by the number of inelastic nucleon-nucleon collisions. For prompt J/psi in the same kinematic range, a strong, centrality-dependent suppression is observed. Such strong suppression at high p_T has previously not been observed at RHIC. At midrapidity and high p_T, psi(2S) show an even stronger suppression than J/psi. Furthermore, CMS has measured the suppression of the three Y states, separately, down to p_T = 0. A clear ordering of the suppression with binding energy is observed, as expected from sequential melting.