Peel the potatoes and cut into thin slices. Peel and finely dice the garlic.
Bring the potato slices to the boil in the milk. Add the garlic, thyme, salt and pepper and simmer for about 10 minutes. Stir very often, otherwise the milk will burn. Grease a baking dish and add the potato-milk mixture. Pour the cream over it and sprinkle with cheese.
Bake in a preheated oven at 175 ° C for about 40-45 minutes.