You need to have a configuration file to tell sql server how to install specified in your execute block sql sever needs you to accept the eula, specify initial database and set the SA password as part of the setup process.

Please see [this doc](https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-using-a-configuration-file?view=sql-server-2017) for more information.

---