• We have a PowerShell script that installs SQL Server using all of our internal best practices.
    It will download and run the mssql setup executable for appropriate version and latest cumulative update
    , and then once done, it will:

    - create all the data and log file folders
    - split tempdb into appropriate number of files depending on the machine's CPU count
    - create logins, alerts, server settings, trace flags
    - setup dbmail, xe audit traces, backup schedule, maintenance plan (Ola Hallengren)
    - create SA account with random password and then make web service call to add that server name + password to Secret Server key vault
    ... and 100+ other things

    Still, it doesn't guarantee that the install process will complete without issue. The script is a constant work in progress as environments, platforms, and prevailing best practices change.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho