Preheat oven to 350 degrees F. In a large bowl, combine soup and sour cream. Stir in frozen potatoes, ham, cheese, onion, and pepper. Transfer mixture to an ungreased 2-quart square baking dish. In a small bowl, combine cornflakes and melted butter. Sprinkle over potato mixture.
Bake, uncovered, for 50 to 55 minutes or until bubbly. Let stand for 10 minutes before serving. Makes 6 servings.