He became "överstelöjtnant" at the Admiralty on 25 February 1793. Cederström became a member of the Committee of the Navy's Equipment on 22 April 1794 and "överste" at the Admiralty on 21 June 1795. In 1796 and in 1798 he was cruising with a frigate squadron in the North Sea to protect the Nordic trade against the privateers. He was appointed commanding officer of the High Seas Navy ("Örlogsflottan") on 6 April 1801 and was three days later promoted to rear admiral. Cederström was sent with a squadron to the Mediterranean to punish Tripolitanian pirates during the First Barbary War. After 20 months he made peace with Tripoli. In 1808 he took command of a squadron, which had the task of protecting the Swedish coast against a feared French-Danish landing. Also in 1808, Russia occupied the island of Gotland and a Swedish relief expedition under the command of Cederström was dispatched from Karlskrona to expel the Russian forces from the island, which was executed within three days. The Russian occupation accelerated, however, the establishment of the Gotland National Conscription and Cederström was commissioned as vice governor of the island to implement this arming of the people and to set the island in a state of defense.