ISE Plugins
Custom ribbon commands for use in the ISE.
You can include custom ribbon commands in the ISE to aid in improving the script authoring experience.
ISE Plugins

Add a custom plugin

For this example, we wish to have a plugin that analyzes the script and reports on any errors.
Create a new script stored under the following structure:
Analyze Script
The path structure needs to follow [MODULE]/Internal/ISE Plugins/[PLUGIN_NAME]. Here we have X-Demo/Internal/ISE Plugins/Analyze Script.
Use the following sample to fill in the script body.
1
if([string]::IsNullOrWhiteSpace($scriptText)){
2
Show-Alert "Script is empty - nothing to format."
3
exit
4
}
5
6
Import-Module -Name PSScriptAnalyzer
7
Invoke-ScriptAnalyzer -ScriptDefinition $scriptText
Copied!
Now you can run the command from the ribbon and see the results in the ISE.
Example results
Last modified 2yr ago
Export as PDF
Copy link