In 1716 he was released from Danish captivity against the castle, became Lieutenant General of the infantry, and participated in the 1718 Norwegian campaign, during which he was given command of the so-called Warmland Corps.