You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Install-PSResource -RequiredResourceFile ignores the prerelease key if set to $true in a psd1 file #1794
run Install-PSResource -RequiredResourceFile test.psd1
Consider that the current prerelease version of PrereleaseTest is 0.0.2-prereleaseaccording to PSGallery.
Expected behavior
import-module prereleasetest; get-module prereleasetestModuleType Version PreRelease Name ExportedCommands---------- ------- ---------- ---- ----------------Manifest 0.0.2 prerelease prereleasetest
Actual behavior
import-module prereleasetest; get-module prereleasetestModuleType Version PreRelease Name ExportedCommands---------- ------- ---------- ---- ----------------Manifest 0.0.1 prereleasetest
Error details
When importing from a json file, though, the prerelease setting is correctly respected.
Environment data
ModuleType Version PreRelease Name ExportedCommands
-----------------------------------------------
Binary 1.1.0 Microsoft.PowerShell.PSResourceGet {Compress-PSResource,Find-PSResource,Get-Instal…
Name Value
---------
PSVersion 7.6.0-preview.2
PSEdition Core
GitCommitId 7.6.0-preview.2
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Activity
o-l-a-v commentedon Jul 7, 2025
If you treat it like a string inside
test.psd1, like so:This is also shown as an example here: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.psresourceget/install-psresource?view=powershellget-3.x#example-5
Then it works:
But using bool, also in a hashtable directly like so:
fails.
Maybe something should be done with the parsing? Would that be here?
PSResourceGet/src/code/Utils.cs
Line 1285 in 06aec34
Or maybe it works as expected?
Add test for PowerShell#1794