Preheat oven to 350°F (175°C). Grease a 9"x 13"x 2" baking pan.
Whisk together the flour, baking powder, and salt. Set aside.
Using an electric mixer on medium speed, beat the butter, sugar, and brown sugar until light and fluffy. Add the eggs, one at a time, mixing well after each addition. Mix in the vanilla.
Reduce mixer speed to low. Gradually add the flour mixture, mixing just until combined. Stir in the M&Ms. (Save 1-2 tablespoons of the candies to sprinkle over the top of the dough if you like.)
Transfer the dough to the prepared pan and spread evenly. If you set aside any candies, sprinkle them over the top of the dough and press down lightly. Bake 20 to 25 minutes, or until the bars are golden brown and a pick inserted into the center comes out clean.
Cool the bars in the pan on a wire rack. Then cut into bars for serving.