-
-
Notifications
You must be signed in to change notification settings - Fork 837
Open
Labels
Description
Verified issue does not already exist?
No, I did not search
What error did you receive?
The bug is shown when running the test Install-DbaAgentAdminAlert.Tests.ps1 as where is this waring:
Error adding notification of type NotifyEmail for Test Operator to CLIENT\SQLInstance2 | The specified @operator_name ('Test Operator') does not exist.
Looking at the code I don't see the bug. But maybe the SMO is not updated after creating the operator.
There are other issues with Install-DbaAgentAdminAlert:
$PSItem in line 169 is wrong, same for line 197.
New-DbaAgentAlert is called without EnableException.
Will try to work on that...
Steps to Reproduce
# provide your command(s) executed pertaining to dbatools
# please include variable values (redacted or fake if needed) for reference
Please confirm that you are running the most recent version of dbatools
Other details or mentions
No response
What PowerShell host was used when producing this error
PowerShell Core (pwsh.exe)