Pattern for sharing parameter definitions across many functions

Viewed 76

I'm authoring a PowerShell module with a bunch of different functions that share a common set of parameters. With all the parameter metadata, these functions are becoming rather tough to manage. One small change to a parameter, adding a new parameter, or removing a parameter, means that I have to go update a bunch of different function files.

Aside from templatizing code / code-gen, does anyone have a recommended pattern for sharing parameter definition blocks across many functions in PowerShell?

2 Answers
Related