With the 27th Battalion, Dunstan saw combat against the Japanese during the Bougainville Campaign in 1945, and received a Mention in Despatches for his actions while commanding a platoon. After the war, he served as a staff officer in the British Commonwealth Occupation Force in Japan following the war, transferring to the newly established Australian Regular Army in 1947. Upon returning to Australia in 1948, Dunstan married Beryl Dunningham and was posted to Keswick Barracks in Adelaide, South Australia, where he served on the staff of the 4th Military District.