Powershell script to add many identical transport rules to office365

Welcome Forums General PowerShell Q&A Powershell script to add many identical transport rules to office365

Viewing 1 reply thread
  • Author
    Posts
    • #264392
      Participant
      Topics: 1
      Replies: 0
      Points: -8
      Rank: Member

      Hello! I’ve got an txt file with thousands of public domains, separated by commas (for example: domain2.com,domain3.com,domain4.com,domain5.com,domain6.com,domain7.com)

      Transport rule can not be more then ~4000 symbols. How can i add many-many identical rules with ps like

      New-TransportRule -Name “Untrusted1” -Priority 9 -FromScope NotInOrganization -SenderDomainis domain2.com,domain3.com,domain4.com -PrependSubject “[untrasted]: ”

      Plz help

    • #264473
      Participant
      Topics: 1
      Replies: 55
      Points: 525
      Helping Hand
      Rank: Major Contributor

      Hello Ivan28,

      This forum is not for script requests. Please try/test something and present your dad de and any additional questions.

      You can simply run loop for example for each domain.

      This will result in Transport rule for every domain.

      Hope that helps.

      • This reply was modified 1 month, 2 weeks ago by AndySvints.
      • This reply was modified 1 month, 2 weeks ago by AndySvints.
Viewing 1 reply thread
  • You must be logged in to reply to this topic.