Preheat the grill or oven to 400 degrees. Meanwhile, in a mixing bowl, beat the eggs and stir in the potatoes, cheese, ham, milk, salt, black pepper and cayenne.
Divide the mixture among 4 pieces of 18-by-12-inch heavy-duty aluminum foil that has been coated with cooking spray. Fold tightly around the mixture and seal. Place on the grill or in the oven and cook for 10 minutes. Allow to rest for 5 minutes before carefully opening and serving.
Recipe by The Tennessee Magazine at https://www.tnmagazine.org/foiled-plans/