Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Add Multiple values to existing Property

$
0
0

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!


Viewing all articles
Browse latest Browse all 13067

Trending Articles