Hardy was created a
baronet on 29 January 1806 and was given command of the third-rate on the
North American Station in May 1806. While in
Nova Scotia, he married Anna Louisa Berkeley, the daughter of his commander-in-chief Admiral
Sir George Cranfield Berkeley. When Berkeley was ordered to Lisbon, Hardy went with him as his flag Captain in the second-rate . Hardy was made a commodore in the Portuguese Navy in 1811, in which he served as a mercenary from 1809 to 1830. In August 1812, Hardy was given command of the third-rate and was sent back to North America at the outbreak of the
War of 1812. The American defending force of 70 regulars and 250 militiamen gave up without a fight. Hardy and Pilkington issued a proclamation making it clear Great Britain considered Eastport and the several nearby islands to be British territory. Townspeople were required to take an oath of allegiance to the crown or leave. Two-thirds of the inhabitants took the oath, while 500 departed. For the few weeks he remained at the place, Hardy became a favourite of the locals, gaining great respect and popularity. However, Hardy's next venture, the 9–11 August bombardment of
Stonington, Connecticut was a defeat; Royal Navy cannonading set 20 buildings on fire while killing a horse and a goose, while reports indicate the sizeable American defending force killed 21 and wounded 50 British attackers. Hardy was appointed a
Knight Commander of the Order of the Bath on 2 January 1815. Hardy was given command of the royal yacht
HMS Princess Augusta in July 1816 and, then having been promoted to
commodore, became Commander-in-Chief on the
South America Station, hoisting his
broad pennant in third-rate in August 1819, with a mission to prevent the Spanish from interfering in the newly emerging republics of Mexico, Colombia and Argentina. While in Brazil, Hardy saw
the country's independence and the withdrawal of Portuguese troops, until he was replaced by
Sir George Eyre. ==Flag rank==