SOLVED

need to remove new O365 service in license without affecting services already in place

Copper Contributor

I have a mandate from my Director to turn off all new O365 services that are released (if possible) at the user level so they can be turned on at pilot levels for testing before we make available to everyone. This is easily enough done by running a set-msoluserlicense script and setting all the disabled license options.

Problem comes in where I now have many users with enabled services (such as Teams) that the rest of the 20k+ mailboxes have turned off. I also have many OTHER users with enabled services (such as Planner/Sway) enabled that everyone else has turned off.

 

So now, I have to turn off Forms. If I run through my usual script I am going to be turning off ALL services for everyone. I need to be able to maintain existing license service structure for users but turn off only FORMS for everyone.

 

Here is a sampling of the "meat" of what I'm running... please presume proper designations for variables outside of this sampling.

$LicOpt = New-MsolLicenseOptions -AccountSkuId "mytenant:enterprisepack" -DisabledPlans ”SWAY”,"DESKLESS","TEAMS1","FORMS_PLAN_E3","FLOW_O365_P2","POWERAPPS_O365_P2","PROJECTWORKMANAGEMENT"

Set-MsolUserLicense -UserPrincipalName $mbx -AddLicenses "mytenant:ENTERPRISEPACK" -LicenseOptions $LicOpt

 

I have been thinking to build an array for each user (though this would add considerable time to running the script), pull their list of services and remove them from the list of $LicOpt then apply. But this part of scripting eludes me. Any help/suggestions/directions to an already built wheel would be great appreciated...

4 Replies
best response confirmed by Julie Lothrop (Copper Contributor)
Solution

Take a look at this script: https://blogs.technet.microsoft.com/cloudpfe/2014/01/30/how-to-change-office-365-licenses-in-bulk-re...

 

The idea is very similar to what you are asking, it needs some minor adjustments to make it work when NOT changing the SKU.

THANK YOU!!!!! :)

 

I think I can work with that as a base!

 

Julie

Have you looked into group-based licensing? Almost everyone I show this to abandons their scripted approach, it's pretty good.

 

https://practical365.com/blog/simplifying-office-365-license-control-azure-ad-group-based-license-ma...

While this does look good, it requires a level of Azure access our company does not have. :(

1 best response

Accepted Solutions
best response confirmed by Julie Lothrop (Copper Contributor)
Solution

Take a look at this script: https://blogs.technet.microsoft.com/cloudpfe/2014/01/30/how-to-change-office-365-licenses-in-bulk-re...

 

The idea is very similar to what you are asking, it needs some minor adjustments to make it work when NOT changing the SKU.

View solution in original post