- Plesk for Windows
How to set up the same CPU limit for all domains with dedicated application pools?
The CPU limit for all domains with a dedicated IIS application pool can be set up using the following steps:
Connect to a Plesk server via RDP.
Start a command prompt as an Administrator and run the following command to get the list of all subscriptions:
C:\> plesk bin domain --list > C:\domains.txt
Set up the CPU limit for subscriptions. In the example below, limit is set up to 20%:
C:\> for /f "tokens=*" %d in ('type C:\domains.txt') do plesk bin site.exe --set-iis-app-pool-settings %d -cpu-usage-value 20
Note: The CPU limit will be changed only for subscriptions with a dedicated IIS application pool. Subscriptions with a shared IIS pool will not be updated returning the error. The script will skip those subscriptions going to the next one.