Star Trek: The Original Series
The Doomsday Machine
S2 E6:
A machine that destroys planets threatens the Enterprise.
Starring
William Windom, Elizabeth Rogers, Bill Blackburn