After doing some testing with this script and Windows 2012 RTM, I noticed that certain features were not installing properly. I’ve had to take eah step (CAS and Mailbox) and break it out into two separate steps. The updated script is here. Don’t forget to rename it to the .ps1 extension.
Please feel free to use it and comment on it. I hope it proves useful.