Public/generated/Get-KritTcmEXOTransportRule.ps1

<#
·· × × × ··· SirJ's Deaddrop ··· × × × ···
      — If you found this, you were meant to —

---------------- A Seriously Kritical™ Production ----------------

                                   [] →
                 (¯`·.¸¸.·´¯)
               .·´ `·. [] →
               `·.______________.·´
              | +------------------+ |
              | | Kritical™ | |
              | | [] [] | |
              | | | |
              | | [] [] [] | |
              | +------------------+ |
                  (._.·´¯`·.¸_)

                     Your last call.
                   And your first move.

                         ★ ☆ ★

                     +61 1300 274 655
                 sales at kritical dot net

-----------------------------------------------------------------


.COPYRIGHT
    (c) 2026 Kritical Pty Ltd. All rights reserved.
.AUTHOR
    Joshua Finley <joshua.finley@kritical.net>
.COMPANY
    Kritical Pty Ltd | ABN 39 687 048 086
    Level 4 / 60 Moorabool St Geelong VIC 3220
    1300 274 655 | sales@kritical.net | https://kritical.net/
.NOTES
    HARD RULE 13 canonical Kritical branding — do not overlay other agent banners.
    Auto-generated by Generate-KritTcmFromM365DscSchema.ps1 (.1507o30+).
    Upstream reference: Microsoft365DSC by Microsoft (MIT). This shim provides
    literal search-replace equivalence — see Krit.TCM/generated/index.md.
#>


