Disable Yammer Licenses in Office 365 with PowerShell

Disable Yammer Licenses in Office 365 with PowerShell

On February 2nd 2016, Microsoft did a surprise blog post to Office 365 admins to announce that starting the same day, Microsoft will automatically activate Yammer on every new and existing tenant. Compared to most Office 365 services like Exchange, SharePoint and Skype for Business, enterprises didn’t always want to add a social network for their users. Furthermore, since Yammer is currently only hosted in the United States, some enterprises don’t want their data hosted in the US for multiple reasons.

That is why I made this PowerShell script that will disable Yammer licenses for all your users so you don’t have to do it by hand. This script will loop trough all your licensed users, and disable Yammer. The Script supports different SKU for each user, so if your users will be assigned the same license, but without Yammer inside. Make sure you are connected to Office 365 before running the script as I didn’t include that part! If you don’t know how to connect to Office 365, check out the tutorial on the PowerShell Portal. You might also be interested in learning more about PowerShell for Office 365 to better understand the script, and be able to make your own. Check out my Pluralsight course on PowerShell for Office 365 to become a pro!

PowerShell For Office 365

I also have added a cool output so you can see what the script is up to. Here is a screenshot of what it looks like when it runs!

Disable Yammer Licenses in Office 365 with PowerShell

You can find the script below, or you can download it from the TechNet Gallery here: https://gallery.technet.microsoft.com/Disable-Yammer-in-Office-432f584d 

NOTE: If you have an EDU tenant, you will need to change “YAMMER_ENTERPRISE” to “YAMMER_EDU” . Thanks to Maurits Knoppert for the tip!


Follow me on Social Media and Share this article with your friends!

Leave a comment and don’t forget to like the Absolute SharePoint Blog Page   on Facebook and to follow me on Twitter here  for the latest news and technical articles on SharePoint.  I am also a Pluralsight author, and you can view all the courses I created on my author page.
No ratings yet.

Please rate this


Hi Vlad,

I can see this will be useful for some people but I’m worried that it might, in some cases, have some unintended consequences: The “-DisabledPlans” parameter of the “New-MsolLicenseOptions” cmdlet needs to contain all disabled plans – if you put Yammer in there alone, it’ll set all other plans to their defaults of enabled. My concern is that customers may have disabled other plans and by running this script they will undo those changes.

A better approach would be to iterate over each user’s current licensing options and build a list of currently disabled plans, (if any), then add Yammer to that list before setting their license options. The PowerShell example in the documentation does this: https://support.office.com/en-us/article/Manage-Yammer-user-licenses-in-Office-365-34a67e3a-3fd8-4e54-bffb-dd5ad0e48590?ui=en-US&rs=en-US&ad=US


You are right Barney, I will update to put a note about it!

Just an FYI to anyone looking for the note mentioned above, you separate desired plans with commas:


FYI: -DisabledPlans YAMMER_ENTERPRISE,SWAY is wrong. Put a space after the comma or it will reject the change.

I am trying to run this script to remove Yammer Licenses in bulk. However get a message saying Warning : Please mention the Max or ALL parameter. Can you help ?

Use Get-MSOLUser -Limit All

How would I do the opposite and turn on Yammer for everybody?


Hi. When the script run I receive the following info:
PS C:\> $users = Get-MsolUser | Where-Object {$_.isLicensed -eq $true}
More results are available. Please specify one of the All or MaxResults parameters.
What’s the problem?
Please, I don’t know the PowerShell command, can you write me whatI have to do?

$users = Get-MsolUser -Limit All | Where-Object {$_.isLicensed -eq $true}

Leave a Reply