This add-on from James Brundage (from www.start-automating.com) lets you easily fine-tune the PowerShell host right in the PowerGUI Script Editor.
1. Download the PowerShell Preferences add-on from here,
3. Extract it to the My Documents \WindowsPowerShell \Modules folder,
4. In Script Editor’s File / PowerShell Libraries dialog box, select PowerShellPreferences.
And you will get this panel in the script editor, allowing you to change all the internal settings of the PowerShell host:
- Command history size,
- Error history size,
- Mail server for send-mailmessage,
- Strict mode (automated checking for variable initialization, etc.),
- What-if mode (automatically running all cmdlets with -whatif flag),
- Error level,
- Warning level,
- Debug level,
- Verbose message level,
- Progress message handling.
Combined, these give you incredible control over the way that PowerShell works – which in turn can help a lot when debugging your PowerShell scripts.
Happy scripting!
Dmitry