Preheat the oven to 350 degrees and spray a 9x13 baking pan with nonstick cooking spray.
In a bowl whisk together the flour, baking powder, baking soda, pumpkin spice, and salt. Then set aside.
In a large separate bowl, beat together the butter and sugar until smooth and creamy.
Add the vanilla and pumpkin and beat to combine. Then add the eggs, one a time, beating between each addition.
Gradually add the flour and mix until smooth.
Pour the batter into the prepared pan and bake for 35 to 45 minutes, until a toothpick inserted into the center of the cake comes out clean.
Allow the cake to cool completely.
Prepare the cream cheese frosting by beating together the butter, powdered sugar, and vanilla until smooth. Then add two cups of powdered sugar and one tablespoon milk and beat to combine. Next add the remaining powdered sugar and beat to combine. (*See note)
Spread the frosting in an even layer over the top of the cake.
Top with chopped pecans, if desired, then slice and serve.
Notes
*If the frosting is too thick, add more milk until the desired consistency is reached.