 Alexander was, however, knighted by the lord lieutenant in 1777 for his long and active service, though (remaining "Dorset"'s captain until 1804 – a yacht captain had to leave that post if he wished to be promoted to a flag rank) he progressed no further than the top of the captains' list as the most senior serving captain of the Navy, though he spent many years in that position.Also during this time he wrote "A sea manual recommended to the young officers of the Royal Navy as a companion to the signal book" (1789), and had his second son, Alexander Wilmot, and his youngest son, Charles Marsh, serving under him on the "Dorset".On his death, he was buried in the churchyard at St Peter's, County Dublin.