I'd like to stop/start receiving SMS/iMessage via command line, to avoid having to go into system preferences.
Is there a way I can manipulate settings for Messages to enable/disable an account?
It turns out stopping was more logical than expected:
tell application "Messages" repeat with s in services set n to name of s log out s end repeat end tell
It doesn't seem to work the other way around. I've tried and I've tried, and I can't get no satisfaction.
I dont know, but here is a list of all MacOS command-line commands: https://ss64.com/osx/
Nothing in this list explicitly answers your question. So I would assume there is not a way to do this from the command-line.