Place the wet ingredients (except butter) into the pan, and then making an island on top with the flour.
Make a well in the flour for each of the other dry ingredients, including sugar, salt and yeast.
Set the bread machine to 'basic white' and turn it on for a loaf of bread (or select the dough cycle if you intend to shape and bake the brioche in the oven).
Wait until 10 minutes into the knead cycle so that the dough is mixed and fully formed.
Open the lid and add in the pats of butter while the machine kneads, keeping your hands and implements away from the paddles.
Add them one at a time, allowing the bread maker to completely incorporate the previous one before adding another.
Once the butter is fully incorporated, close the lid and allow the bread machine to keep kneading.
Allow the bread machine to finish its cycle, either for a fully baked loaf of brioche or for the dough.
If baking in the bread machine, open the lid when baking is finished and allow the bread to cool slightly for 5-10 minutes before removing it from the pan to cool completely on a rack on the counter.
If making just dough, remove the dough from the machine and shape as you'd like for baking in the oven.
Allow the dough to rise in its shape for 30-45 minutes before putting into a pre-heated oven (375 F).
Oven baking time will depend on the bread shape, and can vary between 15 minutes for small rolls, to 45 minutes for a large loaf.