How to force close a program using PowerShell

Windows Articles

How To Install and Configure Master BIND DNS Server On Ubuntu 20.04

Today we are going to learn that how to install and configure Master BIND DNS server on Ubuntu 20.04. As you all know that...

Diskpart is a very useful tool for managing storage in Windows 10.

Hello! Diskpart is an internal tool included in Windows systems that allows you to manage storage units. Indeed, it is possible to manage internal...

How To Install MySQL 8.0 On Ubuntu 20.04

Today we are going to learn that how to Install MySQL 8.0 on Ubuntu 20.04. MySQL is one of the most popular and commonly...

How to Update to MIUI 12 via Fastboot

Greetings friends. The new version of the Android-based operating system MIUI 12 released this year, is still being deployed with some devices missing. On...

How to use modprobe command?

The modprobe command is a Linux administration system created for management, visualization, inclusion and exclusion. From loadable modules to kernel. Also, the Module is...
Mel Khamlichi
Mel Khamlichihttp://www.osradar.com
Founder of Osradar, from Amsterdam Netherlands

How to force close a program using PowerShell

Hi! We have mentioned in the past that Windows allows you to open multiple programs at once. In fact, that is one of the aspects that makes it more attractive to users. Inasmuch as, it makes it possible to use the computer for different tasks. That is, for leisure, work or study. However, these applications can fail or even stop completely. The reasons may be because of inconveniences with the software or incompatibility. It is also possible that it is caused by insufficient hardware resources. In any case, these problems can cause damage to the system. We showed you before how to force the closing of programs using the task manager. However, today we will see how to force close a program using PowerShell.

How to view program PID or process Windows 10

Sometimes, the problem with the program or applications is so strong, that it resists being closed via task manager. In those cases, it is possible to use the PowerShell to force the closing of the program. However, it is necessary to go to the task manager, using any of the methods I detail here. Once there, just right click on some columns in the Processes tab. Then, please activate the PID option.

Enabling the PID in the open processes.
Enabling the PID in the open processes.

As shown in the following image, each open process is with the PID:

How to force application shutdown in Windows 10 from PowerShell

The first thing you have to do is open a PowerShell with administrator privileges. With this in mind, please press the Win+X combination. Once the Quick Link menu is open, select the corresponding option:

Please launch a PowerShell with administrator privileges.
Please launch a PowerShell with administrator privileges.

Stopping a process with PID

After opening the console, it is necessary to use the following syntax.

Stop-Process -Id PID

Please remember to substitute PID for the value of the problem process. Sometimes, the console will ask you to confirm the order.

Stopping a process from PowerShell
Stopping a process from PowerShell

Back to the task manager, you can see that the process is no longer active.

Stop a process using its name

It is also possible to stop a process using its name. With this in mind, please use the following syntax.

Stop-Process -Name process name

Once again, remember to replace the process name with the corresponding value.

Stopping a process using its name in PowerShell
Stopping a process using its name in PowerShell

Force close program

We can use the taskkill command for this purpose. With this in mind, please run taskkill next to the program’s PID to close it:

taskkill /F /PID pid

Again, assign the corresponding PID to the program.

Closing a program
Closing a program

Force close program processes

It is possible to use taskkill to close all processes linked to a program. To do this, run the following:

taskkill /IM program.exe
Force close program processes
Force close program processes

Force close program with name

Another way to close a program is to use its name again. But this time forcing the task. With this intention, execute the following:

Stop-Process -Name program -force

Conclusion

Finally, we have seen how to force close a program using PowerShell. Also, along post we studied several options to close those frozen apps. This option is very useful, when the program refuses to close by the traditional method. All right, this is all for now. See you soon!

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How To Install and Configure Master BIND DNS Server On Ubuntu 20.04

Today we are going to learn that how to install and configure Master BIND DNS server on Ubuntu 20.04. As you all know that...

Diskpart is a very useful tool for managing storage in Windows 10.

Hello! Diskpart is an internal tool included in Windows systems that allows you to manage storage units. Indeed, it is possible to manage internal...

How To Install MySQL 8.0 On Ubuntu 20.04

Today we are going to learn that how to Install MySQL 8.0 on Ubuntu 20.04. MySQL is one of the most popular and commonly...

How to Update to MIUI 12 via Fastboot

Greetings friends. The new version of the Android-based operating system MIUI 12 released this year, is still being deployed with some devices missing. On...

How to use modprobe command?

The modprobe command is a Linux administration system created for management, visualization, inclusion and exclusion. From loadable modules to kernel. Also, the Module is...
x