Contain before you do anything else
Ransomware spreads across a network in minutes, so isolation is the priority. Disconnect affected machines from the network by pulling the cable or disabling wireless, and isolate or shut down shared storage and backup systems the malware could reach. Do not power infected machines off if you can avoid it, because that can destroy evidence held in memory.
Isolate, do not wipe. Rebuilding a machine straight away feels productive, but it removes the evidence you need to understand how the attackers got in and whether they are still inside.