function Get-KritTcmEXOTransportRule {
<#
.SYNOPSIS
    Krit.TCM shim for M365DSC resource EXOTransportRule.

.DESCRIPTION
    Auto-generated from M365DSC .schema.mof by
    scripts/m365-setup/Generate-KritTcmFromM365DscSchema.ps1 (.1507o30).

    Search-replace safe: callers that today invoke
        Get-M365DSCEXOTransportRule -Credential $cred -TenantId $tid
    can rename to
        Get-KritTcmEXOTransportRule -Credential $cred -TenantId $tid
    with ZERO other edits. Parameter shape matches the M365DSC .schema.mof
    exactly. Per operator direction, -PreferM365DscBehavior defaults to true.

    Actual Graph dispatch is delegated to Invoke-KritTcmM365DscSchemaBridge.
    Bridge maps resource → Graph endpoint per per-resource wave; where mapping
    is not yet shipped, bridge returns an object with Verdict='UNMAPPED'.

.NOTES
    Workload: Exchange
    Original mof: C:\Users\joshl\OneDrive - Kritical Pty Ltd\Github\KRTPax8ToShopifyConnector\.kritm365-mine\Microsoft365DSC\Modules\Microsoft365DSC\DSCResources\MSFT_EXOTransportRule\MSFT_EXOTransportRule.schema.mof
    Param count: 83
    Generator wave: .1507o30
#>

[CmdletBinding()]
param(
        # The Name parameter specifies the display name of the transport rule to be created. The maximum length is 64 characters.
[Parameter(Mandatory)] [string]$Name,
        # This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
[string]$ADComparisonAttribute,
        # This parameter specifies a condition or part of a condition for the rule. The name of the corresponding exception parameter starts with ExceptIf.
[ValidateSet('Equal','NotEqual')] [string]$ADComparisonOperator,
        # The ActivationDate parameter specifies when the rule starts processing messages. The rule won't take any action on messages until the specified date/time.
[string]$ActivationDate,
        # The AddManagerAsRecipientType parameter specifies an action that delivers or redirects messages to the user that's defined in the sender's Manager attribute.
[ValidateSet('To','Cc','Bcc','Redirect')] [string]$AddManagerAsRecipientType,
        # The ApplyClassification parameter specifies an action that applies a message classification to messages.
[string]$ApplyClassification,
        # The ApplyHtmlDisclaimerFallbackAction parameter specifies what to do if the HTML disclaimer can't be added to a message.
[ValidateSet('Wrap','Ignore','Reject')] [string]$ApplyHtmlDisclaimerFallbackAction,
        # The ApplyHtmlDisclaimerLocation parameter specifies where to insert the HTML disclaimer text in the body of messages.
[ValidateSet('Append','Prepend')] [string]$ApplyHtmlDisclaimerLocation,
        # The ApplyHtmlDisclaimerText parameter specifies an action that adds the disclaimer text to messages.
[string]$ApplyHtmlDisclaimerText,
        # The ApplyRightsProtectionCustomizationTemplate parameter specifies an action that applies a custom branding template for OME encrypted messages.
[string]$ApplyRightsProtectionCustomizationTemplate,
        # The ApplyRightsProtectionTemplate parameter specifies an action that applies rights management service (RMS) templates to messages.
[string]$ApplyRightsProtectionTemplate,
        # The AttachmentHasExecutableContent parameter specifies a condition that looks for executable content in message attachments.
[bool]$AttachmentHasExecutableContent,
        # The AttachmentIsPasswordProtected parameter specifies a condition that looks for password protected files in messages (because the contents of the file can't be inspected).
[bool]$AttachmentIsPasswordProtected,
        # The AttachmentIsUnsupported parameter specifies a condition that looks for unsupported file types in messages.
[bool]$AttachmentIsUnsupported,
        # The AttachmentProcessingLimitExceeded parameter specifies a condition that looks for messages where attachment scanning didn't complete.
[bool]$AttachmentProcessingLimitExceeded,
        # The AttachmentSizeOver parameter specifies a condition that looks for messages where any attachment is greater than the specified size.
[string]$AttachmentSizeOver,
        # The Comments parameter specifies optional descriptive text for the rule. The length of the comment can't exceed 1024 characters.
[string]$Comments,
        # The DeleteMessage parameter specifies an action that silently drops messages without an NDR.
[bool]$DeleteMessage,
        # The DlpPolicy parameter specifies the data loss prevention (DLP) policy that's associated with the rule.
[string]$DlpPolicy,
        # The Enabled parameter specifies whether the new rule is created as enabled or disabled.
[bool]$Enabled,
        # The ExceptIfADComparisonAttribute parameter specifies an exception that compares an Active Directory attribute between the sender and all recipients of the message.
[string]$ExceptIfADComparisonAttribute,
        # The ExceptIfADComparisonOperator parameter specifies the comparison operator for the ExceptIfADComparisonAttribute parameter.
[ValidateSet('Equal','NotEqual')] [string]$ExceptIfADComparisonOperator,
        # The ExceptIfAttachmentHasExecutableContent parameter specifies an exception that looks for executable content in message attachments.
[bool]$ExceptIfAttachmentHasExecutableContent,
        # The ExceptIfAttachmentIsPasswordProtected parameter specifies an exception that looks for password protected files in messages (because the contents of the file can't be inspected).
[bool]$ExceptIfAttachmentIsPasswordProtected,
        # The ExceptIfAttachmentIsUnsupported parameter specifies an exception that looks for unsupported file types in messages.
[bool]$ExceptIfAttachmentIsUnsupported,
        # The ExceptIfAttachmentProcessingLimitExceeded parameter specifies an exception that looks for messages where attachment scanning didn't complete.
[bool]$ExceptIfAttachmentProcessingLimitExceeded,
        # The ExceptIfAttachmentSizeOver parameter specifies an exception that looks for messages where any attachment is greater than the specified size.
[string]$ExceptIfAttachmentSizeOver,
        # The ExceptIfFromScope parameter specifies an exception that looks for the location of message senders.
[ValidateSet('InOrganization','NotInOrganization')] [string]$ExceptIfFromScope,
        # The ExceptIfHasClassification parameter specifies an exception that looks for messages with the specified message classification.
[string]$ExceptIfHasClassification,
        # The ExceptIfHasNoClassification parameter specifies an exception that looks for messages with or without any message classifications.
[bool]$ExceptIfHasNoClassification,
        # The ExceptIfHeaderContainsMessageHeader parameter specifies the name of header field in the message header when searching for the words specified by the ExceptIfHeaderContainsWords parameter.
[string]$ExceptIfHeaderContainsMessageHeader,
        # The ExceptIfHeaderMatchesMessageHeader parameter specifies the name of header field in the message header when searching for the text patterns specified by the ExceptIfHeaderMatchesPatterns parameter.
[string]$ExceptIfHeaderMatchesMessageHeader,
        # The ExceptIfManagerForEvaluatedUser parameter specifies an exception that looks for users in the Manager attribute of senders or recipients.
[string]$ExceptIfManagerForEvaluatedUser,
        # The ExceptIfMessageTypeMatches parameter specifies an exception that looks for messages of the specified type.
[ValidateSet('OOF','AutoForward','Encrypted','Calendaring','PermissionControlled','Voicemail','Signed','ApprovalRequest','ReadReceipt')] [string]$ExceptIfMessageTypeMatches,
        # The ExceptIfMessageSizeOver parameter specifies an exception that looks for messages larger than the specified size.
[string]$ExceptIfMessageSizeOver,
        # The ExceptIfSCLOver parameter specifies an exception that looks for the SCL value of messages
[string]$ExceptIfSCLOver,
        # The ExceptIfSenderManagementRelationship parameter specifies an exception that looks for the relationship between the sender and recipients in messages.
[ValidateSet('Manager','DirectReport')] [string]$ExceptIfSenderManagementRelationship,
        # The ExceptIfSentToScope parameter specifies an exception that looks for the location of a recipient.
[ValidateSet('InOrganization','NotInOrganization','ExternalPartner','ExternalNonPartner')] [string]$ExceptIfSentToScope,
        # The ExceptIfWithImportance parameter specifies an exception that looks for messages with the specified importance level.
[ValidateSet('Low','Normal','High')] [string]$ExceptIfWithImportance,
        # The ExpiryDate parameter specifies when this rule will stop processing messages. The rule won't take any action on messages after the specified date/time.
[string]$ExpiryDate,
        # The FromScope parameter specifies a condition that looks for the location of message senders.
[ValidateSet('InOrganization','NotInOrganization')] [string]$FromScope,
        # The GenerateIncidentReport parameter specifies where to send the incident report that's defined by the IncidentReportContent parameter.
[string]$GenerateIncidentReport,
        # The GenerateNotification parameter specifies an action that sends a notification message to recipients.
[string]$GenerateNotification,
        # The HasClassification parameter specifies a condition that looks for messages with the specified message classification.
[string]$HasClassification,
        # The HasNoClassification parameter specifies a condition that looks for messages with or without any message classifications.
[bool]$HasNoClassification,
        # The HeaderContainsMessageHeader parameter specifies the name of header field in the message header when searching for the words specified by the HeaderContainsWords parameter.
[string]$HeaderContainsMessageHeader,
        # The HeaderMatchesMessageHeader parameter specifies the name of header field in the message header when searching for the text patterns specified by the HeaderMatchesPatterns parameter.
[string]$HeaderMatchesMessageHeader,
        # The ManagerForEvaluatedUser parameter specifies a condition that looks for users in the Manager attribute of senders or recipients.
[ValidateSet('Recipient','Sender')] [string]$ManagerForEvaluatedUser,
        # The MessageSizeOver parameter specifies a condition that looks for messages larger than the specified size. The size includes the message and all attachments.
[string]$MessageSizeOver,
        # The MessageTypeMatches parameter specifies a condition that looks for messages of the specified type.
[ValidateSet('OOF','AutoForward','Encrypted','Calendaring','PermissionControlled','Voicemail','Signed','ApprovalRequest','ReadReceipt')] [string]$MessageTypeMatches,
        # The Mode parameter specifies how the rule operates.
[ValidateSet('Audit','AuditAndNotify','Enforce')] [string]$Mode,
        # The ModerateMessageByManager parameter specifies an action that forwards messages for approval to the user that's specified in the sender's Manager attribute.
[bool]$ModerateMessageByManager,
        # The PrependSubject parameter specifies an action that adds text to add to the beginning of the Subject field of messages.
[string]$PrependSubject,
        # The Priority parameter specifies a priority value for the rule that determines the order of rule processing.
[int]$Priority,
        # The Quarantine parameter specifies an action that quarantines messages.
[bool]$Quarantine,
        # The RecipientAddressType parameter specifies how conditions and exceptions check recipient email addresses.
[ValidateSet('Original','Resolved')] [string]$RecipientAddressType,
        # The RejectMessageEnhancedStatusCode parameter specifies the enhanced status code that's used when the rule rejects messages.
[string]$RejectMessageEnhancedStatusCode,
        # The RejectMessageReasonText parameter specifies the explanation text that's used when the rule rejects messages.
[string]$RejectMessageReasonText,
        # The RemoveHeader parameter specifies an action that removes a header field from the message header.
[string]$RemoveHeader,
        # The RemoveOMEv2 parameter specifies an action that removes Office 365 Message Encryption from messages and their attachments.
[bool]$RemoveOMEv2,
        # This parameter specifies an action or part of an action for the rule.
[bool]$RemoveRMSAttachmentEncryption,
        # The RouteMessageOutboundConnector parameter specifies an action that routes messages through the specified Outbound connector in Office 365.
[string]$RouteMessageOutboundConnector,
        # The RouteMessageOutboundRequireTls parameter specifies an action that uses Transport Layer Security (TLS) encryption to deliver messages outside your organization.
[bool]$RouteMessageOutboundRequireTls,
        # The RuleErrorAction parameter specifies what to do if rule processing can't be completed on messages.
[ValidateSet('Ignore','Defer')] [string]$RuleErrorAction,
        # The RuleSubType parameter specifies the rule type.
[ValidateSet('Dlp','None')] [string]$RuleSubType,
        # The SCLOver parameter specifies a condition that looks for the SCL value of messages
[string]$SCLOver,
        # The SenderAddressLocation parameter specifies where to look for sender addresses in conditions and exceptions that examine sender email addresses.
[ValidateSet('Header','Envelope','HeaderOrEnvelope')] [string]$SenderAddressLocation,
        # The SenderManagementRelationship parameter specifies a condition that looks for the relationship between the sender and recipients in messages.
[ValidateSet('Manager','DirectReport')] [string]$SenderManagementRelationship,
        # The SentToScope parameter specifies a condition that looks for the location of recipients.
[ValidateSet('InOrganization','NotInOrganization','ExternalPartner','ExternalNonPartner')] [string]$SentToScope,
        # The SetAuditSeverity parameter specifies an action that sets the severity level of the incident report and the corresponding entry that's written to the message tracking log when messages violate DLP policies.
[ValidateSet('DoNotAudit','Low','Medium','High')] [string]$SetAuditSeverity,
        # The SetHeaderName parameter specifies an action that adds or modifies a header field in the message header.
[string]$SetHeaderName,
        # The SetHeaderValue parameter specifies an action that adds or modifies a header field in the message header.
[string]$SetHeaderValue,
        # The SetSCL parameter specifies an action that adds or modifies the SCL value of messages.
[string]$SetSCL,
        # The StopRuleProcessing parameter specifies an action that stops processing more rules.
[bool]$StopRuleProcessing,
        # The WithImportance parameter specifies a condition that looks for messages with the specified importance level.
[ValidateSet('Low','Normal','High')] [string]$WithImportance,
        # Specify if the Transport Rule should exist or not.
[ValidateSet('Present','Absent')] [string]$Ensure,
        # Credentials of the Exchange Global Admin
[string]$Credential,
        # Id of the Azure Active Directory application to authenticate with.
[string]$ApplicationId,
        # Id of the Azure Active Directory tenant used for authentication.
[string]$TenantId,
        # Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.
[string]$CertificateThumbprint,
        # Username can be made up to anything but password will be used for CertificatePassword
[string]$CertificatePassword,
        # Path to certificate used in service principal usually a PFX file.
[string]$CertificatePath,
        # Managed ID being used for authentication.
[bool]$ManagedIdentity
)
    Invoke-KritTcmM365DscSchemaBridge -ResourceName 'EXOTransportRule' -Workload 'Exchange' -Verb 'Get' -CallerParams $PSBoundParameters
}