Function to create an ISE Add-On that will generate comment based help for functions. The functions requires the Show-UI module.
Utils\Add-ScriptHelpISEAddOn.ps1
Add-ScriptHelpISEAddOn [-DllPath] <Object> [-GenerateDll]
Creates an ISE Add-On that integrates itself graphically in a similar way as the built-in Show-Command Add-On (using the VerticalAddOnTools pane) without having to use Visual Studio and writing the code in C#.
#Generate the dll (needed only once)
Add-ScriptHelpISEAddOn -Dll-GenerateDll
#optionally add the following to your profile in order to load the script automaticaly on ISE startup and add an entry in the Add-ons menu
if ($host.Name -eq 'Windows PowerShell ISE Host'){
Add-ScriptHelpISEAddOn -DllPath \<PATH TO GENERATED DLL\>
}
Path of the dll file that the function either generates (using -GenerateDll switch) or loads (see example). Defaults to "$env:USERPROFILE\Desktop\AddScriptHelp.dll".
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: "$env:USERPROFILE\Desktop\AddScriptHelp.dll"
Accept pipeline input: False
Accept wildcard characters: FalseSwitch to indicate whether the function should Generate the dll and run the ISE Add-On or just run the ISE Add-On.(see example)
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False