Preheat your oven to 325°F. Grease and flour a 10-inch tube (Bundt) pan or a 9×5 inch loaf pan.
In a large bowl, cream together the softened butter and granulated sugar until light and fluffy.
Beat in the eggs one at a time, mixing well after each addition. Stir in the vanilla extract.
Mix the mashed sweet potato and buttermilk together in a separate small bowl. Add this mixture to the butter mixture and beat until just combined.
In a medium bowl, whisk together the flour, cinnamon, nutmeg, baking soda, and salt.
Gradually add the dry ingredients to the wet ingredients, mixing on low speed until just combined. Do not overmix.
Pour the batter into the prepared pan.
Bake for 60 to 75 minutes for a Bundt pan, or 65 to 80 minutes for a loaf pan, or until a wooden skewer inserted near the center comes out clean.
Let the cake cool in the pan on a wire rack for 15 minutes before inverting it onto the rack to cool completely.
Prepare the glaze: Beat the softened cream cheese and butter together until smooth. Gradually add the powdered sugar and vanilla extract. Add milk or cream one tablespoon at a time until you reach a thick, pourable consistency.
Drizzle the glaze over the cooled cake.
Notes
Cook sweet potatoes until very soft before mashing for the smoothest texture.
For a richer flavor, use dark brown sugar instead of white sugar in the cake batter, reducing it to 1 3/4 cups.
If you do not have buttermilk, mix 1/4 cup regular milk with 1/2 teaspoon white vinegar or lemon juice and let it sit for 5 minutes before using.