Link to home
Start Free TrialLog in
Avatar of Mahesh babu
Mahesh babu

asked on

Powershell command for list of e1, E3, F1 users

All,

Need help with. Powershell command

I need to get the output of list of o365 users in our tenant that has e1, E3 and F1 licenses.

Thank you
Avatar of Vasil Michev (MVP)
Vasil Michev (MVP)
Flag of Bulgaria image

There is no server-side to filter them out quickly, you need to get the full user list and filter it client-side. Which in turn means you can simply get the full list, export it to CSV and do the filtering in Excel. Anyway, this will return all the users with specific license:

Get-MsolUser -All | ? {$_.Licenses.AccountSkuId -eq "tenant:ENTERPRISEPREMIUM"}

Open in new window


Rinse and repeat for the other SKUs.
Avatar of Mahesh babu
Mahesh babu

ASKER

@vasil,

Thanks, But I would require a command that can give me an output for all 3 license packs at once
ASKER CERTIFIED SOLUTION
Avatar of Vasil Michev (MVP)
Vasil Michev (MVP)
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Not sure this is what you want but connect to O365 with powershell and run
get-msoluser -all | select Displayname,Licenses
You can pipe it to a text file

You will need to know the SKU that belongs to each level you are looking for. (no easy fix there. Look here

https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/licensing-service-plan-reference

You can see how many are assigned by just running get-msolaccountsku