Jun 29 2018
05:06 AM
- last edited on
Feb 06 2023
03:25 AM
by
TechCommunityAP
Jun 29 2018
05:06 AM
- last edited on
Feb 06 2023
03:25 AM
by
TechCommunityAP
At this link Microsoft shares an possibility as in a PowerShell to manage or rather remove directly assigned license to users provided you have added the users who have specific license directly assigned to a Group and this Group has been assigned the same license as the command / script requires group ID or object ID for the group to be specified in the script
https://docs.microsoft.com/en-us/azure/active-directory/active-directory-licensing-ps-examples
However the issue this only works if your users dont have any other license packs assigned,
If your users have another license packs assigned it skips the removal of direct license assignment with similar or following message
User has extra plans that may be lost - license removal was skipped. Extra plans: BI_AZURE_P2
Is there a way this can be achieved even when there are other license packs assigned to the user
BR,
/HS
Jun 29 2018 10:27 AM
The cmdlets you have to use is the same in all cases:
Set-MsolUserLicense -ObjectId $user.ObjectId -RemoveLicenses $skuId
The script in that article simply check whether there are more than one SKU assigned to that user, and if so skips the user. You can run the cmdlet manually or amend the script to account for the scenario where more than one SKU is assigned.
Jun 29 2018 11:42 AM
could you please share the details on this scenario with examples
say i there are 100 users with multiple license packs out which i have assigned them the same license via group also now i need remove the directly assigned license now could you list the steps with exact commands i have to run one by one ......
and the same can be used to build a license report showing all the license packs assigned directly or being inherited via group also showing the various application enabled under each license pack
BR,
/HS
Apr 17 2020 01:07 AM