
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Check If a Process Has Exited After Stop-Process in PowerShell
After killing the process using Stop-Process command in PowerShell, you can determine if the process is really terminated from the system with HasExited function.
For example, we will kill Notepad process and check if Notepad process still exists in the system?
$notepad = Get-Process notepad | Stop-Process if($notepad.HasExited){"Process is terminated"} else{"Process is still running"}
Advertisements