Start this Cheesy Scalloped Potatoes and Ham recipe by preheating your oven to 425 degrees, lightly butter a 9x13 casserole dish and set aside.
In a large skillet, melt butter over medium high heat and then add in your sliced onions. Saute for 4-5 minutes before adding in the minced garlic. Stir and cook for another minutes, making sure not to let your garlic burn. Add in the flour and whisk to combine while cooking for another 1-2 minutes to get rid of the raw flour flavor. Next, pour in your chicken stock, milk and heavy cream and continue to whisk to combine while breaking up any flour clumps. Add in the spices and fresh thyme and bring the mixture to a low boil while continuing to whisk as to not let the flour settle and burn.
Once you reach a low boil, add in your sharp cheddar, gruyere (or swiss) cheese and Parmesan cheese and your ham chunks and stir to combine. Remove from the heat to let your cheese gently melt. While your cheese is melting, thinly slice your potatoes with either a sharp knife or a mandolin slicer. Try to slice your potatoes about 1/8 of an inch thin (super thin!) and as uniformly as possible.
Once your cheese has melted, start by placing half of your potato slices in an even layer in your casserole dish. Fork out about half of the sliced onions out of your sauce and arrange on top of the potatoes before pouring half of the ham / cheese sauce on top of your potato layer. Then layer on the other half of the potatoes, arrage more of the sliced onions from your sauce and then pour the remaining ham / cheese sauce on top, making sure to cover your potatoes completely.
Cover you Cheesy Scalloped Potatoes and Ham dish with foil and bake for 40 minutes before removing the foil, adding more cheese and chives on top and baking uncovered for another 40 minutes. Remove from the oven and let sit for 10-15 minutes before serving.