Turn on Back To My Mac via a Script or Command Line The VPN software I use for work (IPSecuritas) requires me to turn off Back To My Mac to start it's connection, so I frequently turn off Back To My Mac in order to use my VPN connection (the program does this for me). I forget to turn it back on however and I'd love to know if there was something I could run (script, command) to turn it back on.
There is no supported way to do this. Having said that, you can do it using scutil:

louis@Arios:~$ sudo scutil 
&gt; set Setup:/Network/BackToMyMac
&gt; d.add &lt;YYY&gt;  &lt;XXX&gt;.members.btmm.icloud.com
&gt; set Setup:/Network/BackToMyMac
&gt; quit
louis@Arios:~$ 


Replacing &lt;YYY&gt; with the UID of the user account on the system (for most people with  single account that is 501), and &lt;XXX&gt; with your iCloud account number. If you don't know that you can check your dns-sd registrations:

louis@Arios:~$  dns-sd -E
Looking for recommended registration domains:
 DATE: ---Wed 22 Aug 2012---
 9:11:04.789  ...STARTING...
Timestamp     Recommended Registration domain
 9:11:04.789  Added     (More)               local
 9:11:04.789  Added                          icloud.com
                                             - &gt; btmm
                                             - - &gt; members
                                             - - - &gt; &lt;XXX&gt;


The last line will list your iCloud user number. I think they are all 8 digit numbers, at least mine is.