Grease a 9 by 13-inch pan. Layer the frozen potatoes in the pan. Sprinkle the ham, cheese, and onions over the potatoes. In a medium bowl (I use my blender), combine the eggs, milk, salt, and pepper. Pour the egg mixture over the potato mixture. Cover and refrigerate overnight.