Star Trek Expanded Universe

Hogwarts School, as seen from the school's "Quidditch" stadium.

Hogwarts School of Witchcraft and Wizardry is the primary educational institution on planet Gamma Germanicus VII, in the Gamma Quadrant. It has a curriculum based on magical arts, such as alchemy, levitation and the brewing of potions. (Harry Potter and the Return of James T. Kirk)

On stardate 57083.4, the Federation starship USS Titan detected traces of Federation technology near the castle which housed Hogwarts School. These traces turned out to be the saucer section of the USS Enterprise-A.

After Gamma Germanicus VII was admitted into the Federation on stardate 57988.4, the planet took "Hogwarts" as its official name.