Here are some preventive/precautionary measures:
Maintain updated Antivirus software on all systems.
Keep the operating system third party applications (MS office, browsers, browser Plugins) up-to-date with the latest patches.
Perform regular backups of all critical information to limit the impact of data or system loss and to help expedite the recovery process. Ideally, this data should be kept on a separate device, and backups should be stored offline.
Don't open attachments in unsolicited e-mails claiming to be from FedEx or similar organization (Most important), even if they come from people in your contact list, and never click on a URL contained in an unsolicited e-mail, even if the link seems benign. In cases of genuine URLs close out the e-mail and go to the organization's website directly through browser.
Individuals or organizations are not encouraged to pay the ransom, as this does not guarantee files will be released. Report such instances of fraud to CERT-In and Law Enforcement agencies.
https://www.cnet.com/news/wannacry-ransomware-patched-updated-virus-kill-switch/
http://money.cnn.com/2017/05/13/technology/ransomware-attack-protect-yourself/