---
updatedAt: 2026-05-11T22:02:32.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/powershell/llms.txt
---

# Policy mode

Set-AppSecPolicyMode

## Synopsis

Modify the mode.

## Syntax

```powershell Config & policy name (Default)
Set-AppSecPolicyMode [-ConfigName] <String> [-VersionNumber] <String> [-PolicyName] <String> -Mode <String> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```
```powershell Config name & policy ID
Set-AppSecPolicyMode [-ConfigName] <String> [-VersionNumber] <String> -PolicyID <String> -Mode <String> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```
```powershell Config & policy ID
Set-AppSecPolicyMode -ConfigID <Int32> [-VersionNumber] <String> -PolicyID <String> -Mode <String> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```
```powershell Config ID & policy name
Set-AppSecPolicyMode -ConfigID <Int32> [-VersionNumber] <String> [-PolicyName] <String> -Mode <String> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## Description

Changes the rule upgrade mode.

The mode you set determines how your rule sets are updated.

If your configuration is still using the Kona Rule Set, use `KRS` mode to update the rule sets manually or `AAG` to have them updated automatically.

Otherwise, use `ASE_MANUAL` mode to update the rule sets manually or `ASE_AUTO` to have them updated automatically.

When making a request, you can specify a configuration with the `-ConfigName` or `-ConfigID` parameter.

The `-VersionNumber` parameter is an integer or the word `latest`.

To specify a policy, use the `-PolicyName` or `-PolicyID` parameter.

## Parameters

<table>
  <tbody>
    <tr>
      <td class="ps-td"><code>&#8209;AccountSwitchKey</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>An account credential key that lets you move between accounts when using an API client enabled for multiple accounts. To find account switch keys, use <a href="https://techdocs.akamai.com/powershell/docs/get-accountswitchkey">Get-AccountSwitchKey</a>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;ConfigID</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Conditionally required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">Int32</span>
          <span class="ps-param-metadata">Parameter sets: <code>Config & policy ID</code>, <code>Config ID & policy name</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>Your configuration's ID.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;ConfigName</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Conditionally required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Parameter sets: <code>Config name & policy ID</code>, <code>Config & policy name</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The name of your security configuration.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;EdgeRCFile</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>Your EdgeGrid resource file to authenticate your command. Defaults to <code>~/.edgerc</code>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;Mode</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Accepted values: <code>KRS</code>, <code>AAG</code>, <code>ASE_AUTO</code>, <code>ASE_MANUAL</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The type of update you want to make to the evaluation hostname list. You can <code>append</code> additional hostnames, <code>remove</code> hostnames from the list, or <code>replace</code> the existing list with the hostnames you pass in your request.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;PolicyID</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Conditionally required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Parameter sets: <code>Config & policy ID</code>, <code>Config name & policy ID</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>Your security policy's ID.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;PolicyName</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Conditionally required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Parameter sets: <code>Config ID & policy name</code>, <code>Config & policy name</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The name of your security policy.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;Section</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The section name in your EdgeGrid resource file to retrieve authentication credentials from. Defaults to <code>default</code>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;VersionNumber</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>A configuration's version. Can be an integer or the word <code>latest</code>.</p>
        </div>
      </td>
    </tr>
  </tbody>
</table>

## Related Links

* [User Guide: Overview](https://techdocs.akamai.com/powershell/docs/overview)
* [API Reference](https://techdocs.akamai.com/application-security/reference/put-policy-mode)

# Sibling pages

* [Attack payload](https://techdocs.akamai.com/powershell/docs/set-appsecattackpayload.md)
* [Behavioral DDoS](https://techdocs.akamai.com/powershell/docs/set-appsecbehavioralddos.md)
* [Configuration attack payload logging](https://techdocs.akamai.com/powershell/docs/set-appsecattackpayloadsettings.md)
* [Configuration bypass network lists](https://techdocs.akamai.com/powershell/docs/set-appsecbypassnetworklists.md)
* [Configuration evaluation hostnames](https://techdocs.akamai.com/powershell/docs/set-appsecevaluationhostnames.md)
* [Configuration evasive path match](https://techdocs.akamai.com/powershell/docs/set-appsecevasivepathmatch.md)
* [Configuration HTTP header logs](https://techdocs.akamai.com/powershell/docs/set-appseclogging.md)
* [Configuration Pragma settings](https://techdocs.akamai.com/powershell/docs/set-appsecpragmasettings.md)
* [Configuration selected hostnames](https://techdocs.akamai.com/powershell/docs/set-appsecselectedhostnames.md)
* [Configuration request body settings](https://techdocs.akamai.com/powershell/docs/set-appsecrequestsizelimit.md)
* [Configuration version notes](https://techdocs.akamai.com/powershell/docs/set-appsecversionnotes.md)
* [Cookie settings](https://techdocs.akamai.com/powershell/docs/set-appseccookiesettings.md)
* [Custom deny action](https://techdocs.akamai.com/powershell/docs/set-appseccustomdenyaction.md)
* [Custom rule](https://techdocs.akamai.com/powershell/docs/set-appseccustomrule.md)
* [Evaluation rate policy](https://techdocs.akamai.com/powershell/docs/set-appsecevaluationratepolicy.md)
* [JA4 fingerprint](https://techdocs.akamai.com/powershell/docs/set-appsecja4fingerprint.md)
* [Malware policy](https://techdocs.akamai.com/powershell/docs/set-appsecmalwarepolicy.md)
* [Match target](https://techdocs.akamai.com/powershell/docs/set-appsecmatchtarget.md)
* [Match target order](https://techdocs.akamai.com/powershell/docs/set-appsecmatchtargetorder.md)
* [PII learning](https://techdocs.akamai.com/powershell/docs/set-appsecpiisettings.md)
* [Onboarding origin validation](https://techdocs.akamai.com/powershell/docs/submit-appseconboardingoriginvalidation.md)
* [Onboarding settings](https://techdocs.akamai.com/powershell/docs/set-appseconboardingsettings.md)
* [Policy](https://techdocs.akamai.com/powershell/docs/set-appsecpolicy.md)
* [Policy adaptive intelligence](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyadaptiveintelligence.md)
* [Policy API request constraints](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyapirequestconstraints.md)
* [Policy attack group action](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyattackgroup.md)
* [Policy attack group exceptions](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyattackgroupexceptions.md)
* [Policy attack payload logging](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyattackpayload.md)
* [Policy behavioral DDoS](https://techdocs.akamai.com/powershell/docs/set-appsecpolicybehavioralddos.md)
* [Policy bypass network lists](https://techdocs.akamai.com/powershell/docs/set-appsecpolicybypassnetworklists.md)
* [Policy CPC](https://techdocs.akamai.com/powershell/docs/set-appsecpolicycpc.md)
* [Policy custom rule action](https://techdocs.akamai.com/powershell/docs/set-appsecpolicycustomrule.md)
* [Policy evaluation attack group action](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyevaluationattackgroup.md)
* [Policy evaluation attack group exceptions](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyevaluationattackgroupexceptions.md)
* [Policy evaluation hostnames](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyevaluationhostnames.md)
* [Policy evaluation mode](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyevaluationmode.md)
* [Policy evaluation penalty box](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyevaluationpenaltybox.md)
* [Policy evaluation penalty box condition](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyevaluationpenaltyboxcondition.md)
* [Policy evaluation rule action](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyevaluationrule.md)
* [Policy evaluation rule exceptions](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyevaluationruleexceptions.md)
* [Policy evasive path match](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyevasivepathmatch.md)
* [Policy IP/Geo Firewall settings](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyipgeofirewall.md)
* [Policy HTTP header logs](https://techdocs.akamai.com/powershell/docs/set-appsecpolicylogging.md)
* [Policy malware policy action](https://techdocs.akamai.com/powershell/docs/set-appsecpolicymalwarepolicy.md)
* [Policy penalty box](https://techdocs.akamai.com/powershell/docs/set-appsecpolicypenaltybox.md)
* [Policy penalty box condition](https://techdocs.akamai.com/powershell/docs/set-appsecpolicypenaltyboxcondition.md)
* [Policy Pragma settings](https://techdocs.akamai.com/powershell/docs/set-appsecpolicypragmasettings.md)
* [Policy protections](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyprotections.md)
* [Policy rapid rule](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyrapidrule.md)
* [Policy rapid rule condition](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyrapidrulecondition.md)
* [Policy rapid rule default action](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyrapidruledefaultaction.md)
* [Policy rate policy actions](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyratepolicy.md)
* [Policy reputation profile action](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyreputationprofile.md)
* [Policy request body settings](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyrequestsizelimit.md)
* [Policy selected hostnames](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyselectedhostnames.md)
* [Policy tuning recommendations](https://techdocs.akamai.com/powershell/docs/set-appsecpolicytuningrecommendations.md)
* [Prefetch requests](https://techdocs.akamai.com/powershell/docs/set-appsecprefetch.md)
* [Rate policy](https://techdocs.akamai.com/powershell/docs/set-appsecratepolicy.md)
* [Reputation analysis](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyreputationanalysis.md)
* [Reputation profile](https://techdocs.akamai.com/powershell/docs/set-appsecreputationprofile.md)
* [SIEM settings](https://techdocs.akamai.com/powershell/docs/set-appsecsiemsettings.md)
* [Slow POST protection](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyslowpost.md)
* [WAF policy rule action](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyrule.md)
* [WAF rule exceptions](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyruleexceptions.md)
* [URL protection policy](https://techdocs.akamai.com/powershell/docs/set-appsecurlprotectionpolicy.md)
* [URL protection policy actions](https://techdocs.akamai.com/powershell/docs/set-appsecpolicyurlprotectionpolicy.md)