Exchange Online

Find Exchange Online unlicensed mailboxes

  English

In Office 365, specifically in Admin Center, there is a page that brings us all users information. On that page there is a field of licenses which allow us to verify who is unlicensed and also assign or remove them of the users. I tried to make a filter to query all users who do not have an Exchange Online license. The problem is that the filter did not allow me to add one more condition to return only mailboxes, not just users.

The solution in this case was appealed to a powerful, using the following command:

Get-Mailbox -Resultsize Unlimited | where {($_.recipienttypedetails -ne “Discoverymailbox”) -and ($_.recipienttypedetails -ne “SharedMailbox”) -and ($_.recipienttypedetails -ne “RoomMailbox”) -and ($_.skuassigned -ne “True”)} | ft name,skuassign*

This command lists all Users Mailboxes that have no license. Due the fact that Shared Mailbox and Room Mailbox are mailboxes that do not need licenses, the command will not bring them. If this is your interest, simply remove it from the command.

Note: Remember that migrated users from Exchange On-Prem to Exchange Online has 30 days to be licensed, otherwise the mailbox will become “SoftDeleted” and the user will no longer be able to access the mailbox until the license is assigned. To check for mailboxes under these conditions, use the command:

Get-Mailbox -Resultsize Unlimited -SoftDeletedMailbox

Leave a Reply

Your email address will not be published. Required fields are marked *