His own military genius blossomed during the Napoleonic Wars. During the 1805 Campaign, Yermolov served in the rear and advance guards and distinguished himself at Amstetten and Austerlitz. For his actions, he was promoted to colonel on 16 July 1806. The following year, he participated in the campaign in Poland, serving in Prince Bagration's advance guard. He distinguished himself commanding an artillery company in numerous rearguard actions during the retreat to Landsberg as well as in the Battle of Eylau. In June 1807, Yermolov commanded horse artillery company in the actions at Guttstadt, Deppen, Heilsberg and Friedland, being awarded the Order of St. George (3rd class, 7 September 1807). He was promoted to major general on 28 March 1808 and was appointed inspector of horse artillery companies. In early 1809, he inspected artillery companies of the Army of the Danube. Although his division took part in the 1809 campaign against Austria, Yermolov commanded the reserves in Volhynia and Podolsk gubernias, where he remained for the next two years. In 1811, he took command of the guard artillery company and in 1812, became the Chief of Staff of the 1st Western Army.