Install-M365DSCDevBranch install errors - AllowPrerelease
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 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
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
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
No I don't see it.
Get-Module PackageManagement -ListAvailable | Select Version
Version
1.4.7 1.0.0.1
Ok, let's try updating PowerShellGet then if you don't see it:
Install-Module PowerShellGet -Force
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
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
Windows 10 - 1909 Same issue on two PC's Other PC is - Windows 10 - 2004