In 1808 Yashvil was promoted to major general. During Napoleon's invasion of Russia in 1812, he first commanded the 4th artillery brigade under field marshal Wittgenstein and for his conducts at the battle of Klyastitsy and Battle of Chashniki he received the rank of lieutenant-general. Following the French retreat from Russia, Yashvil was appointed commander of the Russian artillery in 1813. For his participation in the Prussian and Saxony campaigns, he received several more decorations, including the second highest Prussian award, the Order of the Red Eagle.