I was wondering how to open a file with notepad or, if possible, notepad++ from a non-elevated mode in Windows PowerShell. By this I mean, how can I open a file using a command like notepad $profile without having to first have started the current session with administrative privileges? Also, instead of using notepad, will it be possible to use a different program like notepad++ instead?
I was wondering how to open a file with notepad or, if possible, notepad++
Share
Use
Start-Processwith theRunAsverb:This will run notepad elevated.
To use a different program just specify it’s path instead of notepad.