Preheat oven to 375 degrees.
Rub a 2 quart baking dish with cut clove of garlic and rub it with butter. In a mixing bowl combine the cooked onions with ham, cheese, eggs and cream.
A handful at a time, squeeze out the water from the potatoes and stir the potatoes into the eggs. Season with salt and pepper.
Transfer mixture to prepared baking pan. Dot with butter and bake for 40 or 45 minutes or until top is nicely browned.
Serve hot or warm with a green been salad.