Nomad

Nomad (or Nomad MK-15c) was an interstellar space probe designed by Jackson Roykirk and launched from Earth in 2002 with a mission of seeking out new life. It was a prototype, and the only one of its type built.

In flight, Nomad was damaged by a meteor and lost contact with Earth. It later merged with an alien probe called Tan Ru, resulting in a powerful new machine which, due to scrambled programming, destroyed anything that was perceived as imperfect.

Nomad was rediscovered by the USS Enterprise (NCC-1701) in 2267, after it had destroyed the inhabitants of the Malurian system. Mistaking Captain James T. Kirk for Jackson Roykirk, Nomad allowed itself to be brought aboard Enterprise. There, it erased the memory of Lieutenant Nyota Uhura, and killed Lt. Commander Montgomery Scott -- although Nomad was able to then "repair" him. Eventually, Kirk managed to convince Nomad it was imperfect itself, and thus leading it to self-destruct.