Test‑SqlDscIsAgentAlert - dsccommunity/SqlServerDsc GitHub Wiki
Tests if a SQL Agent Alert exists.
Test-SqlDscIsAgentAlert [-ServerObject] <Server> [-Name] <String>
[<CommonParameters>]
This command tests if a SQL Agent Alert exists on a SQL Server Database Engine instance.
$serverObject = Connect-SqlDscDatabaseEngine -InstanceName 'MyInstance'
Test-SqlDscIsAgentAlert -ServerObject $serverObject -Name 'MyAlert'
Tests if the SQL Agent Alert named 'MyAlert' exists.
$serverObject = Connect-SqlDscDatabaseEngine -InstanceName 'MyInstance'
$serverObject | Test-SqlDscIsAgentAlert -Name 'MyAlert'
Tests if the SQL Agent Alert named 'MyAlert' exists using pipeline input.
Specifies the name of the SQL Agent Alert to test.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
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: 1
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.