This can be done. Here are the steps. So you know, I just did these steps as an experiment to see if it would work and it did.
So the setting that controls if the mirroring options show in the Displays menu is located in the ~/Library/Preferences/com.apple.airplay.plist
and the specific setting is called showInMenuBarIfPresent
which is a boolean value. Setting it to false removes the mirroring option, which is equivalent to unchecking that box.
How I found this was by using Composer to capture the plist that got modified when disabling/enabling that option.
So this setting can be used in a Configuration Profile with the following steps.
Write the setting into a new plist, to someplace like the Desktop or another location.
defaults write ~/Desktop/com.apple.airplay.plist showInMenuBarIfPresent -bool false
Now convert it to an xml format so Jamf can import it:
plutil -convert xml1 ~/Desktop/com.apple.airplay.plist
Next, in Jamf Pro, create a new Configuration Profile, or edit an existing one if you think it makes sense to bundle it with other options (I would personally keep it separate)
Add the Application & Custom Settings payload to the profile. Choose the Upload a File option and select the plist you created in the above steps.
The profile can be set at Computer Level. It does not need to be User Level to work. Once it's imported, scope to a test machine and deploy. As soon as the profile hits the device, if Airplay mirroring is enabled (showing in the menubar), it will vanish.
If you now open System Preferences > Displays, you can check/enable the mirroring option, but the item will not appear in the menubar icon. If you close and reopen System Preferences, the checkbox will be unchecked again. So it won't stick if you try to enable it, i.e. it's locked out from being changed by the end user.
I tested this successfully on 10.15.7. I didn't try it on Big Sur beta, so I can't speak for that version.
Hopefully that helps you get this set up.
This can be done. Here are the steps. So you know, I just did these steps as an experiment to see if it would work and it did.
So the setting that controls if the mirroring options show in the Displays menu is located in the ~/Library/Preferences/com.apple.airplay.plist
and the specific setting is called showInMenuBarIfPresent
which is a boolean value. Setting it to false removes the mirroring option, which is equivalent to unchecking that box.
How I found this was by using Composer to capture the plist that got modified when disabling/enabling that option.
So this setting can be used in a Configuration Profile with the following steps.
Write the setting into a new plist, to someplace like the Desktop or another location.
defaults write ~/Desktop/com.apple.airplay.plist showInMenuBarIfPresent -bool false
Now convert it to an xml format so Jamf can import it:
plutil -convert xml1 ~/Desktop/com.apple.airplay.plist
Next, in Jamf Pro, create a new Configuration Profile, or edit an existing one if you think it makes sense to bundle it with other options (I would personally keep it separate)
Add the Application & Custom Settings payload to the profile. Choose the Upload a File option and select the plist you created in the above steps.
The profile can be set at Computer Level. It does not need to be User Level to work. Once it's imported, scope to a test machine and deploy. As soon as the profile hits the device, if Airplay mirroring is enabled (showing in the menubar), it will vanish.
If you now open System Preferences > Displays, you can check/enable the mirroring option, but the item will not appear in the menubar icon. If you close and reopen System Preferences, the checkbox will be unchecked again. So it won't stick if you try to enable it, i.e. it's locked out from being changed by the end user.
I tested this successfully on 10.15.7. I didn't try it on Big Sur beta, so I can't speak for that version.
Hopefully that helps you get this set up.
@mm2270 wrote:
This can be done. Here are the steps. So you know, I just did these steps as an experiment to see if it would work and it did.
So the setting that controls if the mirroring options show in the Displays menu is located in the ~/Library/Preferences/com.apple.airplay.plist and the specific setting is called showInMenuBarIfPresent which is a boolean value. Setting it to false removes the mirroring option, which is equivalent to unchecking that box.
How I found this was by using Composer to capture the plist that got modified when disabling/enabling that option.
So this setting can be used in a Configuration Profile with the following steps.
Write the setting into a new plist, to someplace like the Desktop or another location.
defaults write ~/Desktop/com.apple.airplay.plist showInMenuBarIfPresent -bool false
Now convert it to an xml format so Jamf can import it:
plutil -convert xml1 ~/Desktop/com.apple.airplay.plist
Next, in Jamf Pro, create a new Configuration Profile, or edit an existing one if you think it makes sense to bundle it with other options (I would personally keep it separate)
Add the Application & Custom Settings payload to the profile. Choose the Upload a File option and select the plist you created in the above steps.
The profile can be set at Computer Level. It does not need to be User Level to work. Once it's imported, scope to a test machine and deploy. As soon as the profile hits the device, if Airplay mirroring is enabled (showing in the menubar), it will vanish.
If you now open System Preferences > Displays, you can check/enable the mirroring option, but the item will not appear in the menubar icon. If you close and reopen System Preferences, the checkbox will be unchecked again. So it won't stick if you try to enable it, i.e. it's locked out from being changed by the end user.
I tested this successfully on 10.15.7. I didn't try it on Big Sur beta, so I can't speak for that version.
Hopefully that helps you get this set up.
Thank you!
Just wish i found this 1 hour ago.
Works perfectly if you want to enable screen mirroring
defaults write ~/Desktop/com.apple.airplay.plist showInMenuBarIfPresent -bool false