February 6th, 2016

PowerTip: Open a script in PowerShell ISE

Doctor Scripto
Scripter

Summary: Automatically open a script in the Windows PowerShell ISE.

Hey, Scripting Guy! Question How can I automatically open a script in the Windows PowerShell ISE from within a script?

Hey, Scripting Guy! Answer Use the Windows PowerShell ISE automation model, and use the Add method for the Files collection on the current PowerShell tab, for example:

$psISE.CurrentPowerShellTab.Files.Add(“C:\fso\backup.ps1”)

 

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.