Under Queen Anne, Raby became a brigadier of horse on 7 January 1703 and a major general on 1 January 1704. Diplomat From 1703 to 1704 and 1705 to 1711 he was Queen Anne's ambassador to Berlin. There he secured the services of Johann von Bodt and Thomas Eosander to design Wentworth Castle, at Stainborough in Yorkshire, built, largely directed by letter from a distance, from about 1710 to 1720. While serving abroad, on 1 January 1707, he was commissioned a lieutenant general. From March 1711 to 1714 he was British ambassador at The Hague. On 14 June 1711, he was sworn of the Privy Council, and on 29 June 1711 was created Viscount Wentworth of Wentworth-Woodhouse and of Stainborough and Earl of Strafford. From 1712 until 1714, Strafford was First Lord of the Admiralty, and in October 1712, was made a Knight of the Garter. After the death of Anne, he was one of the Lords Justices who represented George I until the new king arrived in Great Britain. Strafford was a representative of Great Britain at the Congress of Utrecht, and in 1715 was impeached for his share in concluding the resulting treaty, but the charges against him were not pressed to a conclusion Conspirator Strafford retired to Wentworth Castle. He was a leading conspirator in the Atterbury Plot of 1720–1722 to restore the Stuarts to the throne, and was also a party to the Cornbury Plot of 1731–1735. The Pretender appointed him one of his 'Lords Regent' in England and commander of the Jacobite forces north of the Humber. For his role in furthering the Jacobite cause, he was created "Duke of Strafford" in the Jacobite Peerage of England on 5 June 1722 by the Old Pretender. On the collapse of the Plot, the Government, while fully aware of his deep involvement, decided to take no action against him, and he lived out his last years in peace. He would occasionally still attend House of Lords debates, although he was a very bad public speaker. Marriage and issue On 6 September 1711, he married Anne Johnson, daughter and heiress of Sir Henry Johnson of Bradenham in Buckinghamshire and of Toddington in Bedfordshire, a Member of Parliament for Aldeburgh in Suffolk, by his first wife Anne Smithson, daughter and heiress of Hugh Smithson of Friston and Aldborough, 3rd son of Sir Hugh Smithson, 1st Baronet, of Stanwick, Yorkshire