Bulk White-listing in EOP using PowerShell

Bulk White-listing in EOP using PowerShell

  • Comments 2
  • Likes

Hello Team,

Did anybody missed me and my blog's. I will take it as yes :), Yes I am back with my 4th blog. This time it is about

"Bulk White-listing in Transport Rule."

We have scenario where we have more 100 of Domain or IP or Email address which we wanted to white-list. How to achieve the same. Please find the powershell command which we can use to achieve it.

 How to whitelist multiple Domains.

  • Create a csv file were you add all your domain name in a column. Attached is the snapshots for the same.              

domain

santosh.com

hotmail.com

facebook.com

google.com

  • $csv = import-csv "C:\Users\santoshp\Desktop\domainlist.csv"

  • new-transportrule "domainlist" -senderdomainIs $csv.domain -setscl -1

  • "domainlist" is the name of Transport Rule.

     

How to white-list multiple IP address.

  • Create a csv file were you add all your domain name in a column. Attached is the snapshots for the same.

IP

202.81.131.21

202.81.131.22

202.81.131.25

202.81.131.26

  • $csv = import-csv "C:\Users\santoshp\Desktop\IP.csv"

  • New-TransportRule "IP address" -SenderIpRanges $csv.IP -SetSCL -1

 

How to whitelist multiple email address.

  • Create a csv file were you add all your domain name in a column. Attached is the snapshots for the same.

Email

s@ab.com

b@xyz.com

c@delta.com

d@captainamerica.com

  • $csv = import-csv "C:\Users\santoshp\Desktop\email.csv"

  • New-TransportRule "Senders" -AnyOfRecipientAddressContainsWords $csv.Email -SetSCL -1

 

I hope above steps will help many admin's to add bulk Domain, IP address & recipient to Transport rule.

 

Regards,

Santp.

Comments
  • thank you

  • This doesn't seem to work for me, i just get a blank new rule that applies to all messages....

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment