PowerTip: Open a script in PowerShell ISE

Doctor Scripto

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”)

 

0 comments

Discussion is closed.

Feedback usabilla icon