07-24-2017 09:05 AM
07-24-2017 09:05 AM
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...
07-24-2017 01:12 PMSolution
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.
07-24-2017 01:20 PM
THANK YOU!!!!! :)
I think I can work with that as a base!
08-07-2017 08:50 PM
Have you looked into group-based licensing? Almost everyone I show this to abandons their scripted approach, it's pretty good.
08-08-2017 07:28 AM
While this does look good, it requires a level of Azure access our company does not have. :(