Preheat oven to 350°F (175°C). Line baking sheets with parchment paper for easy cleanup.
In a large mixing bowl, cream together butter, granulated sugar, and brown sugar until light and fluffy. Add eggs one at a time, followed by vanilla extract.
In another bowl, whisk together flour, baking powder, baking soda, cinnamon, nutmeg, and salt. Gradually add the dry ingredients to the wet mixture until combined.
Fold in grated zucchini and walnuts (if using). Drop rounded tablespoons of dough onto prepared baking sheets, spacing 2 inches apart.
Bake cookies for 12-15 minutes or until edges are golden. Cool on sheets for 5 minutes, then transfer to a wire rack.
For the frosting, beat cream cheese and butter until smooth. Gradually add powdered sugar, vanilla, and milk (if needed) until frosting reaches desired consistency.
Spread frosting on cooled cookies and enjoy!