Hello, HAL.
There was a Star Trek Voyager episode where a alien missile which had crashed on a planet was repaired by the crew. What they did not know was it was a bomb set to destroy a planet.
The AI had to be convinced that there was a recall as the war was over and that was why it and another missile were sent to on an empty planet to explode. Voyager discovered there were dozens more en-route that refused the recall and the crew convinced the AI to help destroy all of them which it did.
Terminator AI became sentient and tried to wipe out man.