How to pass a list of IP to EOP Connection Filtering automatically

Marc 631 Reputation points
2021-07-14T09:56:15.883+00:00

I would like to pass by PowerShell a long list of IP as a whitelist in the EOP Connection Filtering.
What is the best way to do it?
Thanks

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,386 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,503 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 100.2K Reputation points MVP
    2021-07-14T11:49:48.493+00:00

    Well, via PowerShell :) For example, if you have them in a CSV file, you can do something like this:

    Import-CSV blabla.csv | % { Set-HostedConnectionFilterPolicy "Default" -IPAllowList @{Add=$_.IP}; Start-sleep -Milliseconds 500 } 
    

    You can also concatenate them in a single string, but they all need to be of the same type.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful