Jun 14 2017
03:52 AM
- last edited on
Feb 07 2023
07:46 PM
by
TechCommunityAP
Jun 14 2017
03:52 AM
- last edited on
Feb 07 2023
07:46 PM
by
TechCommunityAP
I want a powershell script where if i enter the Active directory group; it recursively checks each member ifor office 365 e3 enterprise license.
Is there a link or script which i can make use of.
thanks
Jun 14 2017 03:54 AM
Hi Joleneyes,
This could help you. https://docs.microsoft.com/en-us/azure/active-directory/active-directory-licensing-group-advanced
Jun 14 2017 08:55 AM
HI,
this is not exactly what i am looking for.
Is there a way to check if an user has the e3 enterprise license using powershell.
If thats possible, i can iterate over a group and get the members to check for e3 license.
thanks
Jun 14 2017 11:21 AM
Here's a quick example:
Get-MsolGroupMember -GroupObjectId 9e629d33-d655-440c-89af-15738e59e667 | % {Get-MsolUser -ObjectId $_.ObjectId | ? {$_.Licenses.AccountSkuId -eq "tenant:ENTERPRISEPACK"} }
where you need to replace the group's objectID and the SKU for your tenant's E3 pack. If you want to use on-prem AD group instead, use the Get-ADGroup cmdlet and the user's UPN instead.