locked
SharePointOnlineManagementShell error RRS feed

  • Question

  • Hello All, 

    Getting below error when trying to open SharePoint Online Managment Shell.

    Cannot load PSReadline module.  Console is running without PSReadline.

    Import-Module : Errors occurred while loading the format data file:

    C:\Program Files\SharePoint Online Management

    Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.Online.SharePoint.PowerShell.ps1xml, , C:\Program

    Files\SharePoint Online Management

    Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.Online.SharePoint.PowerShell.ps1xml: The file was skipped

    because of the following validation exception: File C:\Program Files\SharePoint Online Management

    Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.Online.SharePoint.PowerShell.ps1xml cannot be loaded. A

    certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider..

    At line:1 char:1

    + Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChec ...

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : InvalidOperation: (:) [Import-Module], RuntimeException

        + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand

    Please suggest.


    Regards, Prashant Please click the 'Mark as Answer' if this post solves your problem or "Vote As Helpful" if it was useful! :)

    Thursday, November 30, 2017 12:35 PM

All replies

  • Try installing 32 bit version. For me it's solved
    Tuesday, December 26, 2017 5:58 PM
  • Use 64-bit Powershell, or as @Joy_at_time_of_his_life stated, install the 32-bit version.

    Version mismatch seems to be most common cause.


    Sleet

    Wednesday, March 21, 2018 9:21 PM
  • I have a brand new PC and was getting this same error - drove me nuts for hours. Here's how I fixed it.

    I located the file referenced in the error: "Microsoft.Online.SharePoint.PowerShell.ps1xml".
    Right click to view properties.
    Go to the Digital Signatures tab - click the signer, then Details button.



    I immediately noticed the same error in the details that the management shell was giving me...
    I Clicked View Certificate to see more...

    Clicking over to the Certification Path tab showed me what the trusting authority was and hopefully give me a clue as to why... It shows the Microsoft Testing Root CA 2010 which I did not have installed
    You can find out by running CERTMGR.MSC and looking in the "Trusted Root Certification Authorities" folder...

    I clicked the "View Certificate" button again to view this new root cert.



    Right in the view is the resolution to the problem...
    I clicked the Install Certificate button and made sure to select the "Trusted Root Certification Authorities" as the location.




    Hope this helps someone...


    Tuesday, June 26, 2018 7:48 PM
  • Thanks much, it did help me..
    Thursday, August 23, 2018 5:28 AM