[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

Loading

The ‘Get-MsolServicePrincipal’ is not recognized – 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): ‘Get-MsolServicePrincipal’ is not recognized

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

Refer to this Microsoft Q & A thread for more detailed explanation: Facing: New-ServicePrincipal : The term ‘New-ServicePrincipal’ is not recognized as the name of a cmdlet, function, script file, or operable program.

See Also: SharePoint PowerShell

You may also like the following SharePoint PowerShell tutorials:

 

Download SharePoint Online PDF Book

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.

 

About Post Author


Discover more from Global SharePoint

Subscribe to get the latest posts sent to your email.

Do you have a better solution or question on this topic? Please leave a comment