Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

Install-M365DSCDevBranch install errors - AllowPrerelease

Open rpl-io opened this issue 6 years ago • 8 comments

Details of the scenario you tried and the problem that is occurring

Install Install-M365DSCDevBranch

Verbose logs showing the problem

Install-Module : A parameter cannot be found that matches parameter name 'AllowPrerelease'. At C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.20.716.1\modules\M365DSCUtil.psm1:1408 char:113

  • ... ion $dependency.RequiredVersion -Force -AllowClobber -AllowPrerelease
  •                                                      ~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:) [Install-Module], ParameterBindingException
    • FullyQualifiedErrorId : NamedParameterNotFound,Install-Module

Suggested solution to the issue

The DSC configuration that is used to reproduce the issue (as detailed as possible)

# insert configuration here

New installation, closed PowerShell after installing Install-Module Microsoft365DSC -Force

The operating system the target node is running

OsName : Microsoft Windows 10 Pro OsOperatingSystemSKU : 48 OsArchitecture : 64-bit WindowsVersion : 1909 WindowsBuildLabEx : 18362.1.amd64fre.19h1_release.190318-1202 OsLanguage : en-US OsMuiLanguages : {en-US}

Version of the DSC module that was used ('dev' if using current dev branch)

rpl-io avatar Jul 20 '20 08:07 rpl-io

@rpl-io It appears that you may be using an old version of PowerShell. Try updating the PackageManagement component first by running:

Install-Module PackageManagement -Force

Once installed, then try running Install-M365DSCDevBranch again. Please let us know if that solves the issue. Thanks

NikCharlebois avatar Jul 21 '20 11:07 NikCharlebois

Hi Nik,

Unfortunately the same error appears after running Install-M365DSCDevBranch and closing the PS window.

Same issue on multiple PC's

In addition I am also seeing this.

PS C:\Windows\system32> Install-M365DSCDevBranch WARNING: The names of some imported commands from the module 'Microsoft.PowerApps.Administration.PowerShell' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb. WARNING: The names of some imported commands from the module 'SharePointPnPPowerShellOnline' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.

Regards, Remy

rpl-io avatar Jul 21 '20 12:07 rpl-io

The Warnings can be safely ignored. Those are triggered by the PnP and PowerApps modules because they use unapproved verbs.

If you run: (Get-Command Install-Module).Parameters

Do you see the AllowPrerelease parameter listed? If not, what version do you get when running:

Get-Module PackageManagement -ListAvailable | Select Version

NikCharlebois avatar Jul 21 '20 13:07 NikCharlebois

No I don't see it.

Get-Module PackageManagement -ListAvailable | Select Version

Version

1.4.7 1.0.0.1

rpl-io avatar Jul 21 '20 13:07 rpl-io

Ok, let's try updating PowerShellGet then if you don't see it:

Install-Module PowerShellGet -Force

NikCharlebois avatar Jul 21 '20 13:07 NikCharlebois

Install-Module PowerShellGet -Force

results in:

WARNING: The version '1.4.7' of module 'PackageManagement' is currently in use. Retry the operation after closing the applications.

Issue is persistent after reboot and multiple PC's

rpl-io avatar Jul 21 '20 13:07 rpl-io

What OS Version are you using? AllowPrerelease has been part of PowerShell for years now: https://docs.microsoft.com/en-us/powershell/scripting/gallery/concepts/module-prerelease-support?view=powershell-7

NikCharlebois avatar Jul 21 '20 13:07 NikCharlebois

Windows 10 - 1909 Same issue on two PC's Other PC is - Windows 10 - 2004

rpl-io avatar Jul 21 '20 13:07 rpl-io