Yes, you can do that, but the condition you used is not avail on an Edge Server:
Instead, use:
-ExceptIfFromAddressContainsWords
https://learn.microsoft.com/en-us/powershell/module/exchange/new-transportrule?view=exchange-ps
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
We have tried to create a Transport rule on the Edge Transport server.
Is it possible to create Transport Rule on the Edge transport server?
we can create transport rule on the Exchange server 2010 but unable to create on the Exchange Server 2016 and 2019.
According to Microsoft article:
Yes, you can do that, but the condition you used is not avail on an Edge Server:
Instead, use:
-ExceptIfFromAddressContainsWords
https://learn.microsoft.com/en-us/powershell/module/exchange/new-transportrule?view=exchange-ps