Issues that occur when you install a Management shell with SharePoint Online

Source: Internet
Author: User

Today, I'm going to install the SharePoint Online Management Shell on a new machine, and there are some problems and notes.

First the SharePoint Online Management Shell download Address: https://www.microsoft.com/en-us/download/details.aspx?id=35588

Both the download and installation are smooth, and after the installation is complete, the "as Administrator" opens without prompting the error directly:

"Import-module:the specified Module ' Microsoft.Online.SharePoint.PowerShell '
was not loaded because no valid module file is found in any module directory. "

Error screenshot:



From the error message you can see that the Microsoft.Online.SharePoint.PowerShell module is not found, use Get-module to find out:


It is not found, it is possible to find the path is not correct, use $env:psmodulepath this environment variable to see all the module path:


Sure enough, there is no path to the SharePoint Online Maangement Shell, and the folder where the SharePoint Online Maangement Shell is installed is:


So you need to add this path to the $ENV variable:


And then look it over again to see:


Using the Import-module command to import this module is available:



But using the command line to directly modify the way $env, only temporarily modified, the next time you reopen the SharePoint Online Management Shell, you will also see the same problem of missing module.

A straightforward solution is to add this path to the environment variable as follows:





Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.