This is related and may be of use to you. I force Bluetooth off in our student labs via Configuration Profile.
Preference Domain: com.apple.MCXBluetooth
Custom Applications & Settings:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DisableBluetooth</key>
<true/>
</dict>
</plist>
Try setting the true to false. This might force it on. Not sure, haven't tried it as we only force it off in student labs.
This is the script from CIS to disable:
• 2.3.3.11 Ensure Bluetooth Sharing Is Disabled (Automated)
Edit: My bad - this is for Bluetooth Sharing.
% /usr/bin/sudo -u <username> /usr/bin/defaults -currentHost write
com.apple.Bluetooth PrefKeyServicesEnabled -bool false
% /usr/bin/sudo -u firstuser /usr/bin/defaults -currentHost write
com.apple.Bluetooth PrefKeyServicesEnabled -bool false
You could massage the script, and flip "false" to "true."
I am using a script, to turn it off or on, and so far it works on Sequoia for me.
# Turn on Bluetooth service
/usr/bin/defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 1
Use a 0 to turn it off.
One day I may go fully down the configuration profiles route, but not yet.
As with all scripts you get from the internet, Test, Test, and Test again before sending it to production.
You could consider using blueutil to do this:
https://github.com/toy/blueutil
This is related and may be of use to you. I force Bluetooth off in our student labs via Configuration Profile.
Preference Domain: com.apple.MCXBluetooth
Custom Applications & Settings:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DisableBluetooth</key>
<true/>
</dict>
</plist>
Try setting the true to false. This might force it on. Not sure, haven't tried it as we only force it off in student labs.
I just tried your profile config. It works, but if enduser decides to turn off BT again after it was force back on it will remain off.
I am using a script, to turn it off or on, and so far it works on Sequoia for me.
# Turn on Bluetooth service
/usr/bin/defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 1
Use a 0 to turn it off.
One day I may go fully down the configuration profiles route, but not yet.
As with all scripts you get from the internet, Test, Test, and Test again before sending it to production.
You've got a capital B in Bluetooth. On two 15.4 Macs, I see it as lowercase.
You could consider using blueutil to do this:
https://github.com/toy/blueutil
I tested blueutil and it works.