Heat the oven to 350°F and butter a 9-by-13-inch baking dish with 1 teaspoon of the melted butter.
Stir the soup, sour cream, cheddar, onion, salt, pepper and 4 tablespoons melted butter together in a large bowl.
Fold in the thawed potatoes until every cube is coated, then spread the mixture in the dish.
Toss the cornflakes with the remaining melted butter and scatter them evenly over the potatoes.
Bake uncovered for 45 to 50 minutes, until the center bubbles and the topping is crisp and browned.
Rest for 10 minutes before serving so the potato mixture sets.