I Dream of Jeannie - Season 5
Captain Tony Nelson is an astronaut. While on a mission, he discovered a mysterious bottle. Opening it, he released Jeannie (a Genie) who was so overjoyed at her release she promised to serve Captain Nelson. Nelson is unsure what to make of Jeannie, especially given that his work is highly secret and his superiors tend to keep a close eye on him.