ProgressActionPreference¶
In PowerShell 7.4 a new common parameter was introduced called ProgressActionPreference
. You may have noticed that the
parameter is included in the markdown files generated by PlatyPS when you run New-MarkdownHelp
or
Update-MarkdownHelp
when running PowerShell 7.4 or later.
Normally, PlatyPS will group all common parameters together, including ErrorAction
, Verbose
, Debug
, and so on.
They show up at the end of each parameter set as [<CommonParameters>]
and at the end of the list of parameters:
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction,
-InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For
more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
The way PlatyPS determines whether a parameter is a "common parameter" is by checking each parameter name for commands
in your module returned by Get-Help
to see if it matches a name in a hard-coded list of common parameter names in the
file platyPS.psm1
. As of PlatyPS v0.14.2, the list begins on line 104 with Verbose
:
platyPS.psm1 (v0.14.2) | |
---|---|
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
|
Solutions¶
You have roughly four options to deal with this right now:
Ignore it¶
When you consider the time scale between now and the heat death of the universe, this is just a momentary annoyance and it will be resolved with the release of PlatyPS v2 which is in progress.
Actually, I have no insight into the real status of v2. The PowerShell team are pretty great people, and they're also quite busy, so if it doesn't feel like it will be updated before your patience runs out, there are other options...
Use an older PowerShell version¶
This might be your easiest option, assuming you don't depend on features only available in PowerShell 7.4. Simply use an earlier version of PowerShell until the official PlatyPS module is updated.
Fork the module and fix it yourself¶
Finally, you could fork the module and fix it yourself by adding
ProgressActionPreference
to the list of common parameter names in
platyPS.psm1
. You would then need to...
- Publish your own version of it and install it when you need it
- Copy it into your module as a build dependency
- Use the submodules feature in git to reference your forked
PlatyPS repo in your project(s) and make sure to
git submodule init
and reference the module in your workflow(s).