script change.
This commit is contained in:
Родитель
463911b513
Коммит
aee4d4cfa3
|
@ -1,23 +1,2 @@
|
|||
Configuration SetFirewallRule
|
||||
{
|
||||
param ($MachineName)
|
||||
|
||||
Import-DSCResource -ModuleName xNetworking
|
||||
|
||||
Node $MachineName
|
||||
{
|
||||
xFirewall Firewall1433
|
||||
{
|
||||
Name = 'SQLFirewallRule'
|
||||
DisplayName = 'Firewall Rule for SQL Server'
|
||||
Group = 'SQL Firewall Rule Group'
|
||||
Ensure = 'Present'
|
||||
Enabled = 'True'
|
||||
Profile = ('Domain', 'Private')
|
||||
Direction = 'Inbound'
|
||||
LocalPort = ('1433')
|
||||
Protocol = 'TCP'
|
||||
Description = 'Firewall Rule for SQL Server'
|
||||
}
|
||||
}
|
||||
}
|
||||
#run a firewall rule
|
||||
$(netsh firewall add portopening TCP 1433 "Open Port 1433")
|
|
@ -909,16 +909,15 @@
|
|||
"[concat('Microsoft.Compute/virtualMachines/', 'db-1')]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.19",
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "CustomScriptExtension",
|
||||
"typeHandlerVersion": "1.7",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"ModulesUrl": "https://github.com/Microsoft/MCW-Azure-security-privacy-and-compliance/blob/master/Hands-on%20lab/Scripts/Set_FirewallRule.zip?raw=true",
|
||||
"ConfigurationFunction": "Set_FirewallRule.ps1\\SetFirewallRule",
|
||||
"Properties": {
|
||||
"MachineName": "db-1"
|
||||
}
|
||||
"fileUris" : [
|
||||
"https://raw.githubusercontent.com/givenscj/MCW-Security-baseline-on-Azure/master/Hands-on%20lab/Scripts/Set_FirewallRule/Set_FirewallRule.ps1"
|
||||
],
|
||||
"commandToExecute" : "powershell.exe -ExecutionPolicy bypass -File Set_FirewallRule.ps1"
|
||||
},
|
||||
"protectedSettings": null
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче