-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
I am experiencing a problem with Save-PSResource
. When installing a specific version of a module from a NuGet server, it doesn't take the one specified.
Steps to reproduce:
- Have one powershell module in a NuGet server with two different versions published, like '2024.5.20.1' and 2024.5.20.12'
- Download the module with the cmdlet:
Save-PSResource -Name ExampleModule -Version [2024.5.20.1] -Repository ExampleRepository -Path C:\Users\ExampleUser\Documents -SkipDependencyCheck
Expected behavior
ExampleModule installed in:
C:\Users\ExampleUser\Documents\ExampleModule\2024.5.20.1\ExampleModule.psd1
C:\Users\ExampleUser\Documents\ExampleModule\2024.5.20.1\ExampleModule.psm1
Inside the ExampleModule.psd1, the field ModuleVersion with the correct version, in this case '2024.5.20.1'
Actual behavior
ExampleModule installed in:
C:\Users\ExampleUser\Documents\ExampleModule\2024.5.20.1\ExampleModule.psd1
C:\Users\ExampleUser\Documents\ExampleModule\2024.5.20.1\ExampleModule.psm1
Inside the ExampleModule.psd1, the field ModuleVersion with an incorrect version, in this case '2024.5.20.12'
Error details
No response
Environment data
PSVersion 7.4.2
PSEdition Core
GitCommitId 7.4.2
OS Microsoft Windows 10.0.20348
Platfor Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0....}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response