Forum Discussion

Catgm355's avatar
Catgm355
Copper Contributor
Apr 05, 2024

Graph Module on Onedrive Folder not synced

Hello team,

 

I´m trying to run Graph on Powershell but it keeps getting the module from a onedrive folder that isn't synced and can't sync it right now. How can i change the path where powershell/graph is getting the modules?

 

-------------------

Import-Module : Could not load file or assembly 'file:///C:\Users\catarina.machado\OneDrive - Claranet Limited\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Users\1.11.0\bin\Microsoft.Graph.Users.private.dll' or one of its dependencies. The cloud file provider is not running. (Exception from HRESULT: 0x8007016A) At line:1 char:1 + Import-Module Microsoft.Graph.Users + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Import-Module], FileLoadException + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand

 

The correct path is: file:///C:\Users\catarina.machado\OneDrive - Claranet\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Users\1.11.0\bin\Microsoft.Graph.Users.private.dll

 

Thank you.

  • Catgm355 This is because of the Known Folder Move functionality in OneDrive, and the My Documents folder is pointing to My Documents in OneDrive. Stop syncing and/or disabling important folders to OneDrive. This should redirect the My Documents to your User Profile, and you will have to reinstall all modules again that you need. 

    Please click Mark as Best Response & Like if my post helped you to solve your issue.
    This will help others to find the correct solution easily. It also closes the item.

    If one of the posts was helpful in other ways, please consider giving it a Like.

Resources