Remove licence from Office 365 user

posted 27 May 2015, 01:08 by Tristan Self
In our case, we were needing to remove some licences from some users, as we had an educational licence, the names of the service plans and licenses were a bit different.

So we had two ways of doing it: 1 was just to remove the service plans we didn't need. And the second was to remove the licence as a whole.

You need to run this from within the Office 365 PowerShell console, here's a PowerShell script to help you connect quickly and easily:

$cred = Get-Credential
Import-Module MSOnline
Connect-MsolService -Credential $cred
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri
https://ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection
$importresults = Import-PSSession $s

1. Remove just some service plans

So here, I'm going to remove the YAMMER_EDU and MCOSTANDARD (Lync) licences.

$O365Licences = New-MsolLicenseOptions –AccountSkuId domainname:STANDARDWOFFPACK_STUDENT -DisabledPlans MCOSTANDARD,YAMMER_EDU

Set-MsolUserLicense -UserPrincipalName "fred.bloggs@domain.com" -LicenseOptions $O365Licences

2. Remove the licence from the user completely

Set-MsolUserLicense -UserPrincipalName "fred.bloggs@domain.com" -RemoveLicenses domain:STANDARDWOFFPACK_STUDENT;

Now the licence or service plan should be removed, you can check this through the web interface of Office365 admin.
Comments