This is what I use as a script. I have not had any issues with Catalina
but have not tested in about a month. #!/bin/sh sudo /usr/bin/defaults
write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd
LocationServicesEnabled -int 1 sudo ...