While the shallots are cooking, use a paring knife to score a line around the center of the potatoes. This will help with peeling later.
Place the potatoes in a large saucepan and cover the tops with 1-inch (2.5 cm) of water. Salt the water and bring to a boil over high heat.
Once boiling, reduce the heat to medium-low and continue boiling for 20-30 minutes until fork tender. The time will depend on how large your potatoes are.
Drain the potatoes and set aside to cool for 15 minutes.
Use a paper towel to help you peel the potatoes starting from the line you scored around the center (they'll still be hot so be careful). The skins should come of easily.
Place the peeled potatoes through a potato ricer placed over a large saucepan.**
Put the potatoes on the stove over medium heat and stir in the melted butter, gruyere (reserve about 1-2 tbsp of gruyere for topping), salt, and pepper.
Stir in the milk a little at a time then add the cream. Mix until well combined.
Reduce the heat to medium-low and stir occasionally for 6-8 minutes until thickened.
Turn off the heat and stir in ⅔ of the caramelized shallots. Add more salt and pepper to taste.
Place in a serving bowl and top with the remaining shallots, gruyere, chopped sage, and thyme leaves. Add a pat of butter on top and enjoy!