Hello,
I am trying the below script to read a CSV file that contains list of UPNs to bulk remove some Office 365 licenses but it is not successful.
Would someone please take a look and see if something is missed?
Thanks.
import-csv -path "C:\users.csv" | foreach-object {set-msoluserlicense -userprincipalname $_.userprincipalname -removelicenses $_.license}
CSV file contains
UserPrincipleName License
jsmith ITS007149:EXCHANGESTANDARD
sgolden ITS007149:EXCHANGESTANDARD
slee ITS007149:EXCHANGESTANDARD