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
See Also: SharePoint PowerShell
You may also like the following SharePoint PowerShell tutorials:
- [Verified]: Find all InfoPath forms in SharePoint using PowerShell
- [Verified]: Remove recycle bin items in SharePoint using PowerShell
- [Verified]: Cancel SharePoint workflows using PowerShell
- SharePoint Online: Remove custom app using PnP PowerShell
- Office 365: How to create content type in SharePoint Online using PowerShell?
- Office 365: How to create document library in SharePoint Online using PowerShell?
- Export SharePoint user information list to CSV(Excel) file using PowerShell
- How to fix “The term ‘Get-MsolUser’ is not recognized as the name of a cmdlet”
- How to fix the “The term ‘Get-SPWeb’ is not recognized as the name of a cmdlet, function” PowerShell error
- How to hide quick launch menu in SharePoint online using PnP PowerShell
- Edit user Permission is greyed Out SharePoint Online
- Get workflow inventory from SharePoint online using PowerShell CSOM
- Create a modern team site using PnP PowerShell in SharePoint
- In 2 steps convert a classic SharePoint page to modern using PnP
- SharePoint Online: Delete All Files from document library for the given date – PowerShell CSOM
- Create SharePoint online list using PnP provisioning template
- SharePoint Automation: PowerShell script to get remote server information
- Office 365: Retrieve hub sites and associated sites using PnP Powershell
- SharePoint Online Automation – O365 – Upload files to document library using PowerShell CSOM
- SharePoint Online Automation – O365 – Create multiple items in a list using PowerShell CSOM
- SharePoint Online Automation – O365 – Update document library metadata using PowerShell CSOM
- Get-MsolServicePrincipal in MSDN
![[Fixed]: The term 'Get-MsolServicePrincipal' is not recognized as the name of a cmdlet, function, script file, 3 PDF Download Image](https://i0.wp.com/global-sharepoint.com/wp-content/uploads/2019/08/PDF-Download-Image.jpg?fit=236%2C300&ssl=1)