Writing Help for Dynamic Parameters

Because dynamic parameters can be added to a command from multiple sources, the command author (who writes the help) cannot predict the dynamic parameters that might be available at runtime. Therefore, Get-Help expects dynamic parameters to be documented in the help file for the code that adds the dynamic parameters; not the code that has the dynamic parameters.

This makes sense in theory, but, in practice, it’s not discoverable and it’s very confusing for users.

To write help for the dynamic parameters that you add to cmdlets and functions, you need to sneak it into the description. I’ll show you how. The article ends with suggestions for making this process easier. I welcome your suggestions, too.

Read the full post in the SAPIEN Information Center.

June Blender is a technology evangelist at SAPIEN Technologies, Inc. and a Windows PowerShell MVP. You can reach her at juneb@sapien.com or follow her on Twitter at @juneb_get_help.