Preheat your oven to 350°F (175°C). Grease a 9x13-inch baking dish with cooking spray or butter.
In a large mixing bowl, combine the thawed hashbrowns, sour cream, cream of chicken soup, melted butter, garlic powder, onion powder, salt, and pepper. Mix until well combined.
Stir in the shredded cheddar cheese, diced ham or bacon, and chopped green onions. Mix until evenly distributed.
Pour the mixture into the prepared baking dish and spread it out evenly.
Bake in the preheated oven for 45-50 minutes, or until the casserole is bubbly and the top is golden brown.
Remove from the oven and let it cool for about 10 minutes before serving.