Automated installation of SQL Server 2012 for TFS “11″ at the command line
If I had one pound sterling for every Team Foundation Server install I’ve performed in my life I’d be a rich man by now. Back in late 2004/early 2005 when a number of us were playing with the alpha TFS 2005 bits, all the components had to be installed on a separate machines and if you made the slightest mistake it was a rebuild job from the bare metal – of course Virtualisation technologies like snapshotting weren’t mainstream in those days and installation was a pain!
Fast forward 8 years and here we are; .NET Framework is properly integrated as a system component in the OS, Virtualisation and snapshotting is the norm, disks have got much faster, TFS installs in minutes (not hours) and automatically configures IIS and all the prerequisites it needs, which makes life amazingly easy.
Grant Holliday wrote this article that I still refer to when I need to build a TFS2010 virtual machine from scratch so when I came to installing a brand new Windows 8 Server with SQL Server 2012 and TFS “11″ in a Virtual Machine I had to do a little bit of thinking for myself.
Assuming you want to create a Default instance of SQL Server 2012 complete with Analysis Services and SQL Server Reporting Services (SSRS) as if you had accepted all the defaults:
- start with a completely blank Windows 8 Server image with no roles or features added
- mount the disk in your favourite manner (i.e. mount the .iso image on your host machine from the menu on your guest VM, or use Virtual CloneDrive to mount the .iso file locally)
- at a new administrator command prompt, replace the highlighted bits with a valid user who you wish to have full access to everything!) and paste the whole thing:
d:\setup.exe /QS /ACTION="Install" /ENU /UpdateEnabled /FEATURES=SQLENGINE,FULLTEXT,AS,RS,SSMS,ADV_SSMS /UpdateSource="MU" /INDICATEPROGRESS="True" /X86="False" /INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server" /INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server" /INSTANCENAME="MSSQLSERVER" /INSTANCEID="MSSQLSERVER" /SQMREPORTING="False" /RSINSTALLMODE="DefaultNativeMode" /ERRORREPORTING="False" /INSTANCEDIR="C:\Program Files\Microsoft SQL Server" /AGTSVCACCOUNT="NT Service\SQLSERVERAGENT" /AGTSVCSTARTUPTYPE="Manual" /ASSVCACCOUNT="NT Service\MSSQLServerOLAPService" /ASSVCSTARTUPTYPE="Automatic" /ASCOLLATION="Latin1_General_CI_AS" /ASDATADIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Data" /ASLOGDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Log" /ASBACKUPDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Backup" /ASTEMPDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Temp" /ASCONFIGDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Config" /ASPROVIDERMSOLAP="1" /ASSYSADMINACCOUNTS="VS11BETA\Administrator" /ASSERVERMODE="MULTIDIMENSIONAL" /SQLSVCSTARTUPTYPE="Automatic" /FILESTREAMLEVEL="0" /SQLCOLLATION="Latin1_General_CI_AS" /SQLSVCACCOUNT="NT Service\MSSQLSERVER" /SQLSYSADMINACCOUNTS="VS11BETA\Administrator" /TCPENABLED="1" /NPENABLED="0" /BROWSERSVCSTARTUPTYPE="Disabled" /RSSVCACCOUNT="NT Service\ReportServer" /RSSVCSTARTUPTYPE="Automatic" /FTSVCACCOUNT="NT Service\MSSQLFDLauncher" /IAcceptSQLServerLicenseTerms
Installation will progress for a while but when finished you have all the components required to do the TFS 11 install immediately afterwards.




