PowerShell is an advanced form of command prompt. It is extended with a huge set of ready-to-use cmdlets and comes with the ability to use .NET framework/C# in various scenarios. Windows includes a GUI tool, PowerShell ISE, which allows editing and debugging scripts in a useful way. If you are using it frequently, you might find it useful to add 'Edit with PowerShell ISE as Administrator' to the context menu.
From the official documentation:
The Windows PowerShell Integrated Scripting Environment (ISE) is a host application for Windows PowerShell. In Windows PowerShell ISE, you can run commands and write, test, and debug scripts in a single Windows-based graphic user interface with multiline editing, tab completion, syntax coloring, selective execution, context-sensitive help, and support for right-to-left languages. You can use menu items and keyboard shortcuts to perform many of the same tasks that you would perform in the Windows PowerShell console. For example, when you debug a script in the Windows PowerShell ISE, to set a line breakpoint in a script, right-click the line of code, and then click Toggle Breakpoint.
Try these features in Windows PowerShell ISE.
- Multiline editing: To insert a blank line under the current line in the Command pane, press SHIFT+ENTER.
- Selective execution: To run part of a script, select the text you want to run, and then click the Run Script button. Or, press F5.
- Context-sensitive help: TypeInvoke-Item, and then press F1. The Help file opens to the Help topic for the Invoke-Item cmdlet.
The Windows PowerShell ISE lets you customize some aspects of its appearance. It also has its own Windows PowerShell profile, where you can store functions, aliases, variables, and commands you use in the Windows PowerShell ISE.
By using the Registry files provided below, you will be able to integrate the elevated PowerShell ISE (both 64-bit and 32-bit) with the File Exporer context menu in Windows 10.
Add Edit with PowerShell ISE as Administrator Context Menu in Windows 10, do the following.
- Download the following Registry files in the zip archive: Download Registry Files.
- Extract them to any folder you like. You can place them right on the Desktop.
- Unblock the *.REG files.
- Double click the "Add Edit with PowerShell ISE as Administrator.reg" file.
- If you are running a 64-bit Windows 10 version, you might want to add the command "Add Edit with PowerShell ISE x86 as Administrator.reg" if you need the 32-bit PowerShell ISE version frequently.
The commands are now available from the context menu of your PS1 files.
The registry files above will add a new entry to the Registry under the key
The entry will launch the main executable file of PowerShell ISE (powershell_ise.exe) using the trick described in the article Start a Process Elevated from PowerShell. This will open PowerShell ISE as administrator for the selected PS1 scripts.
The undo tweak is included.
Articles of interest:
- Create Shortcut to Run a PS1 PowerShell File in Windows 10
- Generate QR Code with PowerShell in Windows 10
- Find Your Windows Upgrade History with PowerShell
- Create Windows 10 Bootable USB Stick With PowerShell
- Get amount of words, chars and lines in a file using PowerShell
- Add PowerShell As Administrator Context Menu in Windows 10
- Add PowerShell file (*.ps1) to New Context Menu of File Explorer
- Get File Hash With PowerShell in Windows 10
- How To Restart Computer with PowerShell
- Start a Process Elevated from PowerShell
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options: