Error message when running Update-Module

New Contributor

I'm receiving the following error message when running Update-Module. Any views on how I can fix this?


Update-Module : The 'Update-Module' command was found in the module 'PowerShellGet', but the module could not be loaded. For more 
information, run 'Import-Module PowerShellGet'.
At line:1 char:1
+ Update-Module -Name MicrosoftPowerBIMgmt
+ ~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Update-Module:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule



When I run the suggested follow-up I get this:



Import-Module : The cloud file provider is not running.
At line:1 char:1
+ Import-Module PowerShellGet
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Import-Module], CommandNotFoundException
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand



Many thanks

2 Replies
best response confirmed by neatdot (New Contributor)
Where do you have PowerShellGet installed?

get-module -listavailable -Name PowerShellGet

This could be related to OneDrive
It was indeed. I have 3 OneDrive Business accounts, all of which were set up correctly. However, OneDrive Personal was not running, and my personal OneDrive PowerShell folder was on the $env:PSModulePath path. Reenabling OneDrive Personal solved the problem.