In a large bowl, combine flour, cocoa powder, salt and baking powder.
In another bowl, or in a stand mixer beat butter and sugar together until light and fluffy. Add eggs one after the other, beating well after each addition.
Add vanilla extract and beat for another minute.
Slowly add the dry ingredients and mix until well combined. Remove the dough and divide into two halves. Form each half into a log and cover with plastic wrap and refrigerate for at least an hour. If you want to make roll out cookies, then refrigerate the dough as a ball instead of a log.
Preheat oven to 350°F.
Cut the log into ¼" pieces, place them 2" apart on a baking sheet and bake for 10-12 minutes or until they are firm around the edges. If making roll out cookies, then roll the dough into ¼" thickness on lightly floured surface and then cut the cookies out. Place them on the baking sheet and refrigerate them for 10-15 minutes. Chilling the dough prevents them from spreading when baking and helps them keep the shape. Bake for 10-12 minutes.
Let the cookies cool a little on the baking sheet before transferring them onto a wire rack. Cool completely before frosting.