forked from dsccommunity/SqlServerDsc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1-AddAlert.ps1
33 lines (28 loc) · 916 Bytes
/
1-AddAlert.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<#
.EXAMPLE
This example shows how to ensure that the SQL Agent Alert
Sev17 exists with the correct severity level.
.EXAMPLE
This example shows how to ensure that the SQL Agent Alert
Msg825 exists with the correct message id.
#>
Configuration Example
{
Import-DscResource -ModuleName SqlServerDsc
node localhost {
SqlAgentAlert Add_Sev17 {
Ensure = 'Present'
Name = 'Sev17'
ServerName = 'TestServer'
InstanceName = 'MSSQLServer'
Severity = '17'
}
SqlAgentAlert Add_Msg825 {
Ensure = 'Present'
Name = 'Msg825'
ServerName = 'TestServer'
InstanceName = 'MSSQLServer'
MessageId = '825'
}
}
}