-
Notifications
You must be signed in to change notification settings - Fork 5
Runtime Options
Once you open Start-Sql.ps1 in PowerShell ISE. There are a myriad of options you can configure, but only a few you must
The $ht object is a hashtable, it is a simply key/value pair collection that is pass directly into the Install Process.
The values for DataCenter, SqlVersion and SqlEdition will be validated against what you have setup in the respective sections of the Config File Setup, thus ensure those are valid against your Config.
#Required Parameters
$ht.Add("DataCenter", 'Data Center 1')
$ht.Add("SqlVersion", 'Sql2012')
$ht.Add("SqlEdition", 'Developer')
Service Accounts and respective passwords can be set, otherwise will default, As defined by Microsoft [url:https://msdn.microsoft.com/en-us/library/ms143504.aspx] ^^Other account types to Come^^
$overrides.Add("sqlServiceAccount", 'SQLFTW\SQLService')
$overrides.Add("sqlServicePassword", 'SQL4tw!')
$overrides.Add("isServiceAccount", 'SQLFTW\SQLService')
$overrides.Add("isServicePassword", 'SQL4tw!')
$overrides.Add("agtServiceAccount", 'SQLFTW\SQLService')
$overrides.Add("agtServicePassword", 'SQL4tw!')
$overrides.Add("ftServiceAccount", 'SQLFTW\SQLService')
$overrides.Add("ftServicePassword", 'SQL4tw!')
Other optional, regularly used parameters:
- SysAdminPassword - If not provided, one will be automatically provided and saved to Details.txt in the Log Directory
- InstanceName - Will default to no instance if not provided.
- ProductStringName - This is a list of [url:Features|https://msdn.microsoft.com/en-us/library/ms144259.aspx#Anchor_10] to Install
- Environment - Setting is not used by Install, but can be defined in Environment Nodes of Config file and later used in custom Pre/Post scripts, if not provided
While your regular install options should be setup in the Version specific Configuration Template, you can override those individual features by using the $overrides hashtable in this manner:
$overrides.Add("SQLBACKUPDIR", 'C:\$Recycle.Bin')
$overrides.Add("SQLUSERDBDIR", 'H:\MSSQL10\MSSQL\Data')
$overrides.Add("SQLUSERDBLOGDIR", 'H:\MSSQL10\MSSQL\Logs')
Debug can be initiated in one of two ways: Add the Parameter:
$ht.Add("Debug", 'True')
Or simply pass the -Debug parameter directly to the Run-Install Command
Run-Install -Parameters $ht -TemplateOverrides $overrides -Verbose -Full -Debug
Just as debug, a simulated/whatif execution can be initiated in one of two ways: Add the Parameter:
$ht.Add("Simulation", 'True')
Or simply pass the -WhatIf parameter directly to the Run-Install Command
Run-Install -Parameters $ht -TemplateOverrides $overrides -Verbose -Full -WhatIf