In Thy Image
"In Thy Image" was a  script for the pilot Star Trek: Phase II episode, written by Harold Livingston. It was based on a story treatment by Alan Dean Foster, although the treatment itself was based on a story idea by Gene Roddenberry entitled "Robot's Return". ()

Synopsis

The basic plot concept of "In Thy Image" was that a huge unknown object crossed the universe, looking for its creator on Earth. In the meantime, the  has been extensively refitted and is waiting re-launch under the command of Captain Wah Chan, with James T. Kirk awaiting promotion to admiral. However, the alien spaceship destroys three Klingon battleships, and is found to be on a direct course for Earth. With the Enterprise being the only starship that might be able to destroy the alien ship (if it were required) and Wah Chan stuck on the other side of the Federation, Kirk is given command of the ship for what he assumes will be one final mission. He finds some familiar faces on board, namely Scotty, Sulu, Chekov, and Uhura, and three new ones in the shape of Willard Decker, Ilia and the new science officer, Ronak. However, Ronak dies when the transporter malfunctions as he is being beamed aboard the ship, requiring his late replacement by Xon, a Vulcan who is incredibly gifted academically, but has little experience of active duty.

Shortly after the Enterprise deploys, the USS Aswan, which has been monitoring the alien ship, is suddenly destroyed without provocation, increasing the urgency of the mission. Soon, the Enterprise confronts the alien ship and it invades the Enterprise with many small robots, designed to learn about the ship and its inhabitants.  One probe, a small pearl-like device, is clearly intrigued by humans.  Chekov names it "Tasha" after a pearl his aunt Tasha wore.  It begins to communicate and examines the humans, but also gets the Enterprise library computer to begin talking to the alien ship directly.  After Xon smashes the computer to stop the communication, Tasha disappears, taking Ilia with it. 

Soon after, Tasha returns as a lifelike android of Ilia, so that the alien ship may even better understand humanoid life. Tasha reveals its master to be named "Ve-jur" and that it is on its way to Earth to complete its mission.  Kirk, accompanied by Xon, Decker, the robot Ilia, and Tasha, manages to infiltrate the core of the ship, where it is revealed that Ve-jur is in fact Voyager 18; the final space probe launched by Earth before World War III.  

Upon arriving at the planet, Ve-jur emits an energy field that burns out all of the planetary defense systems, and prepares to eradicate all life on the planet with neutron bombs so that it can free its creator from the humans it believes is repressing it.  

Kirk tells the probe that humans are, in fact, its creator.  And he'll prove it by beaming Tasha down to Earth to experience humanity first hand, then going to Starfleet's archives to show actual proof of the Voyager Program and NASA.  On Earth, he has her meet a child, walks her along a beach and introduces her to flowers.  Her curiosity is shattered, though, when Tasha interprets a boat being piloted by humans as "enslaving" machine life.  Kirk decides to take her to the Starfleet Archives.

Tasha is shown documentaries on the creation of the Voyager probes.  However, Tasha and Ve-jur reject the proof since they are all recreations of events that happened hundreds of years ago.  Finding a film reel from the 20th Century about the Voyager program, he attempts to show the film to her, but the film disintegrates as it is shown.  Kirk attempts to reason with her, and Tasha begins to become emotional knowing the destruction of all she sees is at hand. 

The neutron bombs disappear.  Tasha has told Ve-jur that she has seen undeniable proof of its creation to keep it from destroying the life she's seen in the last few minutes.  Ve-jur accepts her word, and Decker, aboard the Enterprise, suggests a mutual partnership where they can learn from each other.  Ve-jur says it can learn nothing from lower life forms and heads out of the Solar System.  With that, Kirk, Xon, and Decker are beamed back onto the Enterprise, as is the real Ilia. The robotic Tasha appears as well, but inert and dead.  Kirk implies that her returning to the ship, instead of to Ve-jur, is what she wanted.  The Enterprise is contacted by Starfleet and told that the recent adventure will be considered the Enterprise's shakedown cruise. Kirk orders Scotty to leave orbit on their new five year mission.

Another story element featured was the Enterprise being reconstructed and relaunched, which had been included in earlier premises for unproduced Star Trek films such as Planet of the Titans and The God Thing, the latter of which served as a precursor to this one, with multiple similarities between them (despite technically being different projects). "In Thy Image" was rewritten to become the screenplay for .

Differences from the film
 V'ger (or "Ve-jur" as it is spelled in the script) does not digitize and absorb the Klingon vessels, instead it simply destroys them. Gene Roddenberry's ization of  contains a third variation on "the Intruder's" name, spelling it "Vejur" from page 179 onwards in the novel's first paperback edition.
 Admiral Nogura is actually seen in the episode, in discussion with Kirk at the start of the script.
 The Enterprise is mentioned as being the only Starfleet vessel in range in The Motion Picture, whereas "In Thy Image" has many more Starfleet vessels in the area (including the ill-fated Aswan), with the Enterprise being deployed instead as Starfleet's most powerful vessel.
 While Kirk forces Starfleet to give him command of the Enterprise in the film, and his obsession with the ship marks a major plot point in the film, the episode has him much more accepting of Wah Chan's imminent assuming of the vessel's command. Kirk in fact suggests several other candidates to command the Enterprise after it becomes clear that Wah Chan cannot make it to Earth in time for the launch, and only puts himself forward after exhausting the other candidates.
 Decker is executive officer from the start, and aside from a brief moment after Ilia's kidnapping, is never antagonistic towards Kirk.
 Commander Ronak is virtually the same as Sonak from the film, and his manner of death is very similar (albeit considerably less gruesome). Stangely, Ronak is never mentioned again after his death and the crew does not seem affected by his loss, whereas in the film Sonak's death visibly affects Kirk for some time afterward.
 The USS Aswan largely replaces Epsilon IX in the storyline and meets the same fate, although the script implied that it would not be shown on-screen.
 The character of Tasha is completely unique to the episode, and has no analogue in the film.
 Ilia is held in suspended animation in order to provide a physical and mental basis for the android, but is not absorbed as she is in the film, and is returned unharmed at the end of the episode.
 V'ger/Ve-jur's true identity is given as Voyager VI in the film, and Voyager 18 in the episode. 
 While the version of V'ger in the film did not recognize humanoids (or "carbon units" as it called them) as true lifeforms, the episode's version was aware that humanity was a distinct species, and had knowledge which suggested they were the creators; it simply didn't believe the data to be true.
 V'ger/Ve-jur does not evolve into a new lifeform at the end of the episode, and as a result Decker and Ilia are returned to the Enterprise intact.
Undeveloped episodes