Windows PowerShell ISE screenshot capture
This function makes a screenshot of ISE. It sends the ALT-PRINTSCREEN keystroke to capture the active window into memory and opens MSPaint.exe so you can paste the capture into, it also registers CTRL+1 as a shortcut key.
Paste the code into ISE and run it:
- function Capture-ISEScreen
- {
- [System.Windows.Forms.SendKeys]::SendWait("%{PRTSC}")
-
- }
-
-
- $null = $psIse.customMenu.subMenus.add("Capture-ISEScreen",{Capture-ISEScreen},"CTRL+1")
The “Custom” menu updates and now shows the function name and shortcut key. Now simply press CTRL+1 to capture the editor window.
