[Fixed] - The term 'Get-MsolServicePrincipal' is not recognized as the name of a cmdlet, function, script file – PowerShell Error

[Fixed]: The term ‘Get-MsolServicePrincipal’ is not recognized as the name of a cmdlet, function, script file,

No comments

 2,549 total views,  31 views today

When we run the ‘Get-MsolServicePrincipal’ command in Windows PowerShell console we will get the error “Get-MsolServicePrincipal : The term ‘Get-MsolServicePrincipal’ is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.” Or when we run the ‘connect-msolservice’ we will get the error “Connect-MsolService : The term ‘Connect-MsolService’ is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.”

Solution (Fixed):

In order to fix the above error we need to run the below command in order:


Install-Module MSOnline
Install-Module AzureAD
Import-Module AzureAD

See Also:

You may also like the following SharePoint PowerShell tutorials:

Download SharePoint Online & Office 365 Administration eBook

Buy the premium version of SharePoint Online & Office 365 administration eBook from here:



Buy SharePoint Online & Office 365 Administration eBook


 

Get the free demo PDF eBook from here:

FREE DOWNLOAD

Send download link to:

Subscribe to get exclusive content and recommendations every month. You can unsubscribe anytime.