'Connect-MsolService' is not recognized as the name of a cmdlet

后端 未结 4 1186
鱼传尺愫
鱼传尺愫 2021-02-09 01:13
        PSCommand commandToRun = new PSCommand();
        commandToRun.AddCommand(\"Connect-MsolService\");
        commandToRun.AddParameter(\"Credential\", new PSCrede         


        
4条回答
  •  心在旅途
    2021-02-09 01:58

    Following worked for me:

    1. Uninstall the previously installed ‘Microsoft Online Service Sign-in Assistant’ and ‘Windows Azure Active Directory Module for Windows PowerShell’.
    2. Install 64-bit versions of ‘Microsoft Online Service Sign-in Assistant’ and ‘Windows Azure Active Directory Module for Windows PowerShell’. https://littletalk.wordpress.com/2013/09/23/install-and-configure-the-office-365-powershell-cmdlets/

    If you get the following error In order to install Windows Azure Active Directory Module for Windows PowerShell, you must have Microsoft Online Services Sign-In Assistant version 7.0 or greater installed on this computer, then install the Microsoft Online Services Sign-In Assistant for IT Professionals BETA: http://www.microsoft.com/en-us/download/details.aspx?id=39267

    1. Copy the folders called MSOnline and MSOnline Extended from the source

    C:\Windows\System32\WindowsPowerShell\v1.0\Modules\

    to the folder

    C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\

    https://stackoverflow.com/a/16018733/5810078.

    (But I have actually copied all the possible files from

    C:\Windows\System32\WindowsPowerShell\v1.0\

    to

    C:\Windows\SysWOW64\WindowsPowerShell\v1.0\

    (For copying you need to alter the security permissions of that folder))

提交回复
热议问题