Preheat oven to 350.
Grease a 9x13 casserole dish.
Place the hash browns in the bottom of the casserole dish.
Sprinkle the ham over the hash browns, then sprinkle the cheese.
Mix the eggs, milk, garlic powder, onion powder, and onion in a bowl. Whisk to combine.
Pour the egg mixture over the top.
Bake for 40-45 minutes or until cooked through.