PowerShellEditAsAdmin.inf

Jan 4, 2010 11:44 GMT  ·  By

Elevation PowerToys are available for Windows administrators working with Windows PowerShell 2.0 Integrated Scripting Environment (ISE), designed to make their jobs easier. Developed by Michael Murgolo, senior consultant, Microsoft Services, U.S. East Region, the Elevation PowerToys for the Windows PowerShell Integrated Scripting Environment is set up to do away with the steps necessary before testing or editing scripts with Administrator privileges. According to Murgolo, admins will need both the PowerShellEditAsAdmin.inf and the Elevate Command PowerToy, in order for the first utility to work.

“If you need to edit/test a script as an Administrator you would need to right click on the start menu icon for the ISE, run it as administrator, open the script in the editor, and navigate the Command Pane to the script’s folder to run it. So I created an Edit as Administrator PowerToy for these file types to shortcut this process,” he explained.

In the package provided by Murgolo, there are two additional PowerToys on top of PowerShellEditAsAdmin.inf, namely PowerShellISEHere.inf and PowerShellISEHereAsAdmin.inf. The remaining tools are provided so that Windows administrators can easily add context menu options such as PowerShell ISE Here and PowerShell ISE Here as Administrator to both folders and drives. The new menu options will allow customers to launch the PowerShell ISE having a specific folder or drive as the ISE current directory.

“When you use the “as Administrator” versions of these PowerToys, you will see the elevation prompt will be for Windows Command Processor (cmd.exe). This happens because I am using the Start command that is built into cmd.exe to launch the ISE and set the working directory,” Murgolo added.

Windows PowerShell 2.0 is a default component of Windows 7 and Windows Server 2008 R2, but Microsoft is also backporting it to Windows Vista, Windows XP, Windows Server 2008 and Windows Server 2003. ISE “enables you to write, run, and test scripts and modules in a graphical environment. It has features such as syntax-coloring, tab completion, visual debugging, Unicode-compliance, context-sensitive Help, and a tabbed/multi-pane user interface,” Murgolo said.

Power Shell ISE Powertoys are available for download here.