Skip to content

Commit 278472f

Browse files
Merge pull request #264807 from vhorne/waf-migrate-policy
remove redundant main declaration
2 parents c312519 + 6a01f16 commit 278472f

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

articles/web-application-firewall/ag/migrate-policy.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.custom: devx-track-azurepowershell
1212

1313
# Upgrade Web Application Firewall policies using Azure PowerShell
1414

15-
This script makes it easy to transition from a WAF config, or a custom rules-only WAF policy, to a full WAF policy. You may see a warning in the portal that says *upgrade to WAF policy*, or you may want the new WAF features such as Geomatch custom rules, per-site WAF policy, and per-URI WAF policy, or the bot mitigation ruleset. To use any of these features, you need a full WAF policy associated to your application gateway.
15+
This script makes it easy to transition from a WAF config, or a custom rules-only WAF policy, to a full WAF policy. You might see a warning in the portal that says *upgrade to WAF policy*, or you might want the new WAF features such as Geomatch custom rules, per-site WAF policy, and per-URI WAF policy, or the bot mitigation ruleset. To use any of these features, you need a full WAF policy associated to your application gateway.
1616

1717
For more information about creating a new WAF policy, see [Create Web Application Firewall policies for Application Gateway](create-waf-policy-ag.md). For information about migrating, see [upgrade to WAF policy](create-waf-policy-ag.md#upgrade-to-waf-policy).
1818

@@ -22,7 +22,7 @@ Use the following steps to run the migration script:
2222

2323
1. Open the following Cloud Shell window, or open one from within the portal.
2424
2. Copy the script into the Cloud Shell window and run it.
25-
3. The script asks for Subscription ID, Resource Group name, the name of the Application Gateway that the WAF config is associated with, and the name of the new WAF policy that you will create. Once you enter these inputs, the script runs and creates your new WAF policy
25+
3. The script asks for Subscription ID, Resource Group name, the name of the Application Gateway that the WAF config is associated with, and the name of the new WAF policy that you create. Once you enter these inputs, the script runs and creates your new WAF policy
2626
4. Verify the new WAF policy is associated with your application gateway. Go to the WAF policy in the portal and select the **Associated Application Gateways** tab. Verify the Application Gateway is associated with the WAF policy.
2727

2828
> [!NOTE]
@@ -207,14 +207,6 @@ function Main() {
207207
return $policy
208208
}
209209
210-
Main
211-
212-
function Main() {
213-
Login
214-
$policy = createNewTopLevelWafPolicy -subscriptionId $subscriptionId -resourceGroupName $resourceGroupName -applicationGatewayName $applicationGatewayName -wafPolicyName $wafPolicyName
215-
return $policy
216-
}
217-
218210
Main
219211
```
220212
## Next steps

0 commit comments

Comments
 (0)