Set your oven to 350°F so it's fully heated by the time your batter is ready. Grease a 9x13-inch pan with butter or cooking spray so nothing sticks later. Having this step done early keeps the rest of the process moving smoothly.
In a large bowl, whisk together the vegetable oil, sugar, and vanilla extract until fully combined. This forms the base that carries most of the sweetness and moisture. Take your time here so the sugar dissolves a bit into the oil.
Sprinkle in the flour, cocoa powder, baking soda, and salt directly into the wet mixture. Stir just until you no longer see streaks of flour. Overmixing at this stage can make the brownies tougher than you want.
Add your freshly shredded zucchini and fold it into the batter by hand. The batter will loosen up quickly as the zucchini releases its moisture. If you're using walnuts, this is the point to stir them in too.
Pour the batter into your prepared pan and spread it evenly with a spatula. Bake for about 30 to 35 minutes, checking with a toothpick near the center. You're looking for moist crumbs on the toothpick, not wet batter.
Set the pan on a wire rack and let the brownies cool all the way before frosting. Frosting warm brownies will only cause it to melt and slide right off. I usually give mine at least an hour to cool fully.
Whisk together the cocoa powder, melted margarine, confectioners' sugar, milk, and vanilla until smooth. Adjust with a splash more milk if it feels too thick to spread. Once the brownies are cool, spread the frosting evenly over the top.