Here is a script that can be used if you need to bulk change a license subscription from an F1 to E3 for a list of 365 user. In this script the requirement is to remove the license for Office 365 F1 and also Exchange Online (Plan 2) and adds a license for Office 365 Enterprise E3. The second requirement was to turn on E3 but only enable it for some of the services.
To review which services are included with the E3 license subscription I ran the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
Get-MsolAccountSku | ?{$_.AccountSkuId -eq '<tenant>:ENTERPRISEPACK'} | Select -ExpandProperty ServiceStatus ServicePlan ProvisioningStatus ----------- ------------------ BPOS_S_TODO_2 Success FORMS_PLAN_E3 Success STREAM_O365_E3 Success Deskless Success FLOW_O365_P2 Success POWERAPPS_O365_P2 Success TEAMS1 Success PROJECTWORKMANAGEMENT Success SWAY Success INTUNE_O365 Success YAMMER_ENTERPRISE Success RMS_S_ENTERPRISE Success OFFICESUBSCRIPTION Success MCOSTANDARD Success SHAREPOINTWAC Success SHAREPOINTENTERPRISE Success EXCHANGE_S_ENTERPRISE Success |
In the script below I only enable the services for To-Do (Plan 2), Azure Rights Management, Office 365 ProPlus, Skype for Business Online (Plan 2), Office Online, SharePoint Online (Plan 2) and Exchange Online (Plan 2). As you can see the remaining services were all added to the $DisabledPlans variable. You should be able to change this as necessary to meet your needs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
Import-Module MSOnline $cred = Get-Credential Connect-MsolService -Credential $cred $Users = Import-Csv "c:\Scripts\License\users.csv" ForEach ($User in $Users){ $upn = $User.UserPrincipalName $OldLicense1 = "<tenant>:DESKLESSPACK" $OldLicense2 = "<tenant>:EXCHANGEENTERPRISE" $NewLicense = "<tenant>:ENTERPRISEPACK" $DisabledPlans = @() $DisabledPlans += "FORMS_PLAN_E3" $DisabledPlans += "STREAM_O365_E3" $DisabledPlans += "Deskless" $DisabledPlans += "FLOW_O365_P2" $DisabledPlans += "POWERAPPS_O365_P2" $DisabledPlans += "TEAMS1" $DisabledPlans += "PROJECTWORKMANAGEMENT" $DisabledPlans += "SWAY" $DisabledPlans += "YAMMER_ENTERPRISE" $options = New-MsolLicenseOptions -AccountSkuId $NewLicense -DisabledPlans $DisabledPlans Write-Host("User $upn will go from $OldLicense1 and $OldLicense2 to $NewLicense and will have these options disabled: $disabledPlans") Set-MsolUserLicense -UserPrincipalName $upn -AddLicenses $NewLicense -LicenseOptions $options -RemoveLicenses $OldLicense1, $OldLicense2 } |
This script is my version of the TechNet one that changes E1 to E3 licenses. https://gallery.technet.microsoft.com/scriptcenter/Change-Office-365-licenses-e3a26eb0