In 2273, a Starfleet monitoring station, Epsilon Nine, detects an alien force, hidden in a massive cloud of energy, moving through space towards Earth. The cloud destroys three of the Klingon Empire's new K't'inga-class warships and the monitoring station en route. On Earth, the starship Enterprise is undergoing a major refit; her former commanding officer, James T. Kirk, has been promoted to Admiral and works in San Francisco as Chief of Starfleet Operations. Starfleet dispatches Enterprise to investigate the cloud entity as the ship is the only one in intercept range, requiring her new systems to be tested in transit.
Kirk takes command of the ship citing his experience, angering Captain Willard Decker, who had been overseeing the refit as its new commanding officer. Testing of Enterprise's new systems goes poorly; two officers, including the science officer, are killed by a malfunctioning transporter, and improperly calibrated engines almost destroy the ship. Kirk's unfamiliarity with the new systems of the Enterprise increases the tension between him and first officer Decker. Commander Spock arrives as a replacement science officer, explaining that while on his home world undergoing a ritual to purge all emotion, he felt a consciousness that he believes emanates from the cloud.
Enterprise intercepts the energy cloud and is attacked by an alien vessel within. A probe appears on the bridge, attacks Spock and abducts the navigator, Ilia. She is replaced by a robotic replica, another probe sent by "V'Ger" to study the crew. Decker is distraught over the loss of Ilia, with whom he had a romantic history. He becomes troubled as he attempts to extract information from the doppelg채nger, which has Ilia's memories and feelings buried within. Spock takes a spacewalk to the alien vessel's interior and attempts a telepathic mind meld with it. In doing so, he learns that the vessel is V'Ger itself, a living machine.
At the center of the massive ship, V'Ger is revealed to be Voyager 6, a 20th-century Earth space probe believed lost. The damaged probe was found by an alien race of living machines that interpreted its programming as instructions to learn all that can be learned, and return that information to its creator. The machines upgraded the probe to fulfill its mission, and on its journey the probe gathered so much knowledge that it achieved consciousness. Spock realizes that V'Ger lacks the ability to give itself a focus other than its original mission; having learned what it could on its journey home, it finds its existence empty and without purpose. Before transmitting all its information, V'Ger insists that the Creator come in person to finish the sequence. Realizing that the machine wants to merge with its creator, Decker offers himself to V'Ger; he merges with the Ilia probe and V'Ger, creating a new form of life that disappears into another dimension. With Earth saved, Kirk directs Enterprise out to space for future missions.

Question: Who was promoted as Admiral at the beginning of the story?
Answer: James T. Kirk
Alternative answer: James T. Kirk