none
s there a way to bulk remove direct assigned licenses? RRS feed

  • Question

  • When we moved to Office 365 we hired a vendor to help provision our student accounts. They decided to do direct assignment of the licenses (a1 plus) despite being told to use group membership to assign licenses. This has already proven to  be a problem for a number of reasons. However, we have now upgraded from A1 plus for students licenses to A3 for students, which has Exchange online plan 2 included, if I upgrade these accounts to the A3 license via group membership in AD, it causes a conflict because the directly assigned A1plus has Exchange online plan 1 included and the 2 cannot coexist on the same account.

    Is there any way to do a bulk remove of these directly assigned licenses? As it is I will have to go through over 12,000 accounts to remove the A1plus before adding the account to the group that will get the A3 license. I would like to see my family at some point this year so sitting here and manually removing licenses is not on my bucket list.

    There is no option to select all in the license admin console and Microsoft kindly advise there is no option to sort because there are too many accounts.

    Any help on this will save my sanity, and probably my marriage...

    Tuesday, January 29, 2019 11:43 PM

All replies

  • Would the following provide any relief?

    https://docs.microsoft.com/en-us/office365/enterprise/powershell/remove-licenses-from-user-accounts-with-office-365-powershell

    hth
    Marcin

    Wednesday, January 30, 2019 12:04 AM
  • All looked good, read through the info, copied the script, edited it to list the required license SKU and pointed it to the list of UPNs as it said to. Hit Enter and get this:

    Set-MsolUserLicense : Cannot bind argument to parameter 'UserPrincipalName' because it is null.

    Checked everything was as it should be in the docs article you referenced, everything matches but it doesn't like the parameter even though it lists it when I start typing and press tab.

    Wednesday, January 30, 2019 9:29 PM
  • Can you post the script you are using?

    hth
    Marcin

    Wednesday, January 30, 2019 11:53 PM
  • This is taken from the link provided above

    Get-Content "txt file location" | Set-MsolUserLicense -UserPrincipalName $_.UserPrincipalName -RemoveLicenses "license SKU"


    Thursday, January 31, 2019 3:43 PM