SharePoint Pals
 | Sign In
How to block or disable Office 365 Services
by Sriram Varadarajan 10 Jan 2017
Author
Enterprise Architect
Visits   
Today  :   29     Total  :    429

We don’t have any clear mechanism to disable POWER APP and MS FLOW from the ADMIN Centre of Office 365, as MS as moved these two services under E 4 license

The below PowerShell script would help disabling those:

 import-csv calip.csv | foreach-object {     // Input UPN name from the file and Start the Loop 
 
 
 $Teams = "Disabled"; $Sway = "Enabled"; $flow ="Disabled" ; $powerapps = "Disabled" ; $rms = "Disabled"; $voice = "Disabled" ; $project = "Enabled"
 $intune = "Enabled" ; $yammer = "Enabled" ; $office = "Enabled" ; $mcost = "Enabled" ; $spwac = "Enabled" ; $sp = "Enabled" ; $exc = "Enabled"         // Declare Variables
 
 (Get-MsolUser -User $_.Upn).Licenses[0].ServiceStatus | ForEach {          //Check the Current license status for all the users  
 If ($_.ServicePlan.ServiceName -eq "SWAY" –and $_.ProvisioningStatus -eq "Disabled") { $Sway = "Disabled" }   // If exisiting status is Disabled update the Variable to Disabled 
 If ($_.ServicePlan.ServiceName -eq "PROJECTWORKMANAGEMENT" –and $_.ProvisioningStatus -eq "Disabled") { $project = "Disabled" } 
 If ($_.ServicePlan.ServiceName -eq "INTUNE_O365" –and $_.ProvisioningStatus -eq "Disabled") { $intune = "Disabled" } 
 If ($_.ServicePlan.ServiceName -eq "YAMMER_ENTERPRISE" –and $_.ProvisioningStatus -eq "Disabled") { $yammer = "Disabled" } 
 If ($_.ServicePlan.ServiceName -eq "MCOSTANDARD" –and $_.ProvisioningStatus -eq "Disabled") { $mcost = "Disabled" } 
 If ($_.ServicePlan.ServiceName -eq "SHAREPOINTWAC" –and $_.ProvisioningStatus -eq "Disabled") { $spwac = "Disabled" } 
 If ($_.ServicePlan.ServiceName -eq "SHAREPOINTENTERPRISE" –and $_.ProvisioningStatus -eq "Disabled") { $sp = "Disabled" } 
 If ($_.ServicePlan.ServiceName -eq "EXCHANGE_S_ENTERPRISE" –and $_.ProvisioningStatus -eq "Disabled") { $exc = "Disabled" } 
 }
 
 
 $DisabledOptions = @()   //Declare Array 
 
 If ($Sway -eq "Disabled") { $DisabledOptions += "SWAY" }        // Based on the variable Add the plans to disable in Variable 
 If ($Teams -eq "Disabled") { $DisabledOptions += "TEAMS1" }    // Append the plans to Disable 
 If ($flow -eq "Disabled") { $DisabledOptions += "FLOW_O365_P2" } 
 If ($powerapps -eq "Disabled") { $DisabledOptions += "POWERAPPS_O365_P2" } 
 If ($rms -eq "Disabled") { $DisabledOptions += "RMS_S_ENTERPRISE" } 
 If ($voice -eq "Disabled") { $DisabledOptions += "MCOVOICECONF" } 
 If ($project -eq "Disabled") { $DisabledOptions += "PROJECTWORKMANAGEMENT" } 
 If ($intune -eq "Disabled") { $DisabledOptions += "INTUNE_O365" } 
 If ($yammer -eq "Disabled") { $DisabledOptions += "YAMMER_ENTERPRISE" } 
 If ($mcost -eq "Disabled") { $DisabledOptions += "MCOSTANDARD" } 
 If ($spwac -eq "Disabled") { $DisabledOptions += "SHAREPOINTWAC" } 
 If ($sp -eq "Disabled") { $DisabledOptions += "SHAREPOINTENTERPRISE" } 
 If ($exc -eq "Disabled") { $DisabledOptions += "EXCHANGE_S_ENTERPRISE" } 
 
 $LicenseOptions = New-MsolLicenseOptions –AccountSkuId "Collaboration:ENTERPRISEWITHSCAL" –DisabledPlans $DisabledOptions     // Store the new license option in the Variable 
 
 Set-MsolUserLicense –User $_.UPN –LicenseOptions $LicenseOptions    // Apply the new license option from the file 
 
 $cool = $_.UPN  // Used to check how many users completed from the file in case if script breaks due to server error 
 
 
 }

Note: Disabling TEAM using PowerShell didn’t work as expected, the only option to disable TEAM is by going to Services & add-ins under ADMIN Center and disable TEAM.

To know the latest happening around PowerAPP and MS FLOW please refer

StaffHub

It’s a new feature from MS and it’s in preview, Once you have signed up for the preview, you can assign the Microsoft StaffHub licenses to users. This PowerShell Script will apply the license to EVERYONE in your tenant.  Note: Please make sure everyone you want to have access to Microsoft StaffHub ALSO has a K1, E1, E3, or E5 license assigned.

 Connect-MsolService 
 $licenseObj = Get-MsolAccountSku | Where-Object {$_.SkuPartNumber -eq “DESKLESS"} 
 $license = $licenseObj.AccountSkuId 
 Get-MSOLUser -All | Set-MsolUserLicense -AddLicenses $license
blog comments powered by Disqus

SharePoint Pals

Pals
SharePoint Pals, a community portal for SharePoint developers, Administrators and End Users. Let's join hands and share the point together.
Read this on mobile

Training

Angular Js Training In Chennai
Advanced Angular Js training with real world developer scenarios
Angular Js, Web Api and Ionic for .Net Developers
All in one client side application development for .Net developers
Angular Js For SharePoint Developers
Get ready for the future. Its no more just C#

Get Connected

SharePoint Resources

SharePoint 2013 and 2010 Web Parts
Free Web Parts with Source Code for SharePoint Community




SharePoint 2013 Books and Tutorials
Collection of free SharePoint 2013 books and tutorials (eBooks, pdfs)

Supported By

Contribute your article and be eligible for a one month Free Subscription for Plural Sight. The Author of the most popular New Article (published in the previous month) will be awarded with a Free One month Plural Sight Subscription. Article can be sent to articles@sharepointpals.com in a word document.

Related Resources

Recent Tweets

Twitter January 15, 00:25
How To Enable Target Value And Actual Value In #D3 Gauge Chart https://t.co/VxSi4QnNrC

Twitter January 15, 00:24
How To Open #SharePoint List Hyperlink Column In Modal #Popup Window https://t.co/EQ7HkoZDkX

Twitter January 15, 00:24
Quick Introduction To #Asp.NetCore And It’s Features https://t.co/zAXObHCFpH

Twitter January 15, 00:22
How To Configure #PerformancePoint Services To Use Secure Store In #SharePoint 2013 https://t.co/LEwnUoI7EY

Twitter January 15, 00:21
How To Block Or Disable #Office365 Services https://t.co/Yvp2VPFIRP

Follow us @SharePointPals
Note: For Customization and Configuration, CheckOutRecent Tweets Documentation