dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer
https://dbatools.io
MIT License
2.47k stars 803 forks source link

[Bug] Hi. Copy-DbaDbMail copies dbmail configuration to destination server but with wrong password. i have to change password manually on the destination host. #6394

Closed Dankhatskevich closed 4 years ago

Dankhatskevich commented 4 years ago

Environmental information

# PS C:\Windows\system32> Get-Culture

LCID             Name             DisplayName                                                                                                              
----             ----             -----------                                                                                                              
1033             en-US            English (United States)                                                                                                  

SQL Server:

/* Microsoft SQL Server 2019 (RTM-CU2) (KB4536075) - 15.0.4013.40 (X64)   Feb  3 2020 16:40:57   Copyright (C) 2019 Microsoft Corporation  Standard Edition (64-bit) on Windows Server 2019 Datacenter 10.0 <X64> (Build 17763: ) (Hypervisor)  */
/* us_english */

Report

#### Host used - [ ] powershell.exe - [x] ISE - [ ] VS Code - [ ] Other (please specify) If anything other than powershell.exe was used, please confirm that you can duplicate the issue with powershell.exe - [ ] Still buggy in powershell.exe #### Errors Received No faced error PS C:\Windows\system32> & {"``````";$error[0] | select *;"``````"} | clip PS C:\Windows\system32>

Steps to Reproduce

I used simple command Copy-DbaDbMail -source s5000sql101\template -destination S5000SQLDEV102\EGAIS_MERCURY -Force on a few servers with the same OS version and MSSQL version. This command executed without any errors, warnings and etc. But i couldn't send emails with authentication failed error. So, i changed password by myself, after that i had success with sending emails.

Expected Behavior

I wanted copy email configuration.

Actual Behavior

MSSQL server cannot authorize on smtp server.

Dankhatskevich commented 4 years ago

also i fogot: i use win2019 + MSSQL 2019 Std Ed + CU2.

wsmelton commented 4 years ago

Can you complete the additional sections of information requested?

Dankhatskevich commented 4 years ago

Done, i think.

wsmelton commented 4 years ago

What password in dbmail?

What configuration do we need to supply to try and validate the issue?

wsmelton commented 4 years ago

Closing this as we have no control over it. We are simply taking the output from Script() method and applying that to the destination server.

I've hit it myself in a few cases and it is not something I can duplicate in lab setup.