How to Open Notepad Using PowerShell
Having the ability to open Notepad from PowerShell is extremely useful. It can save you time and energy by allowing you to quickly edit text files without opening the program manually.
In this article, we’ll walk through how to use PowerShell commands to open Notepad.
Once you are in PowerShell environment, you can type in
Start-Process followed by the path of your Notepad executable file.
In this case, we are going to open Notepad where the executable file is physically located at
C:\WINDOWS\system32\notepad.exe, you would type following script into PowerShell.
Start-Process command will launch Notepad immediately.
Another useful command is
Invoke-Item which can also be used to open specific item from within PowerShell. To use this command, simply enter it followed by the path of Notepad executable file.
This will automatically launch Notepad.
Using Call Operator (&)
& can also be used to open Notepad. The pattern is the same with previous example where the operator must be followed by the path to the executable file.
Using Windows PowerShell commands makes opening Notepad incredibly easy and efficient, just remember we can use
Invoke-Item or Call Operator
& command to open the application.