powershellpowerbiimport-module

powershell 7 can't install module by install-module command


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.

error screenshot

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.

enter image description here


Solution

  • I have no explanation for your specific symptom, but per your feedback using
    Install-PSResource MicrosoftPowerBIMgmt instead of
    Install-Module MicrosoftPowerBIMgmt solved the problem.