How to bulk add SPAM white and black list in Exchange Online Protection?

I hope you have a text files with SPAM white and black lists. If so, it’s all down to run the PowerShell command after connecting to Exchange Online.

If you created custom SPAM filter policy, replace “default” in Identity property with your custom filter policy name in the commands below.

Create different text files for Allowed and Blocked email addresses. Also create different text files for allowed and blocked email domain names.

The first line should be “Recipients” in all the text files.

Add bulk add SPAM White List (email addresses)

Import-Csv “C:\..\AllowedEmails.csv” | foreach {Set-HostedContentFilterPolicy -Identity Default -AllowedSenders @{add=$_.Recipients}} 

Add bulk add SPAM Block List (email addresses)

Import-Csv “C:\..\BlockedEmails.csv” | foreach {Set-HostedContentFilterPolicy -Identity Default –BlockedSenders @{add=$_.Recipients}} 

Add bulk add SPAM White List (email domains)

Import-Csv “C:\..\AllowedDomains.csv” | foreach {Set-HostedContentFilterPolicy -Identity Default –AllowedSenderDomains @{add=$_.Recipients}} 

Add bulk add SPAM Block List (email addresses)

Import-Csv “C:\..\BlockedEmails.csv” | foreach {Set-HostedContentFilterPolicy -Identity Default –BlockedSenderDomains @{add=$_.Recipients}} 

I hope it saved you sometime on your research.  Leave me a reply if it did.

Exchange: How to mail-enable the security group?

Say you have a AD Security Group, you want to convert to a distribution group. (When do we stop calling Distribution List…I always said DL. Now it’s distribution group..whatever!!)

It’s a very easy task. There is only one requirement.

Security group must be a Universal Group.

if it is not a universal group already, go ahead change in Active Directory (Uses and Computers console).

Open Exchange Admin (Power)Shell and type this:

Enable-DistributionGroup -Identity “Your Security Group Name”

That’s it. You are done. To verify open ADUC and check the group type. It should gained a email address and it will show up in Exchange Admin Center in Groups.

If you really really want to od in a GUI instead of PowerShell, follow the instructions below.

1. Open Exchange Admin Center
2. Go to Recipients ==> Groups
3. Click + to add a new group, choose Existing group
4. Select your AD Security Group and follow the wizard.

Enjoy. Smile

Exchange: How to restrict conference room only to specific users?

By default resource mailbox process meeting requests from all users. What if you need to restrict to specific users who can book a resource?

All my investigation pointed to do this:

Set-CalendarProcessing  -Identity  -AllBookInPolicy:$false

Set-Calenderprocessing -Identity -BookInPolicy “username1″,”username2″,”username3”

Now I checked what AllBookInPolicy means and TechNet says “The AllBookInPolicy parameter specifies whether to automatically approve in-policy requests from all users.”.  OK sounds like a correct setting.

Then I checked what BookInPolicy means, “The BookInPolicy parameter specifies a comma-separated list of users who are allowed to submit in-policy meeting requests to the resource mailbox. Any in-policy meeting requests from these users are automatically approved.”

BookInPolicy means the it will automatically approves all meeting requests regardless of availability. That’s NOT good. And these solution didn’t work for me.

So I thought creative and decided to do this:

Set-Mailbox -Identity “” -AcceptMessagesOnlyFrom “username1″,”username2″,”username3”

Ta.Da! That satisfies the only specific users can book the resource by sending meeting requests. And resource mailbox automatically process the meeting requests by accepting or rejecting depending upon availability. <.. Evil Genius laugh ..>😮

Mac: Outlook throws Error when compose emails “Some of the files in this Web page aren’t in the expected location”

You are getting this error whenever you compose a new email or replying to an email.






It means your HTML signature has a bad formatted hyper-link or “Text to display” property.

To fix this issue, you may delete and recreate a new Signature or find the bad hyper-link in your signature and fix it.

  • Open Outlook –> Preferences –> Signatures
  • Right click (on each) hyperlink and choose Hyperlink –> Edit Hyperlink
  • Verify and fix the “Text to Display” and Address fields.










That’s it. Send your emails in peace.🙂

Exchange: “You don’t have sufficient permissions” when modifying or removing a DL

You are getting the following error when you try modifying or deleting an DL in Exchange Admin Center or in PowerShell.

You don’t have sufficient permissions. This operation can only be performed by a manager of the group.

Funny thing is sometimes you can’t even add yourself as a manager of the group (ManagedBy attribute).

But it says clearly DLs needs an owner/manager so you can modify or delete the DL.

Solution 1: Add yourself as owner of the DL.

  • Connect to Exchange Management Shell or connect to Exchange Online in PowerShell
  • Type this command to add yourself as a owner:
    • Set-DistributionGroup <DL Name> -ManagedBy @{Add=”UserPrincipalName of yours”} -BypassSecurityGroupManagerCheck
  • Now make the changes you want to do in this DL

Solution 2: If you want to remove the DL, then

  • Connect to Exchange in PowerShell
  • Type this command to delete the DL
    • Remove-DistributionGroup <Group Name> -BypassSecurityGroupManagerCheck

By now you figured out BypassSecurityGroupManagerCheck option did the trick.🙂



OneDrive on Mac: Shared documents cannot be modified and save the changes

On your Mac if any of the document has issues on editing/modifying and saving the changes, it could be Office cache became corrupted. Deleting the Office cache will resolve your issue on your Mac.

Here is how to clear the Office document cache:

1. Back up locally the modified version first or you’ll lose your changes!

2. Remove the following folder after closing all the Office apps running.

/Users/[USER_NAME_HERE]/Library/Containers/ Support/Microsoft/AppData/Microsoft/Office/15.0/OfficeFileCache

3. Here is where the temporary DB Office uses to store status.  Remove the files in,

/Users/[USER_NAME_HERE]/Library/Containers/ Support/Microsoft/AppData/Microsoft/Office/15.0/MruServiceCache

4. Then reopen the SharePoint/OneDrive file in Office Program, it should re-download the document.

Hope it helped you. Leave me a note.🙂