Preheat your oven to 350°F (175°C).
In a large mixing bowl, combine the thawed hashbrowns, shredded chicken, cheddar cheese, sour cream, cream of chicken soup, diced onion, garlic powder, salt, and black pepper. Mix until well combined.
Transfer the mixture into a greased 9x13-inch baking dish, spreading it evenly.
If using, mix the crushed cornflakes with the melted butter and sprinkle evenly over the top of the casserole.
Bake in the preheated oven for 30-35 minutes, or until the casserole is bubbly and the top is golden brown.
Remove from the oven and let it cool for 5-10 minutes before serving.