-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sql-Config.ps1
22 lines (20 loc) · 1.07 KB
/
Sql-Config.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<#########################################################################################
Prompt the user to set server, database, user and password for an environment
########################################################################################>
Param(
[Parameter(Mandatory=$true, Position=0, HelpMessage="Environment to deploy to?")][ValidateSet('dev','uat','qa','prod')]
[String]$EnvName,
[Parameter(Mandatory=$false, Position=1, HelpMessage="Server name or IP address")]
[String]$S,
[Parameter(Mandatory=$false, Position=2, HelpMessage="Database name")]
[String]$d,
[Parameter(Mandatory=$false, Position=3, HelpMessage="Is integrated security")]
[Switch]$E = $false,
[Parameter(Mandatory=$false, Position=4, HelpMessage="User name")]
[String]$U,
[Parameter(Mandatory=$false, Position=5, HelpMessage="Password")]
[String]$P
)
$scriptDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
. $scriptDir\Config-Utils.ps1
Set-ConfigValues $EnvName $S $d $E $U $P