{"id":493,"date":"2014-06-17T16:44:00","date_gmt":"2014-06-17T16:44:00","guid":{"rendered":"https:\/\/www.geekmungus.co.uk\/?p=493"},"modified":"2022-11-05T10:53:19","modified_gmt":"2022-11-05T10:53:19","slug":"remove-licence-from-office-365-user","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=493","title":{"rendered":"Remove licence from Office 365 user"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So we had two ways of doing it: 1 was just to remove the service plans we didn&#8217;t need. And the second was to remove the licence as a whole.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You need to run this from within the Office 365 PowerShell console, here&#8217;s a PowerShell script to help you connect quickly and easily:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$cred = Get-Credential\nImport-Module MSOnline\nConnect-MsolService -Credential $cred\n$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/ps.outlook.com\/powershell -Credential $cred -Authentication Basic -AllowRedirection\n$importresults = Import-PSSession $s<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Remove just some service plans<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So here, I&#8217;m going to remove the YAMMER_EDU and MCOSTANDARD (Lync) licences.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$cred = Get-Credential\nImport-Module MSOnline\nConnect-MsolService -Credential $cred\n$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/ps.outlook.com\/powershell -Credential $cred -Authentication Basic -AllowRedirection\n$importresults = Import-PSSession $s<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Remove the licence from the user completely<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-MsolUserLicense -UserPrincipalName \"fred.bloggs@domain.com\" -RemoveLicenses domain:STANDARDWOFFPACK_STUDENT;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now the licence or service plan should be removed, you can check this through the web interface of Office365 admin.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;t need. And the second was to &#8230; <a title=\"Remove licence from Office 365 user\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=493\" aria-label=\"Read more about Remove licence from Office 365 user\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-493","post","type-post","status-publish","format-standard","hentry","category-microsoft-windows"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=493"}],"version-history":[{"count":1,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/493\/revisions"}],"predecessor-version":[{"id":1462,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/493\/revisions\/1462"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}