About
Pricing
Community
Teams
Start Free Trial
Log in
Anthony K O365
asked on
6/29/2015
Office 365 - Removing assigned License from Shared mailboxes using CSV
I am trying to remove Licenses from Shared Mailboxes using the following script:
$AccountSkuId = "Tenant:STANDARDWOFFPACK_I
W_FACULTY"
$Users = Import-Csv "C:\mailbox.csv"
$Users | %{
Set-MsolUserLicense -UserPrincipalName $_.UserPrincipalName -RemoveLicenses $AccountSkuId
}
I get the following 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 absolutely know that the sku is correct. I also closed and re-ran the PS session connecting to Exchange Online. Any thoughts?
Microsoft 365
Powershell
2
1
Last Comment
Anthony K O365
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Vasil Michev (MVP)
6/29/2015
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Anthony K O365
6/30/2015
ASKER
Excellent! Thank you.
Your help has saved me hundreds of hours of internet surfing.
fblack61