Skip to content

Commit 72a496a

Browse files
committed
........
1 parent 7a3633a commit 72a496a

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

CI/Azure-DevOps/AZ_MainPipeline.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,20 @@ stages:
273273
$DS.Tables[0].Rows | %{ echo "{ $($_['U']), $($_['T']), $($_['V']) }" }
274274
if("${{ parameters.CreateEnvOnly }}" -ieq "true"){
275275
Write-Host '==========================================================' -ForegroundColor Yellow;
276-
Write-Warning "Name: $(SQLVersionName)";
277-
Write-Warning "FQDN: $FQDNAndPort";
278-
Write-Warning "User: $SQLUserName";
279-
Write-Warning "Pass: $SQLPwd";
276+
Write-Host "Name: $(SQLVersionName)";
277+
Write-Host "FQDN: $FQDNAndPort";
278+
Write-Host "User: $SQLUserName";
279+
Write-Host "Pass: $SQLPwd";
280280
Write-Host '==========================================================' -ForegroundColor Yellow;
281+
282+
Write-Warning 'This information is now public! Run the following statement to change the password immediately!' -ForegroundColor Yellow;
283+
284+
$Command = '$NewPwd = -join ((33..126) * 3 | Get-Random -Count 12 | % {[char]$_}); Write-Output "New Password: $NewPwd"; Invoke-Sqlcmd -Query "ALTER LOGIN [$($myJsonObject.$SQLUserNameKey)] WITH PASSWORD = ''$NewPwd'' REUSE;" -ServerInstance $myJsonObject.$FQDNAndPortKey -Username $myJsonObject.$SQLUserNameKey -Password $myJsonObject.$SQLPwdKey'
285+
$EscapedCommand = $Command -replace '"', '""'
286+
Write-Host '==========================================================' -ForegroundColor Yellow;
287+
Write-Host $EscapedCommand
288+
Write-Host '==========================================================' -ForegroundColor Yellow;
289+
281290
}
282291
283292

0 commit comments

Comments
 (0)