How to setup IIS App Pool Cpu rate limit using powershell How to setup IIS App Pool Cpu rate limit using powershell powershell powershell

How to setup IIS App Pool Cpu rate limit using powershell


I figured out the correct command that works for me is below.

C:\windows\system32\inetsrv\appcmd.exe set apppool AppPOOLName /cpu.limit:20000 /cpu.action:KillW3wp /cpu.resetInterval:00:01:00


If you're looking for the PowerShell solution, you'll need to correct the property name:

Import-Module WebAdministration$appPool = Get-Item IIS:\AppPools\AddressBroker.API$appPool | Set-ItemProperty -name "cpu.limit" -value 20000$appPool | Set-ItemProperty -name "cpu.action" -value "ThrottleUnderLoad"$appPool | Set-ItemProperty -name "startMode" -value "AlwaysRunning"


According to your description, I suggest you could try to use below command to acheive your requirement.

C:\windows\system32\inetsrv\appcmd.exe set apppool /cpu.limit:20000 /cpu.action:KillW3wp /cpu.resetInterval:00:01:00

Result:

enter image description here