Preheat the oven to 350 and grease a muffin tin with cooking spray. In the bottom of a large mixing bowl, whisk together the oil, egg, garlic powder, thyme, salt, pepper, and Parmesan cheese. Add the potatoes and gently toss to combine. Using your hands, grab a stack of potatoes, enough to fill to the top of each muffin cavity (you may have to trim the potato ribbons as you go). Fill each muffin cavity with the potato stacks. Cover the muffin tin with foil, and bake until tender, 30-40 minutes. Uncover the muffin tin and sprinkle over the gruyere cheese. Bake, uncovered, until cheese melts and the stacks start to brown, 15-20 minutes. Remove from the oven and let cook for 5-10 minutes before serving. To serve, using a spoon or fork to bring the gratins out of the muffin cavities. Transfer to a serving platter or serve alongside your dinner, on a plate.