ThisCalculator

Everyday

Change Process Priority Windows 10 Command Line

Updated · Standard formula, shown below

Change Process Priority Windows 10 Command Line

You can change the priority of a Windows 10 process from the command line using the built-in wmic tool (deprecated but still present) or the newer PowerShell Set-Process cmdlet. The command sets the priority class of a running process to one of six levels: Idle, Below Normal, Normal, Above Normal, High, or Realtime. This article explains both methods, how they work, and when to use them safely.

Background: Why Change Process Priority?

Windows assigns each process a priority class that determines how much CPU time it gets relative to other running processes. The scheduler uses this priority to decide which thread runs next when multiple threads are ready. By default, most applications run at Normal priority, which is fine for everyday use. But sometimes you want a specific program to get more CPU time—for example, a video renderer, a game, or a heavy calculation—or less, to keep it from slowing down the rest of the system.

Changing priority from the command line is useful for scripting, automation, or when you need to adjust a process without opening Task Manager. It is also handy in remote sessions or when you want to apply the same setting to multiple machines. The command-line approach is fast and repeatable, and it does not require any third-party tools.

How Process Priority Works in Windows 10

Windows uses a priority scale from 0 to 31 for threads. The priority class of a process sets a base priority for its threads. The six priority classes are:

  • Idle (4) – only runs when the system is otherwise idle.
  • Below Normal (6) – lower than Normal, but higher than Idle.
  • Normal (8) – default for most processes.
  • Above Normal (10) – higher than Normal.
  • High (13) – used for time-critical tasks; can make the system feel sluggish.
  • Realtime (24) – highest priority; can cause system instability if used improperly.

When you set a process to a higher priority, its threads get scheduled more often. This can improve performance for that process, but it can also starve other processes of CPU time. Setting a process to Realtime is especially risky because it can interfere with system-critical threads, leading to freezes or crashes. Microsoft recommends using Realtime only for very short, well-tested operations.

Using WMIC to Change Priority (Legacy Method)

The wmic command (Windows Management Instrumentation Command-line) has been part of Windows for a long time. Although Microsoft has deprecated it in favor of PowerShell, it still works in Windows 10 and is simple to use. To change the priority of a running process, you need to know its process ID (PID) or its executable name. Here is the syntax:

wmic process where processid=<PID> call setpriority <priority>

Where <priority> is one of: 64 (Idle), 16384 (Below Normal), 32 (Normal), 32768 (Above Normal), 128 (High), 256 (Realtime).

For example, to set the process with PID 1234 to High priority:

wmic process where processid=1234 call setpriority 128

To set a process by its name, you can use the where clause with the executable name. For instance, to set all instances of notepad.exe to Above Normal:

wmic process where "name='notepad.exe'" call setpriority 32768

Note that the wmic command returns a message like “Method execution successful.” If you get an error, check that the process exists and that you have the necessary permissions.

Using PowerShell to Change Priority (Recommended)

PowerShell is the modern replacement for wmic and offers more flexibility. The Set-Process cmdlet lets you change the priority of a process by name or ID. The syntax is:

Set-Process -Name <processname> -Priority <PriorityClass>

Or by PID:

Set-Process -Id <PID> -Priority <PriorityClass>

The PriorityClass parameter accepts the names: Idle, BelowNormal, Normal, AboveNormal, High, Realtime. For example, to set the process with PID 1234 to High priority:

Set-Process -Id 1234 -Priority High

To set all instances of notepad.exe to Above Normal:

Get-Process -Name notepad | Set-Process -Priority AboveNormal

PowerShell also allows you to start a process with a specific priority directly using the Start-Process cmdlet with the -Priority parameter:

Start-Process notepad.exe -Priority High

This is useful if you want to set priority at launch, rather than after the process is already running.

How to Choose the Right Priority

