Having reached the rank of colonel, in early 1968 he was deployed to Vietnam as deputy commander of the 1st Australian Task Force (1 ATF). He took over from Brigadier Ron Hughes as Commander of the 1 ATF on 21 May 1968 during the Battle of Coral–Balmoral. For his services during this battle, he was appointed a Commander of the Order of the British Empire in 1969. That year he returned to Australia and on promotion to brigadier took over the 10th Task Force, which was based in New South Wales. He attended the Imperial Defence College in London in 1970 and afterwards he was promoted to major general and appointed Commander of Australian Forces in Vietnam. He remained in the country throughout 1971 and 1972 and oversaw the withdrawal of Australian forces, for which he was appointed a Companion of the Order of the Bath, an Officer of the National Order of Vietnam and awarded the Vietnamese Cross of Gallantry with Palm. His next appointments were Chief of Materiel in Army Headquarters (1972–74) and General Officer Commanding Field Forces (1974–77). In 1977, having been raised to the rank of lieutenant general, he became Chief of the General Staff (CGS), being extended in that capacity twice before retiring from the Army in 1982. During his time as CGS, Dunstan reorganised the Army around the concept of specialised brigades and worked to improve the readiness of Army units to meet rapidly developing threats. This work later proved pivotal in ensuring the success of the Australian intervention in East Timor in 1999. His service as service chief was recognised by his appointment as a Knight Commander of the Order of the British Empire in 1980. Following his retirement from the Army, Dunstan returned to South Australia, assuming the appointment of Governor of South Australia in April 1982. The longest holder of that appointment, he retired from the role in February 1991. For his work, he was made a Companion of the Order of Australia that same year. He died in Adelaide on 15 October 2011, and was given a state funeral.