To disable/enable the Gatekeeper run the following respectively:sudo spctl --master-disable
sudo spctl --master-enable
Check the status of Gatekeeper:spctl --status
To add/remove an application to the approved application list:spctl --add /Path/To/Application.app
spctl --remove /Path/To/Application.app