File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -273,11 +273,20 @@ stages:
273
273
$DS.Tables[0].Rows | %{ echo "{ $($_['U']), $($_['T']), $($_['V']) }" }
274
274
if("${{ parameters.CreateEnvOnly }}" -ieq "true"){
275
275
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";
280
280
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
+
281
290
}
282
291
283
292
You can’t perform that action at this time.
0 commit comments