To bypass Gatekeeper and open an app when “App cannot be opened. You should move it to trash.” comes up, simply open Terminal (Applications > Utilities > Terminal) and run the following command:

sudo xattr -r -d /Applications/name of

You’ll need to replace name of¬†with the name of the application you’re trying to open.

You can find this out by going to the Applications folder and finding the first few letters of the app name, you can then auto-complete the name in Terminal by pressing the tab key (above Capslock) in Terminal after typing the first few letters of the name of your app.

Example: Type the following, and then press tab:

sudo xattr -r -d /Applications/Microsoft Wor

macOS will autocomplete it to:

sudo xattr -r -d /Applications/Microsoft