Preheat your oven to 375 degrees. Mix hash browns, sour cream, soup, onion, cheese and melted butter in a bowl. Add ham or sausage (optional).
Season with salt and pepper to taste. Transfer your mixture into a 9×13-inch baking dish and sprinkle the top with corn flake crumbs. Bake in the oven until the casserole bubbles (about one hour).