Closed
Description
Prerequisites
- Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
- Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Typo in
Get-Foo
cmdlet" instead of "Typo." - Verify Version: If there is a mismatch between documentation and the behavior on your system, ensure that the version you are using is the same as the documentation. Check this box if they match or the issue you are reporting is not version specific.
Links
- https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_requires?view=powershell-7.2#-modules-module-name--hashtable
- https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_using?view=powershell-7.2#module-syntax
Summary
The documentation says that the 3 version keys cannot be used together.
This is incorrect because you can use both the ModuleVersion
and MaximumVersion
keys to specify a minimum and maximum version.
But it is true that you cannot use either of them together with RequiredVersion
.
Details
No response
Suggested Fix
It's also Required to specify at least one of the three keys below.
- ModuleVersion - Specifies a minimum acceptable version of the module.
- MaximumVersion - Specifies the maximum acceptable version of the module.
- RequiredVersion - Specifies an exact, required version of the module. This cannot be used with the other Version keys.