Cleansing the Land

 is a main quest in the Fallout 4 add-on Far Harbor.

Synopsis
Recovering the nuclear launch key is instrumental to DiMA's plans for Far Harbor, as it will allow implementing a... Final solution for the Children of Atom and Far Harbor, if need be.

Securing the nuclear launch key

 * 1) After recovering DiMA's memories, travel to the Harbor Grand Hotel and enter it.
 * 2) Locate the nuclear key. It's in the room accessible through the hole in the kitchen pantry, right opposite the exit.
 * 3) Use the keypad to open the safe room.
 * 4) Use the terminal and retrieve the Safe Room Security Tape. Listen to it.
 * 5) Travel to the motorboat just west of Fringe Cove Docks and recover the key.

Securing the kill switch code

 * 1) Travel to Rayburn Point.
 * 2) Swim to DiMA's cache in the northwest.
 * 3) Uncover the mound of dirt and recover the wind turbine code.
 * 4) Note: If you are in combat (say, with anglers on another island), you won't be able to interact with the mound.

Deciding

 * 1) Confront DiMA about the sinister plans. You can also talk to Avery and Tektus. Avery can be extorted for 1000 caps with a persuasion check, and then another 1000 caps if you mention that you're still deciding what to do with Far Harbor.

Far Harbor

 * 1) Now you can travel to the wind farm maintenance bunker and shut down the turbines to doom Far Harbor, thus fulfilling Tektus' objectives and protecting Acadia from extremists.
 * 2) Shutting down the condensers will cause Far Harbor to suffer an invasion of fog crawlers. The inhabitants inevitably lose the fight and whatever survivors are permanently hostile to you.
 * 3) Understandably, Old Longfellow will leave your service and turn permanently hostile as well.
 * 4) Return to Tektus and claim your reward.

Nucleus

 * 1) Or you can travel to The Nucleus and convince Tektus to launch the nuclear missiles on the USS Democracy and turn the base into a smoldering crater, saving Far Harbor.
 * 2) To convince Tektus, you need to have the key, know of its significance, and completed enough quests in What Atom Requires (at minimum, Tektus' own quest) to have enough pull with the High Confessor. Then it's a case of passing a persuasion check (very difficult if you want to point out that it's to prove dedication or that it's Atom's plan, merely moderate, if you present yourself as Atom's messenger).
 * 3) Use the nuclear key on the console next to Tektus' quarters.
 * 4) Run. You have 30 seconds to clear the hangar, after which the Democracy launches its payload.
 * 5) Mission accomplished.