Preheat oven to 375° degrees Fahrenheit. Spray and a 9x13 inch baking dish (or two smaller ones) with pan spray or rub the sides with butter.
Heat a small sauté pan over medium heat and add in the butter (or oil). When it's hot, add in the onions and sauté for 5-7 minutes, or until the onions are soft. Add in the garlic and 3 sliced scallions and cook for another 1-2 minutes, stirring often. Remove from heat.
Add the hash browns to a large bowl and top with the cooked onion mixture, ham, condensed soup, 2 cups of cheese, and the sauce. Season with salt and pepper to taste. Stir together with a large spoon to combine and spread out into the baking dish(es).
Top the mixture with the 1 cup of shredded cheese and bake for about 45 minutes or until bubbling hot and lightly browned on top. If it starts to get too browned on top before 45 minutes, cover lightly with foil.
Sprinkle with the 2 sliced scallions and let sit for a few minutes to cool before serving.