Disable Skype for Business for O365 Users with PowerShell

There’s an excellent write-up for this here:

https://community.office365.com/en-us/w/manage/2603

Follow the above, it works. Following are just a few clarifications on a few of the steps for the “Disable Skype for Business” section.

  • In step 1, it has a command where you need to supply the “AccountSkuId”. Note that it explains how to get this in the previous section:
    • Get-MsolAccountSku | Format-Table AccountSkuId, SkuPartNumber
    • This command lists the AccountSkuId in the left-hand column of the output of this cmdlet. My output in my developer tenant has two values:
      • contoso:DEVELOPERPACK
      • contoso:POWER_BI_STANDARD
    • This matches what is seen in the browser when looking at license info for a given user:

o365 licenses

  • The last part of the command is “-DisabledPlans MCOSTANDARD”. Again, look above to get the instructions on how to determine the value for this argument. This command indeed disables Skype for Business (MCOSTANDARD), but you can disable the other services as well. Just look at step two in the previous section. Though, the list of services it provides that can be disabled has changed since this article was published, and is likely to change again. So don’t rely on the list, and instead run the “Get-MsolAccountSku” command that is listed below that list. When I run it on my developer tenant, I get:
    • SWAY
    • INTUNE_365
    • OFFICESUBSCRIPTION
    • MCOSTANDARD
    • EXCHANGE_S_ENTERPRISE
    • SHAREPOINTWAC_DEVELOPER
    • SHAREPOINT_S_DEVELOPER
  • In the browser, when I click the arrow next to “Microsoft Office 365 Developer”, the following is displayed:

o365 licenses_expanded

  • Again, this matches with the PowerShell output, though the names are a bit different. To confirm the license names that appear in PowerShell? Good question. I didn’t find a reference with all possibilities listed. Though, if you do a view source in the browser on the above page, and check the source for the individual checkboxes, the license names are the values of the inputs:

o365 licenses_source

  • One more note, the command to disable licenses works, but how to re-enable them? Well, the –DisabledPlans argument is optional, run the commands again without that argument:

$LicenseOption = New-MsolLicenseOptions -AccountSkuId contoso:DEVELOPERPACK
Get-MsolUser | Set-MsolUserLicense –LicenseOptions $LicenseOption

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s