Add the sweet potatoes to a baking tray or a large casserole dish.
Drizzle olive oil over the sweet potatoes. Toss to coat veggies. Sprinkle the spices over the sweet potatoes. Toss to coat.
Sprinkle the rosemary, garlic powder, onion powder, salt, and pepper over the sweet potatoes. Toss to coat.
Place the tray in the oven and bake at 450 degrees for 15 minutes. Turn the sweet potatoes over, then roast for another 15 minutes or until the sweet potato pieces are fork-tender.