Preheat a grill pan. Rub corn with oil and place on the grill pan, turning corn so all sides are charred, about 6 to 10 minutes. Meanwhile, mix together mayonnaise, chili powder, garlic salt, and black pepper.
Remove corn from grill and brush with the mayonnaise mixture.