platyPS icon indicating copy to clipboard operation
platyPS copied to clipboard

PlatyPS needs to create help for dynamic parameters

Open zjalexander opened this issue 8 years ago • 5 comments

See https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/16304866-custom-cmdlet-help-is-broken-in-5-0 and https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/15487152-help-for-documentencryptioncert-dynamic-parameter

zjalexander avatar Dec 14 '16 01:12 zjalexander

What exactly support for dynamic help means? Can you elaborate please.

vors avatar Dec 21 '16 14:12 vors

Providers can have different parameter sets for some cmdlets, such as the Certificate provider or the Registry provider. That is defined in an XML section. Our current solution to generate help for this set of content is to copy the XML out of one file and paste it into the latest version of help. As the UserVoice entries indicate, this is .... not scaling successfully.

cc @joeyaiello and @juneb to both check my accuracy and because they are interested in this

zjalexander avatar Jan 03 '17 18:01 zjalexander

Almost! Providers can add parameters to a cmdlet dynamically. To cover this in help, we added custom cmdlet help for providers and nested it in provider help XML. To make it work, the provider has to implement the ICmdletProviderSupportsHelp interface. I think all of the core providers did that by the close of 3.0.

https://blogs.msdn.microsoft.com/powershell/2009/05/28/adding-custom-cmdlet-help-for-providers/

Back in 3.0, I used a web-based tool (Wassim's?) to write and generate the custom cmdlet help for each provider. Then, I wrote a script that added the provider help to each cmdlet help XML file. It should be in the directory of help automation scripts that I left.

Let me know if you need anything else.

juneb avatar Jan 04 '17 21:01 juneb

Related to #111

BernieWhite avatar Dec 14 '17 02:12 BernieWhite

Our current standard is to document all parameters for all supported providers. The documentation indicates which provider the parameter comes from. We need a way for PlatyPS to discover the dynamic parameters during new and update workflows.

sdwheeler avatar Apr 04 '22 19:04 sdwheeler