Simplify user tasks like bulk creation, updates, password resets, deletions, license checks & more — all from one place.
🚀 Launch ToolkitMail flow (transport) rules in Microsoft Exchange Online allow administrators to apply conditions and actions to messages for compliance, security, or custom business logic. To create these rules, you rely on predicates — which define the conditions and exceptions.
The Get-TransportRulePredicate cmdlet helps you discover and review all available predicates supported in your environment.
Note: Graph PowerShell does not support organization-level mail flow (transport) rule administration yet. For predicates, rules, and related configurations, you must use Exchange Online PowerShell.
Get-TransportRulePredicate [-Name ] []
Key Parameters:
By default, running the cmdlet without parameters lists all available predicates.
Get-TransportRulePredicate
This lists every available predicate (condition/exception) in your tenant. Useful for reference when building or auditing transport rules.
Get-TransportRulePredicate -Name SubjectMatches | Format-List
This retrieves details about the SubjectMatches predicate and formats the output for better readability. You’ll see what this predicate does and its parameters.
Get-TransportRulePredicate | Where-Object {$_.Name -like "*Attachment*"}
This searches predicates whose names contain “Attachment.” Helpful for filtering predicates related to attachments.
Error | Cause | Solution |
---|---|---|
“The term ‘Get-TransportRulePredicate’ is not recognized …” | You’re not connected to Exchange Online PowerShell or using the wrong module. | Install and import the Exchange Online PowerShell V2 module (Install-Module ExchangeOnlineManagement), then run Connect-ExchangeOnline. |
“A parameter cannot be found that matches parameter name …” | Typo or unsupported parameter. | Check syntax with Get-Help Get-TransportRulePredicate -Full. |
“Cannot bind parameter ‘Name’ …” | Invalid or misspelled predicate name. | Verify the predicate exists by running Get-TransportRulePredicate first, then copy the exact Name. |
Empty results when filtering | Search criteria doesn’t match any predicate. | Adjust your filter/wildcard (e.g., use *Attachment* instead of Attachment). |
The Get-TransportRulePredicate cmdlet is an exploration tool for administrators. It reveals all available conditions and exceptions that can be used in mail flow (transport) rules within Exchange Online.
When planning new compliance or security rules:
In short, this cmdlet ensures you know what’s possible before you implement mail flow rules.
© m365corner.com. All Rights Reserved. Design by HTML Codex