Forum Discussion

TonyRedmond's avatar
Aug 18, 2021

How to Remove a Single Service Plan from Multiple Microsoft 365 Accounts with PowerShell

 

In this post, we describe how to use PowerShell to remove a single service plan from Microsoft 365 licenses using PowerShell. The script can remove any service plan from any SKU (license) in a tenant. You might want to do this to disable access to an obsolete feature (like Sway) or to prevent access to a new feature until the organization is ready to support user activity.

 

https://office365itpros.com/2021/08/18/how-to-remove-single-service-plan-from-multiple-microsoft-365-accounts-with-powershell/

  • muhamedrafeeq's avatar
    muhamedrafeeq
    Brass Contributor
    Hi Tony,
    I work in a school enviornment and the students are assigned with one of the below license. I want to disable the Teams service plan from the students account listed in a csv file. Students UserPrincipalName are saved in this location: C:\Data\StudentsToDisable.CSV. I have to enable the Teams license on a later stage.

    Can you please help me with the powershell script to disable and enable Teams license for the students in the CSV file.

    SkuPartNumber ServicePlans
    'M365EDU_A5_STUUSEBNFT' - Teams1
    'STANDARDWOFFPACK_STUDENT'- Teams1
    'M365EDU_A3_STUUSEBNFT'- Teams1
    'STANDARDWOFFPACK_IW_STUDENT'- Teams1

    Kind regards,
    Muhamed Rafeeq
    • TonyRedmond's avatar
      TonyRedmond
      MVP
      You asked the same question on Practical365.com and I responded then. I'm unlikely to change the answer in a different site.
      • muhamedrafeeq's avatar
        muhamedrafeeq
        Brass Contributor
        Dear Tony,

        I am extremely sorry for the inconvenience. To be honest, I didnt recieve any notification for your reply from practical365.com and I am not able to go to that particular post/reply. Once again sorry.

Resources