In 1817 he was part of a commission tasked with the demarcation of the French border in the east. The following year he was appointed a member of the commission for the defense of the realm and in 1822 director of the army depot. In 1823 he served as chief of staff to the nominal commander in chief, the Duke of Angoulême and in that capacity served as the actual leader of the Spanish intervention.