Get‑SqlDscAgentAlert - dsccommunity/SqlServerDsc GitHub Wiki
Returns SQL Agent Alert information.
Get-SqlDscAgentAlert -ServerObject <Server> [<CommonParameters>]
Get-SqlDscAgentAlert -ServerObject <Server> -Name <String>
[<CommonParameters>]
Returns SQL Agent Alert information from a SQL Server Database Engine instance.
$serverObject = Connect-SqlDscDatabaseEngine
Get-SqlDscAgentAlert -ServerObject $serverObject
Returns all SQL Agent Alerts from the server.
$serverObject = Connect-SqlDscDatabaseEngine
Get-SqlDscAgentAlert -ServerObject $serverObject -Name 'MyAlert'
Returns the SQL Agent Alert named 'MyAlert'.
$serverObject = Connect-SqlDscDatabaseEngine
$serverObject | Get-SqlDscAgentAlert -Name 'MyAlert'
Returns the SQL Agent Alert named 'MyAlert' using pipeline input.
Specifies the name of the SQL Agent Alert to retrieve. If not specified, all alerts are returned.
Type: String
Parameter Sets: ByName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies current server connection object.
Type: Server
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.