đź”§ New: User Management Graph PowerShell Toolkit

Simplify user tasks like bulk creation, updates, password resets, deletions, license checks & more — all from one place.

🚀 Launch Toolkit

Get-TransportRuleAction (Exchange Online PowerShell): See What Mail Flow Actions You Can Use

Ever started crafting a mail flow (transport) rule and paused—“wait, what actions are even available here?” Between quarantining messages, redirecting, adding headers, and more, it’s easy to forget the exact action names or parameters. Get-TransportRuleAction is your quick catalog: it lists the actions you can plug into transport rules, so you design policies confidently without guesswork.

Note: Microsoft Graph PowerShell does not administer org-level mail flow (transport) rules yet. For mail flow rule management, use Exchange Online PowerShell. Graph PowerShell today focuses on user/mailbox-level surfaces, not org-wide mail flow.


i) Cmdlet Syntax

Get-TransportRuleAction [-Name <String>] 

Key points

  • -No parameters lists all available actions.
  • -Name narrows to a specific action (exact match).

ii) Usage Examples

Example 1 — List all transport rule actions (reference)

Get-TransportRuleAction

Outputs the full set of actions supported in your tenant—great for discovery and scripting.

Example 2 — Look up an action by name (reference)

Get-TransportRuleAction -Name Quarantine | format-list

Shows details for the Quarantine action (e.g., parameters, display info) so you can use it with confidence in New-TransportRule or Set-TransportRule.


iii) Cmdlet Tips

  • Connect first:
  • Connect-ExchangeOnline using an account with appropriate roles (e.g., Organization Management).

  • Action names vs. UI labels:
  • The action name in PowerShell may differ from the friendly label you see in the admin center. Use this cmdlet to confirm the exact name/parameters for scripting.

  • Document as you go:
  • Export the action list for your runbook:

    Get-TransportRuleAction | Export-Csv .\transport-actions.csv -NoTypeInformation
  • Pair with rule inspection:
  • Use Get-TransportRule to audit current rules, then consult Get-TransportRuleAction to standardize authorized actions.


iv) Use Cases

  • Policy design: Confirm which actions are available before drafting a new transport rule (e.g., quarantine vs. reject).
  • Migration readiness: During mergers or tenant migrations, map legacy actions to supported ones in the destination environment.
  • Governance baselines: Build an allowlist of approved mail flow actions for your ops team.

v) Possible Errors & Solutions

Error Cause Solution
The term 'Get-TransportRuleAction' is not recognized Not connected to Exchange Online / Module missing Install/Update EXO V3 module and run Connect-ExchangeOnline.
Empty/partial results Insufficient permissions Use an account with Organization Management or appropriate transport rule permissions.
Action not found with -Name Name mismatch (case or spacing) Run without -Name to list all, then copy the exact action name.

vi) Conclusion

Get-TransportRuleAction is your blueprint for mail flow rule capabilities. Before you script or update policies, use it to confirm the exact actions (and parameters) supported in your tenant. You’ll design cleaner, more reliable rules—without trial-and-error. And remember: org-level mail flow rules are managed with Exchange Online PowerShell, not Graph, so keep this cmdlet close when you’re building or auditing transport rules.


Graph PowerShell Explorer Widget

20 Graph PowerShell cmdlets with easily accessible "working" examples.


Permission Required

Example:


                


                


                

© m365corner.com. All Rights Reserved. Design by HTML Codex