Thanks Fahim! This is a great timesaver!
I actually spent a whole week trying to install SQL Server 2008 R2 as a clustered service on a cluster of Windows Server 2012. It was a very lengthy process with a lot of trial and error, but I finally succeeded last Tuesday. The solution is just as you suggested--I had to slipstream SQL Server 2008 R2 (x64) with SP2 and it worked like a charm. I used a lot of information from this article
by Peter Saddow to manually slipstream my install. However, in my case, it was also necessary to include CU4 for the install to complete without any errors. I added the additional steps from this article
by Samir Farhat into the above process. Afterwards, I manually downloaded and applied CU5 and all is well. I was preparing to do the exact same thing for another clustered environment, but now I can use your PowerShell script to automate a lot of this. Thanks again!