During the final battle, Harry gets thrown into a new universe, landing on the bridge of the USS Enterprise-D. This should take place in about "season 4" of ST:TNG, but I'm not going to be strict about the timeline, using things and events as needed.
Deanna Troi and Data find themselves obliviated and serving as Hogwarts new professors of Divination and Defense Against the Dark Arts. Unaware of their old lives, they try to make do, gradually discovering who they are and their old strengths.
Harry has been reborn time and time again after becoming the Master of Death, living through hundreds of lifetimes in dozens of universes, but this rebirth is strange even by his standards—no doubt thanks to how he had died the last time. StarTrek:TNG/HarryPotter Powerful!Harry MoD!Harry, Guinan, Q, Borg, Lwaxana. COMPLETE
Exiled for three centuries on a barren rock, Harry's saved by the crew of the Enterprise D. He makes it to the colony world his people planned to go to and finds they're just as insular as ever though Hermione and his friends set them on a better course. Their nuclear option, though, left Harry with no escape. A prophecy is once again in play and he's the Chosen One. Again.