Following his graduation from VMI, Marshall served as Commandant of Students at the Danville Military Institute in Danville, Virginia. He took a competitive examination for a commission in the United States Army, which had greatly expanded to deal with the war with Spain and the occupation of the Philippines. Marshall passed, and used endorsements his father obtained from both of Pennsylvania's U.S. Senators to bolster his application. He was commissioned a second lieutenant of infantry in February 1902. In a matter of days he married, resigned the Danville job, and shipped out to the Philippines.