During his later career, Cole was commended for his service on operations in Surinam, and was praised in 1808 for his part in a successful diplomatic mission to Fath Ali Shah, the ruler of Persia, although the aftermath of the mission would lead to a breakdown in his relationship with Pellew, by this time the British commander in the Indian Ocean. In 1810, Cole was sent to the Dutch East Indies during a campaign to seize the Spice Islands and launched an attack on the well-fortified island of Banda Neira. Despite a disastrous start to the operation, Cole personally led a tiny force of men into the main fortress on the island and captured it, prompting a total surrender. This was followed in 1811 with an invasion of Java, which Cole planned and successfully executed. Highly praised and well rewarded for his service, Cole entered politics at the end of the war and twice sat as a member of parliament before his death in 1836.