ISE Addons, PowerShell, Scripting
Leave a comment

PowerShell ISE Addon: Reset all ISE preferences

Ever since PowerShell v3.0 CTP build got released, I am using ISE as my primary script editor. I keep changing preferences such as colors, etc. The new feature in ISE v3 remembers the changes made to ISE options. While this is quite useful, sometimes resetting all the changes we did can become painful. I need to use Tool->Options dialog and then click the ‘Restore Defaults‘ button Or we can use the $psise.Options.RestoreDefaults() method. I am not sure of any other method unless I missed it in the RTFM! So, I created some script block around the $psise.Options.RestoreDefaults() method and added that to my ISE addons menu for easy access. Here is the code I have:

This is it. Whenever I press Alt+R, I get a simple dialog asking for confirmation and then resets all the options if I click yes.

ISE Reset Options - Confirm Dialog

ISE Reset Options - Confirm Dialog

Filed under: ISE Addons, PowerShell, Scripting

by

Ravikanth is a principal engineer and the lead architect for Microsoft and VMware virtualized and hybrid cloud solutions within the Infrastructure Solutions Group at Dell EMC. He is a multi-year recipient of Microsoft Most Valuable Professional (MVP) award in Windows PowerShell (CDM) and Microsoft Azure. Ravikanth is the author of Windows PowerShell Desired State Configuration Revealed (Apress) and leads Bangalore PowerShell and Bangalore IT Pro user groups. He can be seen speaking regularly at local user group events and conferences in India and abroad.