I'm currently working on a script that automatically updates a package with error handling. I also want it to recognize prerelease packages. For that, I'm using the "Get-InstalledModule" command with its switch parameter -AllowPrerelease. But it's just giving me the major releases?
The versions installed:
PS C:\WINDOWS\system32> Get-InstalledModule -Name BcContainerHelper -AllVersions
Version Name Repository Description
------- ---- ---------- -----------
2.0.10 BcContainerHelper PSGallery PowerShell module
2.0.11-preview422 BcContainerHelper PSGallery PowerShell module
2.0.5 BcContainerHelper PSGallery PowerShell module
I want the newest prerelease, but instead it gives me the latest major?
PS C:\WINDOWS\system32> Get-InstalledModule -Name BcContainerHelper -AllowPrerelease
Version Name Repository Description
------- ---- ---------- -----------
2.0.10 BcContainerHelper PSGallery PowerShell module
Is that intended or did I do something wrong?