Sorry about the confusion. I was trying to modify a Transportrule based an all Domains with the Type of Internal Relay
You helped me a lot with your inputs – I was aware how the -RecipientAddressContainsWord worked but just couldn’t figure it out how to do it cummulative.
Since I’m using another variable with a lot of domains I’m now doing it like that:
$domains = get-acceptedDomain | where{$_.DomainType-match"InternalRelay"} | select-object -expandproperty DomainName | select-object -expand Address
$collection = Get-Transportrule test | select -expand RecipientAddressContainsWords
$domains | % {$collection += $_}
set-transportrule test -RecipientAddressContainsWords $collection
Thanks again for your help!