Star Trek: Voyager, season 5, episode 25
Warhead
Summary
The crew rescues a device with artificial intelligence embedded in rock, that then proceeds to take control of The Doctor and reveals itself to be a weapon of mass destruction.
Summary from Wikipedia, CC BY-SA 4.0.
Find out more
These links open the services in a new tab with the question pre-filled; the AI assistants may ask you to sign in. Their answers can contain errors.