0 votes

According to this article when we disable a user we should "Disable Exchange ActiveSync and Disable OWA for Devices, and Disable email connectivity." However I can only figure out how to disable ActiveSync with adaxes. Is there a way to Disable "OWA for Devices" and "Email connectivity" as well?

https://support.office.com/en-us/articl ... 5eddb367d1

by (340 points)

1 Answer

0 votes
by (215k points)
selected by
Best answer

Hello,

To disable Exchange ActiveSync and email connectivity, you need to disable the following Exchange Features: Exchange ActiveSync and Outlook Web App.


As for OWA for Devices, currently the feature is not supported by Adaxes natively. By the time when we were developing our Exchange ADSI API that is used by Adaxes to interact with Exchange, the feature was still in development by Microsoft. Depending on various preview builds of Exchange 2013, it appeared, and then disappeared, and then appeared again, so we decided not to implement it until a final decision is made by Microsoft. Now, that things seem to have settled down, we'll add the support for it in one of the future releases.

For now, you can disable the feature with the help of a PowerShell script. You can create a Custom Command that will disable the feature by running a script or add a script to an existing Custom Command, Scheduled Task or Business Rule. To add such a script:

  1. Add the Run a program or PowerShell script action to your Business Rule, Custom Command or Scheduled Task.

  2. In the Script field, paste the following script:

     try
     {
         $objectId = [Guid]$Context.TargetObject.Get("adm-O365ObjectId")
     }
     catch
     {
         return # No office 365 account
     }
    
     $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://ps.outlook.com/powershell/" `
         -Credential $Context.GetOffice365Credential() -Authentication Basic -AllowRedirection
     Import-PSSession $Session -AllowClobber -DisableNameChecking
    
     Set-CASMailbox $objectId.ToString() -OWAforDevicesEnabled $false
    
     Remove-PSSession $session
    
  3. Add a short description for the script and click OK.

0

Works great! Thank you!

Related questions

0 votes
1 answer

My scheduled task currently: Checks for staff in a particular OU that do not have an O365 license Adds a license Resets their AD Password Moves them to an OU based off ... scheduled task moves them out of the OU that the business rule is looking at. Thanks

asked Apr 15, 2020 by russmerriman (40 points)
0 votes
1 answer

Hi Adaxes Team I have created a business rule which sends a mail to our helpdesk staff after a user sets a new pw with the self password reset function. The user should ... . If this is not possible yet, please forward it as a suggestion :) regards pudong

asked Feb 4 by pudong (410 points)
0 votes
1 answer

Is it possible to disable then re-enable a Business Rule from a Scheduled Task? For example, when the Scheduled tasks starts, it disables a Business Rule, runs the Task(s), then re-enables the Business Rule when done.

asked May 11, 2016 by Kikaida (1.1k points)
0 votes
1 answer

I am trying to create a business rule to send an email to the manager of the group when a member is added or removed from a rule-based group. I have created the business rule and it works for other groups but not for a rule-based group. Can this be done?

asked Jul 19, 2021 by mark.it.admin (1.8k points)
0 votes
1 answer

I would like to add the following logic into a Powershell script that will be triggered on 'After Create User'. Read the value of the 'title' property of the user just created ... 'True' or 'False'. Could you assist with how to script this please? Many thanks.

asked May 1, 2020 by Bernie (310 points)
2,733 questions
2,469 answers
6,460 comments
1,336,615 users