I am trying to an-assign a bulk of user’s licenses from our Office365.
That is what I tried to do:
$csv1 = import-csv | select -expandProperty name
Set-MsolUserLicense -UserPrincipalName $csv1 -RemoveLicense “domain:STANDARDPACK”
When I had only ONE user on the CSV file, IT WORKED! But when I tried to add more users to the exact file and in the exact same list, the command fails and give me this error:
Set-MsolUserLicense : Unable to assign this license because it is invalid. Use the Get-MsolAccountSku cmdlet to retrieve a list of valid licenses.
I doubled checked and made sure it is indeed the correct license (domain:StandartPack)
What else can I do? How can I make it work?