Denham spent much time and money on the command of the 13th, showing himself a capable commander in the transition to the light cavalry role and in devising new exercises. He was promoted
brevet colonel on 20 November 1782, and in 1788 was appointed by
Sir William Augustus Pitt, the
commander-in-chief in Ireland, as President of a commission to improve the discipline and organisation of the cavalry in Ireland. His recommendations were favourably received, and officially adopted after review by
David Dundas. In March 1789, having commanded his regiment thirteen years, he requested to be made
colonel of an infantry regiment, hoping for the
20th or
71st. He made further requests for the
14th in October, the
41st in December, the
56th in January 1790 and the
74th in April 1791, all without success. He was finally appointed colonel of the
12th (The Prince of Wales's) Regiment of (Light) Dragoons on 9 November 1791. In 1793 the 12th were ordered to
Toulon and Denham was to have gone out as a
brigadier-general, but never sailed and was instead promoted to
major-general in October that year. In 1794 he was intended to command the cavalry to be sent to
Flanders under
Lord Cornwallis, but the expedition was cancelled. Instead he was appointed (at the suggestion of
Henry Dundas) to organise regiments of
fencible cavalry in Scotland, and he commanded them in summer camps in 1795, 1796 and 1797, though initially refusing the post owing to
rheumatism and
depression. In autumn 1797 he went back to Ireland as commander of the forces in
Munster, with local rank of
lieutenant-general. With the approval of the commander-in-chief,
Sir Ralph Abercromby, he ensured that military officers in his district would not act as
justices of the peace, and in March 1798 he organised the
yeomanry and
militia of Munster into night patrols, improving discipline for the volunteers and relieving the burden on the regular forces. He was made substantive lieutenant-general on 1 January 1798. Denham's "nervous complaint" meant that he relied increasingly on his subordinates. When the
Irish Rebellion of 1798 broke out, its suppression in Munster was largely the work of Major-General
Henry Johnson, who won the
Battle of New Ross, Brigadier-General
John Moore, who won the
Battle of Foulksmills and took Wexford, and the new commander-in-chief
Gerard Lake. ==Retirement and death==