On June 9, 1862, the 20th New York was transferred to the VI Corps of the Army of the Potomac in preparation for the Peninsula Campaign. The regiment did not engage in pitched battle until the Battle of White Oak Swamp, in which a Confederate artillery bombardment surprised the 20th New York as they were encamped. A significant number of the enlisted men and officers were routed, including the regiment's new commander, Colonel Francis Weiss. As one eyewitness and future Medal of Honor winner in the 7th Maine Infantry remembered, the soldiers of the 20th New York "wore high, conical, black hats, and when they broke and ran the plain was dotted far and wide with their hats and knapsacks. It is a tradition in our regiment that they are running still, and their colonel, who, days before, was talking about the blood he was going to shed, and who certainly led the wild flight several lengths, may not have stopped, for he was never heard from afterwards." Other officers at the brigade and divisional levels, however, reported that much of the regiment, though startled and disorganized, regrouped in the shelter of nearby woods to await the end of the bombardment. In the days following the debacle at White Oak Swamp, nine officers were forced to resign their commissions, and Colonel Ernst von Vegesack was appointed to command the unit. Weiss had been unpopular with his men, whom he considered "socialistic."