Today I will share with you my powershell command I use to quickly know what licenses are provisioned for a user in office365. It’s faster and saves the time to do it via the admin panel.
First you will need to have Microsoft Azure Active Directory Module installed for your windows powershell. You only need to do this once if you don’t already have this module installed.
To download this Module for your powershell, here is the OS requirements:-
- Windows 10, Windows 8.1, Windows 8 or Windows 7 Service Pack 1 (SP1)
- Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, or Windows Server 2008 R2 SP1
Follow the steps here to install it:- https://docs.microsoft.com/en-us/office365/enterprise/powershell/connect-to-office-365-powershell
Connect to Azure AD for your office365 subscription:-
- In your powershell screen enter the below commands:-
$UserCredential = Get-Credential
Connect-MsolService -Credential $UserCredential
Type your Office 365 Administrator account user name and password, and then click OK. Now you are ready to check user license.
2. Enter the following command:-
(Get-MsolUser -UserPrincipalName myname@company.com).Licenses.ServiceStatus
You can now see the service plans and licenses assigned to the user.