Extension Attribute to get AirPlay Receiver status and script/command to disable it

karthikeyan_mac
Valued Contributor

I am looking for way to get the status of AirPlay Receiver and also command/script to disable it. I do not want to disable  through config profiles. Thanks.

3 REPLIES 3

ljcacioppo
Contributor III

Personally, I use a config profile, but I believe this setting is in a ByHost Preference so you should be able to check like this:

defaults -currentHost read com.apple.controlcenter AirplayRecieverEnabled


And disable like this:

defaults -currentHost write com.apple.controlcenter AirplayRecieverEnabled -bool false



Note: Yes, the word "Receiver" is purposefully misspelled in the script because the key is misspelled

wintermute
New Contributor

Hello @ljcacioppo ! Where is this key stored exactly?

Its stored in ~/Library/Preferences/ByHost/com.apple.controlcenter/{UDID}.plist