One of the features of PowerGUI is the ability to reset the Powershell Runspace as demonstrated in this article and this article. Is it possible to do this in PowerShell ISE?
To clear the Console pane, you can click the Clear Console Pane icon on the toolbar, or run the command Clear-Host or its alias, cls .
Restarting of the current tabPress <enter> to accept default of “Yes, restart this tab.” All commands available under “Add-ons” menu for the mouse-fixated. These commands are also bound to hot-keys. EDIT: For the time being, the blog's download link for the ISE Session Tools is broken.
In a typical PowerShell session, your console runs in a single runspace. Think of a runspace as a container where everything is stored. Inside of this runspace, code is executed asynchronously. But, PowerShell allows you to create your own runspaces and create as many as you want all at the same time!
Update the Windows of Your System to the Latest Release You may encounter high CPU usage by the PowerShell if the Windows of your system is outdated (as it may cause the incompatibility between the OS modules). In this case, updating the Windows of your system to the latest release may solve the high CPU usage issue.
(I am using PowerShell V3 ISE on the Win8 Release Preview) You can use File>New PowerShell tab to create a new PowerShell runspace inside the ISE
I wrote a module called "ISE Session Tools" to do this a few months back. Essentially the runspace in ISE is equated to a "Tab" container, of which its child documents share the runspace. My script looks at the current open files, remembers them, creates a new Tab (runspace) and closes the old one, then adds the files you had open to the new Tab. Other features:
This can be disabled and manually controlled if desired.
A hint is shown to you reminding you of some of the files you had open. Press <enter>
to accept the default of “Yes, reload my last session.”
Essentially cleaning memory and keeping your files open in the editor. You get prompted for this action. Press <enter>
to accept default of “Yes, restart this tab.”
All commands available under “Add-ons” menu for the mouse-fixated. These commands are also bound to hot-keys.
See: http://nivot.org/post/2011/02/14/MakingWindowsPowerShellISEGoodEnough
EDIT: For the time being, the blog's download link for the ISE Session Tools is broken. The Internet Archive still has a copy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With