How to get a list of Products & licensed Users in Office365 using PowerShell

preview_player
Показать описание
How everyone,
In this video, I will show how to use PowerShell to get the list of licensed users with specific products. Let's say you have 300
users in your O365 tenant, and one day, your manager asks you to get a list of users using Visio. You can get the information
from the O365 admin center, but it won't be easy. Instead, you can use PowerShell.
In Office 365 and Azure, you see the product name such as Office 365 business Premium, but in PowerShell, the product name is different and less friendly. For example, Office 365 Bussiness Premium is called SPB. I included a URL in the description; please check.

Product names and service plan identifiers for licensing

A Few Sample commands:

#Microsoft 365 Business Premium
Get-MsolUser | Where-Object {($_.licenses).AccountSkuId -match "SPB"} | Sort-Object -Property UserPrincipalName

#VISIO ONLINE PLAN 2
Get-MsolUser | Where-Object {($_.licenses).AccountSkuId -match "VISIOCLIENT"} | Sort-Object -Property UserPrincipalName

#Microsoft Exchange Essentials
Get-MsolUser | Where-Object {($_.licenses).AccountSkuId -match "EXCHANGE_S_ESSENTIALS"} | Sort-Object -Property UserPrincipalName

#Microsofr Flow Free
Get-MsolUser | Where-Object {($_.licenses).AccountSkuId -match "FLOW_FREE"} | Sort-Object -Property UserPrincipalName

#Microsoft Business Center
Get-MsolUser | Where-Object {($_.licenses).AccountSkuId -match "MICROSOFT_BUSINESS_CENTER"} | Sort-Object -Property UserPrincipalName

#Microsoft PowerBI
Get-MsolUser | Where-Object {($_.licenses).AccountSkuId -Match "Power_BI_STANDARD"} | Sort-Object -Property UserPrincipalName

#Microsoft 365 Business Basic
Get-MsolUser | Where-Object {($_.licenses).AccountSkuId -match "O365_BUSINESS_ESSENTIALS" } | Sort-Object -Property UserPrincipalName

#MS Project Plan 3
Get-MsolUser | Where-Object {($_.Licenses).AccountSkuId -match "PROJECTPROFESSIONAL"} | Sort-Object -Property UserPrincipalName

#Archivbing for Exchange Online
Get-MsolUser | Where-Object {($_.Licenses).AccountSkuId -match "ExchangeArchive_ADDON"} | Sort-Object -Property UserPrincipalName

#Exchange Online Plan 1
Get-MsolUser | Where-Object {($_.Licenses).AccountSkuId -match "EXCHANGESTANDARD"} | Sort-Object -Property UserPrincipalName

#office365 #powershell #howto #microsoft
Рекомендации по теме
Комментарии
Автор

I am trying to find a way to list all users and what apps they are assigned. The apps under "Applications" in azure AD. The command for all users and for example a "searchbase" for a spesific OU under the domain. Does anybody know how to? Sorry for my bad language.

magnushyem
Автор

how to get other then specific license users details in powershell

manoharkota
Автор

this kinda worked for me. i think the issue is i have 155 users with a SPB license so it wont display them all. i get a message pop up that says "WARNING: More results are available. Please specify one of the All or MaxResults parameters."

i dont understand where in the thread to input all or maxresults to get the full list. can you advise ?

daniel
Автор

Any cmd when the license was assigned to a user??

babajikathullu