He took service in King James's exile army. In 1692 he served as lieutenant general under Marshal Bellefonds in the forces that assembled at Saint-Vaast-la-Hougue and should have been carried over the Channel by the French Fleet to land on the Isle of Portland and march on London from there. However, that fleet was intercepted by the English and Dutch and was defeated in several actions at Barfleur and La Hougue between the 19 and 24 May 1692, after which the invasion had to be cancelled. In 1696 he became James's master of the robes in addition to lieutenant-general. He lost his employment as soldier when King James's force was dissolved after the Treaty of Ryswick in 1697, in which France recognised William III as the rightful King of England. James II died in 1701 at the Château de Saint-Germain-en-Laye and was succeeded by his son James Francis Edward Stuart, called James III or the Old Pretender. Louis XIV recognised him as James III of England.