Azure / azurestack-powershell

AzureStack Hub Operator Powershell Cmdlets
MIT License
16 stars 33 forks source link

Az.Boostrap / Install-AzProfile - PowerShellGet - Parameter typo #119

Closed CHDAFNI-MSFT closed 3 years ago

CHDAFNI-MSFT commented 3 years ago

Typo in module incorrectly refers to PowerShellGet's "AllowPreReleaseVersions" when it instead should be "AllowPreRelease"

When running

Install-AzProfile -Profile 2020-09-01-hybrid -Force

per instructions on Post deployment configurations for ASDK - error message is received:

Install-Package : A parameter cannot be found that matches parameter name 'AllowPrereleaseVersions'.
At C:\Program Files\WindowsPowerShell\Modules\powershellget\2.2.5\PSModule.psm1:9711 char:68
+ ... talledPackages = PackageManagement\Install-Package @PSBoundParameters
+                                                        ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Install-Package], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

PowerShellGet may need to be updated beyond the default OS installed version 1.0.0.1 (latest is currently 2.2.5) in order to support the 'AllowPreRelease' parameter, if true, this should be taken into account for the Install-AzProfile cmdlet.

bganapa commented 3 years ago

@CHDAFNI-MSFT Were you able to workaround the issue here? You are making a point only about the the parameter naming AllowPreReleaseVersions usage instead of AllowPreRelease?

CHDAFNI-MSFT commented 3 years ago

@CHDAFNI-MSFT Were you able to workaround the issue here? You are making a point only about the the parameter naming AllowPreReleaseVersions usage instead of AllowPreRelease?

@bganapa - Correct I am only making an observation of a typo in the code underneath, "AllowPreReleaseVersions", relating to whatever happens after running that line of code. Unfortunately I don't recall my workaround.....

bganapa commented 3 years ago

i just made sure that the module az.bootstrapper is using the AllowPrerelease wherever needed https://github.com/Azure/azurestack-powershell/blob/dev/src/Az.BootStrapper/Module/Az.Bootstrapper.psm1

The typo is likely coming from PowershellGet module itself.