Bring a large pot of salted water to a boil. Add potatoes and cook until tender, about 20 minutes. Drain and mash with 1/4 cup of the butter and milk.
Preheat oven to 350 degrees F (175 degrees C).
Combine mashed potatoes, ham, garlic, mushroom soup, butter, egg and parsley in a mixing bowl. Transfer mixture to greased casserole dish and bake for 20 minutes. Sprinkle with cheddar cheese and bake an additional 15 minutes or until cheese is melted.