I updated this post April 7, 2020 to show some command line changes I made as my old commands for Office 365 were not working. Stay safe everyone during this Covid-19 pandemic.
If you are working with Office 365, one of the things you may need to do is provision an account with a subset of the Office 365 plans. For example, I have an E3 plan but I don’t want Skype for business or Exchange email, just Office 365 Pro Plus. (Why you would buy E3 when there is a ProPlus SKU, I don’t know but I’ve had to do this twice this month).
Making a custom plan is pretty straight forward.
First you need to get the account SKUs.
Get-MsolAccountSKu | fl
From there you will see all your SKUs. Use this to get its components:
$ServicePlans = Get-MsolAccountSku | Where {$_.SkuPartNumber -eq “SkuPartNumber”} | ForEach-Object ($_.ServiceStatus)
List the components using $ServicePlans.
Finally make your custom SKU by running:
$MyO365SKU = New-MsolLicenseOptions -AccountSkuId company:EnterprisePack -DisabledPlans Exchange_S_Enterprise, FLOW_O365_P2, POWERAPPS_O365_P2, TEAMS1, PROJECTWORKMANAGEMENT, INTUNE_O365,YAMMER_ENTERPRISE, RMS_S_ENTERPRISE, MCOSTANDARD,SHAREPOINTWAC, SHAREPOINTENTERPRISE, SWAY, Deskless
(Note you can add or remove from that list, whatever you need to to make it work the way you want it to. When new stuff is added to Office 365, note it is added enabled so periodically it makes sense to go through this and clean it up.
Replace company:EnterprisePack with your own SKU and you are off to the races. Final command is to assign it.
Set-MsolUserLicense -UserPrincipalName $upn -AddLicenses company:EnterprisePack -LicenseOptions $MyO365SKU
Set-MsolUserLicense -UserPrincipalName $upn -AddLicenses company:EnterprisePack -LicenseOptions $MyO365SKU
A great walk through can be found at http://exitcodezero.wordpress.com/2013/03/14/how-to-assign-selective-office-365-license-options/comment-page-1/