forked from dsccommunity/SqlServerDsc
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path1-CreateInboundFirewallRules.ps1
More file actions
39 lines (34 loc) · 999 Bytes
/
1-CreateInboundFirewallRules.ps1
File metadata and controls
39 lines (34 loc) · 999 Bytes
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
34
35
36
37
38
39
<#
.EXAMPLE
This example shows how to create the default rules for the supported features.
#>
Configuration Example
{
param
(
[Parameter(Mandatory = $true)]
[System.Management.Automation.PSCredential]
[System.Management.Automation.Credential()]
$SysAdminAccount
)
Import-DscResource -ModuleName xSqlServer
node localhost
{
xSQLServerFirewall Create_FirewallRules_For_SQL2012
{
Ensure = 'Present'
Features = 'SQLENGINE,AS,RS,IS'
InstanceName = 'SQL2012'
SourcePath = '\\files.company.local\images\SQL2012'
PsDscRunAsCredential = $SysAdminAccount
}
xSQLServerFirewall Create_FirewallRules_For_SQL2016
{
Ensure = 'Present'
Features = 'SQLENGINE'
InstanceName = 'SQL2016'
SourcePath = '\\files.company.local\images\SQL2016'
SourceCredential = $SysAdminAccount
}
}
}