Preheat oven to 350 degrees Fahrenheit.
Grease an 8 x 11-inch baking dish (or 9x9 inch works just fine). Set aside.
In a large nonstick skillet, add 2 tablespoons of butter and saute onion until softened.
Slowly add in the gluten-free flour and whisk until you have a roux. Gradually add broth, and milk. Whisk until all combined and thickened.
Stir in garlic powder, salt and black pepper to taste.
Follow with ½ cup of cheddar cheese and stir until cheese is incorporated and melted. Remove from heat.
In a medium bowl combine the potatoes, ham, and pour in the sauce. Transfer to casserole dish.
Cover with aluminum foil and bake for 60-65 minutes.
Toward the end of baking, prepare the cornflakes. In a small bowl, combine roughly crushed Corn Flakes with 2 tablespoons of melted butter. Set aside.
Remove foil, sprinkle with remaining ½ cup of grated cheese, and top with the buttered Corn Flakes.
Return to the oven uncovered and bake for another 10-15 more minutes.
Let the casserole rest for about 10 minutes before serving (the sauce will thicken as it cools). Garnish with fresh parsley just before serving.