As someone with two funky knees, here's what I do to stay pain free (more or less) after lower body work.
On squats, keep your weight in the heels. You should be able to freely wiggle your toes around as you go up and down. You could also try a slight decrease in your range; a small decrease in range of motion will translate to almost no loss of effectiveness for the exercise.
On lunges, make sure legs do not go beyond a ninety degree angle, and make sure your feet are not lined up on a "tight rope", but keep them about hip width apart. Make sure the front knee does not go over the toes, keep your weight centered so the front leg doesn't get too much burden. Decrease the range if necessary.
On plies, Cathe and crew sometimes are guilty of not keeping their knees in alignment with the hip/toe line. It is natural to let the knees cheat inward a bit here, but that is not good for proper patellar tracking. Get your hip, knee and toes on the same plane by flaring the knees back during the motion. To do this at first, you may have to practice with no weight and lean over to look and make sure you have it. Another way to tell is that you will feel a more intense groin stretch at the bottom of the range, and your range may decrease slightly. Again, never let the knees go beyond the toes.
On step-ups, lower the step height a couple inches and see if it helps. No angles on the upper leg more acute than ninety degrees.
Watch out for one-legged squats and glute raises where the whole load is on one leg; lighten up and be especially careful about the ninety degree and weight in heel rules.
Low-ends can also be extra burdensome to knees; be careful.
Don't ignore your pain whatever you do. It could be a warning. Also, watch for things you may do unconsciously in every day life like kneeling down to be with kids, squatting for long periods in the garden, etc. Take care of those joints! Hope this helped.
--Ann