Browse Category


Disabling Office 365 Planner Using PowerShell

Office 365 Planner is now rolling out to your tenant.  Microsoft announced this week that Planner is ready for showtime. As this is a product early in its life cycle, Microsoft is still looking for feedback through the Planner uservoice site. Over the next several weeks, Planner will roll out to all eligible Office 365 customers worldwide. At this time, Planner is included with:

  • Office 365 Enterprise (E1, E3, E4, and E5)
  • Office 365 Education (E1, E3, E4, and E5)
  • Office 365 Business Essentials
  • Office 365 Business Premium.

Microsoft Planner will not be available to users by default in the General Availability (GA) update in the following subscription plans:

  • Office 365 operated by 21Vianet
  • Office 365 Government

An important thing to note with this release…

Each user who has one of the Office 365 plans mentioned above has a Microsoft Planner license that is enabled by default.

If your enterprise is not ready, an admin can add or remove licenses for individual users, or to disable Planner to all users. I put a script together that you can run to disable Planner for all licensed users in your tenant.  This script will:

  1. Disable any plan entered into the $disabledplans variable, by default it is just Planner (PROJECTWORKMANAGEMENT)
  2. Disable the Planner Preview SKU if it was assigned
  3. ***Reassign all other services not declared as being disabled.*** <- important  
    • Add any other services you want to disable in the $disabledplans variable (i.e. YAMMER_ENTERPRISE)

Thanks to @vladcatrinescu and his script on disabling Yammer as a starting point

#If you don't know how check out: 
#The initial script was built for Yammer removal by Vlad Catrinescu and can be found here:
#Updated by Drew Madelung to support O365 Planner GA
#This script will go through all licensed users and first check if they have the planner preview license and remove it and then check for the GA O365 planner license and disable it
#This script will re-enable all other services EXCEPT planner, If you want to disable more add them comma seaparated to the $disabledplans variable. 
#For example to disable Yammer and Planner use this: $disableplans = "PROJECTWORKMANAGEMENT", "YAMMER_ENTERPRISE"
#Set disabled plans (only Planner to start)

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

foreach ($user in $users)
 Write-Host "Checking " $user.UserPrincipalName -foregroundcolor "Cyan"
 $CurrentSku = $user.Licenses.Accountskuid
 #If more than one SKU, Have to check them all!
 if ($currentSku.count -gt 1)
 Write-Host $user.UserPrincipalName "Has Multiple SKU Assigned. Checking all of them" -foregroundcolor "White"
 for($i = 0; $i -lt $currentSku.count; $i++)
 #Disable preview planner if it is assigned to this user
 if($currentSku[$i] -like "*PLANNERSTANDALONE*" )
 $pos = $currentSku[$i].IndexOf(":")
 $tenant = $currentSku[$i].Substring(0, $pos)
 $license = $tenant + ":PLANNERSTANDALONE"
 Write-host $user.Licenses[$i].AccountSkuid "has Planner Preview. Will Disable for" $tenant -foregroundcolor "Yellow" 
 Set-MsolUserLicense -UserPrincipalName $user.UserPrincipalName -RemoveLicenses $license
 Write-Host "Planner Preview disabled for " $user.UserPrincipalName " On SKU " $user.Licenses[$i].AccountSkuid -foregroundcolor "Green"
 #Loop trough Each SKU to see if one of their services has the word PROJECTWORKMANAGEMENT inside. This is the service for O365 Planner
 if($user.Licenses[$i].ServiceStatus.ServicePlan.ServiceName -like "*PROJECTWORKMANAGEMENT*" )
 Write-host $user.Licenses[$i].AccountSkuid "has Planner. Will Disable" -foregroundcolor "Yellow"
 $NewSkU = New-MsolLicenseOptions -AccountSkuId $user.Licenses[$i].AccountSkuid -DisabledPlans $disableplans
 Set-MsolUserLicense -UserPrincipalName $user.UserPrincipalName -LicenseOptions $NewSkU
 Write-Host "Planner disabled for " $user.UserPrincipalName " On SKU " $user.Licenses[$i].AccountSkuid -foregroundcolor "Green"
 Write-host $user.Licenses[$i].AccountSkuid " doesn't have Planner. Skip" -foregroundcolor "Magenta"
 $NewSkU = New-MsolLicenseOptions -AccountSkuId $CurrentSku -DisabledPlans PROJECTWORKMANAGEMENT
 Set-MsolUserLicense -UserPrincipalName $user.UserPrincipalName -LicenseOptions $NewSkU
 Write-Host "Planner disabled for " $user.UserPrincipalName -foregroundcolor "Green"