Choosing the correct priority depends on what you are trying to achieve. Here are some guidelines:

  • Idle – Use for background tasks that should not interfere with anything else, like a backup or a file indexer.
  • Below Normal – Use for tasks that are less important than normal, but still need to complete in a reasonable time.
  • Normal – Leave most applications at this default.
  • Above Normal – Use for applications that you want to run faster than usual, but that do not need to be critical. For example, a video player that should stay responsive while other tasks run.
  • High – Use for time-sensitive tasks like real-time audio processing or video encoding, but be aware that it can make other programs less responsive.
  • Realtime – Avoid unless you are absolutely sure. It can cause system instability, and you may need to reboot to recover if something goes wrong.

Remember that priority is not persistent. When the process ends, the setting is lost. If you need a permanent priority for a specific application, you can create a scheduled task or a startup script that applies the priority each time the process starts.

Common Problems and Troubleshooting

If you get an “Access denied” error, it means you do not have the necessary permissions. You need to run the command prompt or PowerShell as an administrator to change the priority of processes that run with elevated privileges. Right-click the Command Prompt or PowerShell icon and select “Run as administrator”.

Another issue is that the process may not exist or the PID may be incorrect. Use tasklist or Get-Process to verify the PID and name before running the command. For example, tasklist | findstr notepad will list all Notepad processes with their PIDs.

If you try to set a process to Realtime and the system becomes unstable, you can reset the priority back to Normal using Task Manager (right-click the process, go to Details, right-click again, set priority) or by using the same command-line method with the Normal priority value. If the system is completely frozen, you may need to force a reboot.

Note that wmic is deprecated and may be removed in future versions of Windows. It is a good idea to learn PowerShell, as it is the supported method going forward.

Comparison: WMIC vs. PowerShell

Both methods work, but they have differences:

  • Syntax – WMIC uses numeric values (e.g., 128 for High), while PowerShell uses names (e.g., High). Names are easier to remember.
  • Future support – WMIC is deprecated and may be removed; PowerShell is actively maintained.
  • Flexibility – PowerShell can pipe processes, filter by multiple criteria, and integrate with other scripts.
  • Availability – Both are available on all Windows 10 editions by default.

For most users, PowerShell is the better choice because it is more modern and easier to read. However, if you are working on an older script or a system without PowerShell (unlikely), WMIC is still an option.

Safety and Best Practices

Changing process priority is generally safe if you stick to Idle, Below Normal, Normal, and Above Normal. High priority is okay for short bursts, but avoid leaving a process at High for long periods because it can make the system unresponsive. Realtime priority should be reserved for very specific, short-lived tasks, and you should never set system-critical processes (like System or svchost.exe) to Realtime.

Always test priority changes on a non-critical process first. If you are scripting priority changes, include error handling to revert to Normal if something goes wrong. Remember that priority changes do not persist across reboots, so if you need a permanent setting, you must apply it every time the process starts.

Frequently Asked Questions

Can I change priority of a process that is already running?

Yes, both wmic and PowerShell can change the priority of a running process. You just need the process name or PID. The change takes effect immediately and lasts until the process ends.

Does changing priority affect performance for gaming?

Setting a game to High priority can improve its frame rate if the CPU is the bottleneck, but it may cause other background tasks to stutter. It is often better to set the game to Above Normal and leave the rest at Normal. Realtime is rarely needed and can cause issues.

How do I see the current priority of a process?

In Task Manager, go to the Details tab, right-click the column header, and select “Select columns.” Check “Base priority” to display it. In PowerShell, use Get-Process -Name notepad | Select-Object Name, PriorityClass.

Is there a way to set priority for a process every time it starts?

Yes, you can create a scheduled task that runs at logon or when the application starts. The task can run a PowerShell command that sets the priority. Alternatively, you can use a batch file that launches the program and then sets its priority, but that requires the program to be launched from that batch file.

What is the difference between priority and affinity?

Priority determines how much CPU time a process gets relative to others. Affinity determines which CPU cores a process can run on. You can set both from the command line, but they are separate settings.

Can I change priority of a process without admin rights?

For processes that run under your user account, you can change their priority without admin rights. For system processes or processes started by another user, you need administrator privileges. If you get an access denied error, run the command as administrator.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.