Preheat the oven to 400
Add the diced potatoes to a medium sized bowl and season them with salt, pepper and garlic powder. Toss everything together until the potatoes are evenly seasoned.
Add the potatoes to a casserole dish that’s been sprayed with cooking spray and spread them out evenly and top with the ham.
In a sauce pan, melted the butter and sauté the onion over medium high heat for about 3 minutes or until it is soft.
Whisk in the flour for another 2. minutes.
Slowly pour in the milk and season it with salt, pepper and garlic powder.
Whisk until the sauce starts to thicken up and stir in some of shredded cheese until it melts.
Pour the cheese sauce evenly on top of the potatoes and ham and sprinkle the top with the rest of the shredded cheese.
Cover the baking dish with foil and place it into the oven for 45 minutes.
Remove the foil and let it cook for an additional 10 minutes.
Now, let it cool for about 10 minutes before serving. Garnish with parsley, if desired, serve warm and enjoy!