none
Transport Rule Name and Transport Rule ID RRS feed

  • Question

  • Question: How do I get a list of the Transport Rule Name and Transport Rule ID?

    This command provides a list of all of my Transport Rule names:

    Get-TransportRule

    This command,  (Get-TransportRule -Identity 1E5D5FE5-77BB-44B0-A0C2-97AC7D5EAAE5) will provide the name and status of the transport rule where the Transport Rule ID is 1E5D5FE5-77BB-44B0-A0C2-97AC7D5EAAE5.

    Example:

    Get-TransportRule -Identity 1E5D5FE5-77BB-44B0-A0C2-97AC7D5EAAE5

    Name                                   State    Mode        Priority Comments                            

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

    Sender IP Address - D                  Enabled  Enforce     0        ...                                 

     

    How do I generate a list of the transport rules that displays the Transport Rule Name, Transport Rule ID, State, Mode, Priority, and Comments?

    Thursday, October 10, 2019 3:10 PM

All replies

  • Question: How do I get a list of the Transport Rule Name and Transport Rule ID?

    This command provides a list of all of my Transport Rule names:

    Get-TransportRule

    This command,  (Get-TransportRule -Identity 1E5D5FE5-77BB-44B0-A0C2-97AC7D5EAAE5) will provide the name and status of the transport rule where the Transport Rule ID is 1E5D5FE5-77BB-44B0-A0C2-97AC7D5EAAE5.

    Example:

    Get-TransportRule -Identity 1E5D5FE5-77BB-44B0-A0C2-97AC7D5EAAE5

    Name                                   State    Mode        Priority Comments                            

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

    Sender IP Address - D                  Enabled  Enforce     0        ...                                 

     

    How do I generate a list of the transport rules that displays the Transport Rule Name, Transport Rule ID, State, Mode, Priority, and Comments?

    Get-TransportRule |FL name, Identity, state, mode, Priority, comment
    Thursday, October 10, 2019 3:18 PM
  • Hi Andy,

    Thank you so much for taking the time to reply to my question.

    I ran the PowerShell command that you suggested, however the PowerShell command did not return the Transport Rule ID Number.

    Get-TransportRule |FL name, Identity, state, mode, Priority, comment

    Name     : Sender IP Address - D

    Identity : Sender IP Address - D

    State    : Enabled

    Mode     : Enforce

    Priority : 0

    So in my situation I know that the Transport Rule Name = "Sender IP Address - D".

    I also know that the Transport Rule ID Number, "1E5D5FE5-77BB-44B0-A0C2-97AC7D5EAAE5" corresponds to the Transport Rule Name "Sender IP Address - D"

    Get-TransportRule -Identity 1E5D5FE5-77BB-44B0-A0C2-97AC7D5EAAE5

    Name                                   State    Mode        Priority Comments                            

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

    Sender IP Address - D                  Enabled  Enforce     0        ...                                 

    Do you have any ideas for a PowerShell command that would return the TransportRule Name and the TransportRule ID Number?

    The desired output would look like this:

    Get-TransportRule . . . .

    Name     : Sender IP Address - D

    Identity : 1E5D5FE5-77BB-44B0-A0C2-97AC7D5EAAE5

    State    : Enabled

    Mode     : Enforce

    Priority : 0

    Thanks again for your Input.

    Rigel

    Thursday, October 10, 2019 5:05 PM
  • You can export transport rules into a .csv file. Then you can filter it out it's columns as you wish.

    $file = Export-TransportRuleCollection
    set-Content -Path "C:\output1.csv" -Value $file.FileData -Encoding Byte

    Thursday, October 10, 2019 7:20 PM
  • Hi Andy,

    Thank you so much for taking the time to reply to my question.

    I ran the PowerShell command that you suggested, however the PowerShell command did not return the Transport Rule ID Number.

    Get-TransportRule |FL name, Identity, state, mode, Priority, comment

    Name     : Sender IP Address - D

    Identity : Sender IP Address - D

    State    : Enabled

    Mode     : Enforce

    Priority : 0

    So in my situation I know that the Transport Rule Name = "Sender IP Address - D".

    I also know that the Transport Rule ID Number, "1E5D5FE5-77BB-44B0-A0C2-97AC7D5EAAE5" corresponds to the Transport Rule Name "Sender IP Address - D"

    Get-TransportRule -Identity 1E5D5FE5-77BB-44B0-A0C2-97AC7D5EAAE5

    Name                                   State    Mode        Priority Comments                            

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

    Sender IP Address - D                  Enabled  Enforce     0        ...                                 

    Do you have any ideas for a PowerShell command that would return the TransportRule Name and the TransportRule ID Number?

    The desired output would look like this:

    Get-TransportRule . . . .

    Name     : Sender IP Address - D

    Identity : 1E5D5FE5-77BB-44B0-A0C2-97AC7D5EAAE5

    State    : Enabled

    Mode     : Enforce

    Priority : 0

    Thanks again for your Input.

    Rigel

    Thats the GUID right?

    So instead do this and experiment a bit:

    Get-TransportRule |FL name, Identity, state, mode, Priority, comment, guid

    Add or remove any fields you see fit.

    You can get those by looking at one rule:

    Get-TransportRule <Guid> |FL

    Thursday, October 10, 2019 9:22 PM
  • 10-16-2019

    To Andy David and Udara Kaushalya,

    Thank you once again for taking the time to reply to my question.

    Using the command, "Get-TransportRule |FL name, Identity, state, mode, Priority, comment, guid," I was able to match all of the names of my Transport Rules to the Transport Rule ID, and this helped me resolve a problem of why a certain email was getting rejected.

    PS C:\Windows> Get-TransportRule |FL name, Identity, state, mode, Priority, comment, guid

    Name     : Sender IP Address - D
    Identity : Sender IP Address - D
    State    : Enabled
    Mode     : Enforce
    Priority : 0
    Guid     : 1e5d5fe5-77bb-44b0-a0c2-97ac7d5eaae5

    Sincerely,

    Rigel

    Wednesday, October 16, 2019 3:05 PM