Finding where a running process’s program file is located tells you which executable a process came from, useful for verifying a process is legitimate or locating its installation. PowerShell can reveal the file path TANGKAS39 behind a running process.
The Command
Get-Process notepad | Select-Object Name, Path
What It Does
This gets the Notepad process and displays its name alongside the `Path` property, which is the full location of the executable file that the process is running from. So you see exactly where on disk the program lives, such as C:\Windows\System32\notepad.exe, confirming the source of the running process.
When You’d Use This
This is useful for verifying that a process with a familiar name is running from a legitimate location rather than an unexpected folder, which is a basic security check. It also helps when you need to locate a program’s installation folder, or confirm which executable a running process actually came from when several versions might exist on the system.
Useful Variations
Replace `notepad` with the process you are checking. To see paths for all running processes, run `Get-Process | Select-Object Name, Path`, though some system processes may not expose a path without administrator rights. To find a process by part of its name, use a wildcard like `Get-Process note*`.
If It Doesn’t Work
If the Path appears blank, the process may be a protected system process that only reveals its path when PowerShell runs as administrator, so try an elevated session. If the process is not found, check the name, without the .exe, and that it is currently running. A path in an unusual location, like a temp folder, is worth investigating as it can indicate something suspicious.
Good to Know
Some protected system processes do not reveal their path unless PowerShell runs as administrator, so run it elevated if the Path appears blank. Checking a process’s path is a useful way to verify that a process with a familiar name is actually running from an expected, legitimate location rather than an unusual folder.
Putting It Together
Once you have run it once or twice, this becomes second nature. As part of understanding and controlling what runs on your PC, this command is one you will return to whenever the system feels slow or a program misbehaves. Paired with the related process commands, it gives you a full command-line alternative to Task Manager for diagnosing and managing what is running. Like anything in the terminal, the real value comes from trying it on your own system and adapting the variations above to what you actually need, so it is worth experimenting with in a safe, low-stakes situation before relying on it in a script or during troubleshooting. Keeping a note of the commands you find most useful, along with the variations that fit your workflow, turns scattered one-off tricks into a personal reference you can draw on whenever a similar task comes up again.
