Change Office 365 licenses in bulk, respecting the License Options.

This script can be used to change Office 365 licenses in bulk, respecting the previously set License Options. For example; To migrate users from an E1 plan to an E3, while honoring the disabled services in the E1 plan. Also works when the users have more than 1 license assigned.

 
 
 
 
 
4 Star
(9)
2,650 times
Add to favorites
Office 365
1/30/2014
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Bulk changes to specific users
    1 Posts | Last post July 03, 2018
    • Hi there, I love this script and have used it on multiple occasions for tenant-wide licensing changes. I do however face a new challenge where I need to do a bulk change to circa 250 users within a 2,500 user tenant and I was wondering if you had any guidance on how I can target specific, named users with you script? Would creating a variable called $users and piping UPNs from a CSV/TXT file before running the foreach method work?
  • Updates
    2 Posts | Last post January 03, 2018
    • Hi there! I'm wondering if you have been using this recently and if you have found any needed updates in the past three years? Just curious, I'm looking to do something similar to several thousand users. Of course, I'm testing in a sandbox tenant. Thanks again for sharing!
    • I had to build a table to map the old service names to the new ones like:
      
      
      if ($status -eq "Disabled") 
                         {
                         switch ($plan)
                         {
                              "BPOS_S_TODO_1" {$plan = "BPOS_S_TODO_2"}
                              "FORMS_PLAN_E1" {$plan = "FORMS_PLAN_E3"}
                              "STREAM_O365_E1" {$plan = "STREAM_O365_E3"}
                              "Deskless" {$plan = "Deskless"}
                              "FLOW_O365_P1" {$plan = "FLOW_O365_P2"}
                              "POWERAPPS_O365_P1" {$plan = "POWERAPPS_O365_P2"}
                              "TEAMS1" {$plan = "TEAMS1"}
                              "PROJECTWORKMANAGEMENT " {$plan = "PROJECTWORKMANAGEMENT"}
                              "SWAY" {$plan = "SWAY"}
                              "INTUNE_O365" {$plan = "INTUNE_O365"}
                              "YAMMER_ENTERPRISE" {$plan = "YAMMER_ENTERPRISE"}
                              "MCOSTANDARD" {$plan = "MCOSTANDARD"}
                              "BPOS_S_TODO_1" {$plan = "BPOS_S_TODO_2"}
                              "RMS_S_ENTERPRISE" {$plan = "RMS_S_ENTERPRISE"}
                         }