Below are a list of System Preference pane anchors that can be used with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.
To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard:
tell application "System Preferences"
set CurrentPane to the id of the current pane
set the clipboard to CurrentPane
end tellTo open one of these with a terminal command use the following syntax (replace <PaneID> with the desired pane ID):
open "x-apple.systempreferences:<PaneID>"Main com.apple.preference.speech
Main com.apple.preference.notifications
Main com.apple.preference.universalaccess
Display com.apple.preference.universalaccess?Seeing_Display
Zoom com.apple.preference.universalaccess?Seeing_Zoom
VoiceOver com.apple.preference.universalaccess?Seeing_VoiceOver
Descriptions com.apple.preference.universalaccess?Media_Descriptions
Captions com.apple.preference.universalaccess?Captioning
Audio com.apple.preference.universalaccess?Hearing
Keyboard com.apple.preference.universalaccess?Keyboard
Mouse & Trackpad com.apple.preference.universalaccess?Mouse
Switch Control com.apple.preference.universalaccess?Switch
Dictation com.apple.preference.universalaccess?SpeakableItems
Main com.apple.preference.screentime
Tip: The "Advanced" anchor essentially just triggers a panel unlock wherever the user may be at in the Security and Privacy pane. So, if you want them to enable a Privacy setting, open the desired Privacy anchor first (e.g. ?Privacy_Contacts) and then open the Advanced anchor (?Advanced) to prompt the user password to unlock the preference pane.
Main Preference com.apple.preference.security
General com.apple.preference.security?General
Advanced com.apple.preference.security?Advanced
FileVault com.apple.preference.security?FDE
Firewall com.apple.preference.security?Firewall
Privacy Main com.apple.preference.security?Privacy
Location Services com.apple.preference.security?Privacy_LocationServices
Contacts com.apple.preference.security?Privacy_Contacts
Calendars com.apple.preference.security?Privacy_Calendars
Reminders com.apple.preference.security?Privacy_Reminders
Photos com.apple.preference.security?Privacy_Photos
Camera com.apple.preference.security?Privacy_Camera
Microphone com.apple.preference.security?Privacy_Microphone
Speech Recognition com.apple.preference.security?Privacy_SpeechRecognition
Accessibility com.apple.preference.security?Privacy_Accessibility
Input Monitoring Not Available
Full Disk Access com.apple.preference.security?Privacy_AllFiles
Files and Folders Not Available
Screen Recording Not Available
Automation com.apple.preference.security?Privacy_Automation
Analytics and Improvements com.apple.preference.security?Privacy_Diagnostics
Advertising com.apple.preference.security?Privacy_Advertising
Dictation com.apple.preference.speech?Dictation
Text to Speech com.apple.preference.speech?TTS
Main com.apple.preferences.sharing
Screen Sharing com.apple.preferences.sharing?Services_ScreenSharing
File Sharing com.apple.preferences.sharing?Services_PersonalFileSharing
Printer Sharing com.apple.preferences.sharing?Services_PrinterSharing
Remote Login com.apple.preferences.sharing?Services_RemoteLogin
Remote Management com.apple.preferences.sharing?Services_ARDService
Remote Apple Events com.apple.preferences.sharing?Services_RemoteAppleEvent
Internet Sharing com.apple.preferences.sharing?Internet
Bluetooth Sharing com.apple.preferences.sharing?Services_BluetoothSharing