We recommend using Visual Studio 2017

ScriptingOptions.AgentNotify Property

Gets or sets the Boolean property that specifies whether to include notifications for any SQL Server Agent alerts that are in the script.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public bool AgentNotify { get; set; }

Property Value

Type: System.Boolean
A Boolean value that specifies whether to include notifications for any SQL Server Agent alerts that are in the script.
If True, SQL Server Agent alert notifications are scripted. Otherwise, False (default).

Community Additions

ADD
Show: