![Page 2: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/2.jpg)
AGENDA
The ISE Object Model
Customizing the ISE
Suggested Add-Ons
PowerShell Resources
Q&A
![Page 3: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/3.jpg)
WHO AM I?
Windows PowerShell MVP
PowerShell Author
Windows PowerShell 2.0: TFM (with Don Jones)
Managing Active Directory with Windows
PowerShell: TFM 2nd Ed
Prof. PowerShell
IT trainer and consultant
http://jdhitsolutions.com/blog
http://twitter.com/jeffhicks
Google Plus: Jeffery Hicks
![Page 4: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/4.jpg)
THE ISE OBJECT MODEL
Start with the $PSISE object
$psise | get-member –membertype Property
CurrentPowerShellTab : Microsoft.PowerShell.Host.ISE.PowerShellTab
CurrentFile : Microsoft.PowerShell.Host.ISE.ISEFile
Options : Microsoft.PowerShell.Host.ISE.ISEOptions
PowerShellTabs : {PowerShell 1}
![Page 5: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/5.jpg)
CUSTOMIZING THE ISE
Change panel background colors
Use HTML color codes
..or use primary colors
You also will want to change font style or colors
$psise.options.OutputPaneBackgroundColor="DarkBlue"
$psise.Options.OutputPaneTextBackgroundColor="DarkBlue"
$psise.Options.OutputPaneForegroundColor="#FFFFFFFF"
$psise.Options.CommandPaneBackgroundColor="DarkBlue"
$psise.options.TokenColors["command"]="White"
$psise.Options.FontName = 'Courier New'
$psise.Options.FontSize = 16
If you don't like it, exit and restart the ISE
ISE version of the VIM blackboard theme at http://www.pshscripts.blogspot.com/search/label/ISE
![Page 6: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/6.jpg)
CREATING AN ADD-ON FUNCTION
Function Insert-Author {
#define a text block that will get inserted
$text=@"
<#
Author : Jeffery Hicks
Email : [email protected]
blog : http://jdhitsolutions.com/blog
Created: $(Get-Date -format d)
"Those who forget to script are doomed to repeat their work"
#>
"@
#insert the block in the current file at the current position
$psise.CurrentFile.Editor.InsertText($text)
} #close function
![Page 7: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/7.jpg)
ADD THE FUNCTION TO THE MENU
Each tab has an AddOnsMenu object
Add an entry to the SubMenu object
Specify a name and scriptblock
Shortcut key is optional
$psise.CurrentPowerShellTab.AddOnsMenu.Submenus.Add("Author Comment",{Insert-Author},"Alt+A")
![Page 8: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/8.jpg)
CREATING AN OPTIONAL SUBFOLDER
Create a sub-folder under AddOns
Add items to the sub menu
$mymenu=$psise.CurrentPowerShellTab.AddOnsMenu.Submenus.Add("MyMenu",$null,$null)
$mymenu.submenus.Add("Author Comment",{Insert-Author},"Alt+A")
![Page 9: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/9.jpg)
CUSTOMIZE DEMOS
![Page 10: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/10.jpg)
SUGGESTED ISE ADD-ONS
ISE Pack
ISE Scripting Geek
PSISE Library
ISE-Lines
Auto ISE Preferences
![Page 11: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/11.jpg)
ISE PACK
Toggle comments
Copy colorized script
Show syntax
Snippets
http://archive.msdn.microsoft.com/PowerShellPack
![Page 12: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/12.jpg)
ISE SCRIPTING GEEK
Convert aliases/commands
Convert to text file
Create Help Wizard
Print script
http://jdhitsolutions.com/blog/2011/10/ise-
scripting-geek-module
![Page 13: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/13.jpg)
PSISELIBRARY
Replace-TabsWithSpace
New-CommentBlock
New-Script
New-Function
Add each function to menu with -Installmenu
$True
Some shortcut conflicts
http://gallery.technet.microsoft.com/PSISELibraryp
s1-ec442972
![Page 14: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/14.jpg)
ISE-LINES
Functions for managing lines
Move Up and Down
Duplicate
Join lines
Some shortcut conflicts
http://poshcode.org/1727
![Page 15: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/15.jpg)
AUTO-ISE PREFERENCES
Automatically save ISE configuration options
Add script to PowerShell profile to automatically
restore your last configuration
http://poshcode.org/2230
![Page 16: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/16.jpg)
MORE ADD-ONS
http://social.technet.microsoft.com/wiki/contents/
articles/2969.windows-powershell-ise-add-on-
tools.aspx
http://poshcode.org (search for ISE)
Your ISE profile is the "biggest" add-on you have.
![Page 17: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/17.jpg)
ADDON DEMOS
![Page 18: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/18.jpg)
POWERSHELL RESOURCES
Windows PowerShell 2.0: TFM by Don Jones and
Jeffery Hicks
Windows PowerShell in Action 2nd Ed. by Bruce
Payette
Windows PowerShell Cookbook 2nd Ed. by Lee
Holmes
Windows PowerShell Team blog
(http://blogs.msdn.com/powershell)
The Lonely Administrator
(http://jdhitsolutions.com/blog)
Prof. PowerShell
(http://mcpmag.com/articles/list/prof-
powershell.aspx)
![Page 19: Embrace and Extend the PowerShell ISEjdhitsolutions.com/.../02/Embrace-and-Extend-the-PowerShell-ISE.pdfIf you don't like it, ... Windows PowerShell 2.0: TFM by Don Jones and Jeffery](https://reader034.vdocument.in/reader034/viewer/2022051601/5ae3712a7f8b9a5d648ded64/html5/thumbnails/19.jpg)
QUESTIONS