Sunday 28 May 2017

How to enable or disable OWA in bulk on O365

Or, O365 PowerShell command to enable to disable OWA for bulk users
Or, Disable or Enable OWA for all users in O365
Or, Disable or Enable OWA for single user in o365

Descriptions: Disabling OWA help you to block the outlook web access for targeted users. One of the very common daily administrative task for an exchange administrator is to enable or disable OWA for users (single or bulk). In this article we will explore the easiest way of doing this task using O365 PowerShell.

There are some cases where people wants to disable or enable OWA for single user as well as for multiple or all users.

IMP Note: Disabling OWA only block the access of Outlook Web Access in O365. All other applications will remain accessible if you login to office.com.

Steps: Disabling or Enabling OWA for using PowerShell or GUI

Connect to office365 server PowerShell admin console with administrative privilege.

Run the below command to disable OWA for “All Users”
Get-Mailbox | Set-CASMailbox -OWAEnabled $false

Run the below command to enable OWA for “All Users”
Get-Mailbox | Set-CASMailbox -OWAEnabled $true

Run the below command to Disable OWA for “Single User”
Set-CASMailbox -Identity xxx@yourdomain.com -OWAEnabled $false

Run the below command to enable OWA for “Single User”
Set-CASMailbox -Identity xxx@yourdomain.com -OWAEnabled $true


To enable or disable OWA for single user using GUI, follow the below steps:

Go to EAC > Click on Recipients > select any Mailbox > Go to mailbox Properties > Go to Mailbox features > Under Email Connectivity, see for Outlook on the web > Click Disable to disable the OWA and Click on Enable to enable OWA















Cheers, Please write me back if you have any query or feedback.

Adding all Distribution List to a single Distribution List O365 PowerShell

Or, Making all DLs the member of a Global DL in O365
Or, How to add all DLs to a single global DL
Or, Creating a global DL containing all other DLs as member

Descriptions: In this article we are going to learn “How to add all other DLs in a Global DL member list”. Guys, this is something very common requirement across all type of organizations where people want to have a DL containing all other small DLs as a member, so that a Single mail can be sent to everyone by sending that to one DL instead of sending that to multiple DLs.

Yes, there is another way to achieve this requirement and that it creating a Dynamic DL which may by default contain all active mailboxes/users as a member. But, we will discuss about this latter in a separate detailed article.

Steps:
Connect to office365 server PowerShell admin console with administrative privilege.

Run below command to export all the DLs in to a CSV file
Get-DistributionGroup -ResultSize unlimited | select displayname,PrimarySmtpAddress | Export-CSV d:\temp\DLs.csv

Run below command to import and add all the DLs to specified global DL
Import-Csv D:\temp\DLs.csv | foreach {Add-DistributionGroupMember -Identity allDLs@domian.com -Member $_.displayname}

IMP Notes:
1. You can change the path as per your environment for exporting and importing the CSV file.
2. Do not modify anything in the exported CSV file.
3. DLs whichever are exported in the CSV file, would be added to the specified global DL. In my case it is allDLs@domain.com

Cheers, please write me back if you have any query or feedback.