Customizing Graphical PowerShell/ISE

Graphical PowerShell, also known as the PowerShell Scripting Environment (ISE) can be customized using an object model.

There is a variable called $psISE in the ISE.

   1: PS >$psise | gm | select Name
   2:  
   3: Name                                                                           
   4: ----                                                                           
   5: Equals                                                                         
   6: GetHashCode                                                                    
   7: GetType                                                                        
   8: ToString                                                                       
   9: CurrentOpenedFile                                                              
  10: CurrentOpenedRunspace                                                          
  11: CustomMenu                                                                     
  12: OpenedRunspaces                                                                
  13: Options              

In there we have options, customMenus, and a number of other cool things. Here we can change the Scripting Pane color to “black”

image

Comments (1) -

Bernd Kriszio 12/27/2008 5:12:42 PM

Thanks Andy.
This helped me to adjust my prompt function for ISE.
Now I'm guessing if there is a way to use $psise.CustomMenu to add CommentBlock and UnCommentBlock commands.

Comments are closed