I installed latest powershell 7 on my laptop windows 10 enterprise;
tried to install a module by: install-module MicrosoftPowerBIMgmt but
got below error;
Any information is much appreciated.
I tried to follow the prompts to install "NuGet provider", but also getting errors.
thanks mklement0 providing the information for install-psresource; But why install-module is not working in my powershell 7? tried to figure this out, is it because I have both powershell 5.1 and powershell 7 installed? see below "get-module -ListAvailable PowerShellGet" output.


I have no explanation for your specific symptom, but per your feedback using
Install-PSResource MicrosoftPowerBIMgmtinstead ofInstall-Module MicrosoftPowerBIMgmtsolved the problem.Install-PSResource, from thePSResourceGetmodule, is the successor toInstall-Moduleand ships with PowerShell (Core) 7.4+.However, you can install it on demand from the PowerShell Gallery in older versions, including Windows PowerShell, too (e.g., with
Install-Module Microsoft.PowerShell.PSResourceGet)At some point in the future, Windows itself will ship with this module so that it will be available by default in Windows PowerShell too - see this PowerShell Team blog post for more information.
Unlike
Install-Module,Install-PSResourceis actively maintained, and is worth trying whenever specificInstall-Modulecalls fail.