locked
search for messages with similar subject RRS feed

  • Question

  • I'm trying to write a little script to find messages with similar, not exact subject.  my script starts:

    Get-Exchangeserver | where-object {$_.IsHubTransportServer -eq "True"} |get-messagetrackinglog -Sender "person@domain.com" -MessageSubject "review"  

    Only I want to find all messages with a subject that contains the word "review".  Can I use -like?

    Thursday, July 7, 2011 3:17 PM

Answers

  • Get-Exchangeserver | where-object {$_.IsHubTransportServer -eq "True"} |get-messagetrackinglog -Sender "person@domain.com" |

    where-object {$_.MessageSubject -like  "*review*"}  


    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
    • Marked as answer by The_Messenger Thursday, July 7, 2011 3:49 PM
    Thursday, July 7, 2011 3:32 PM

All replies

  • As per my knowledge, you can use only -eq
    Anil MCC 2011,ITIL V3,MCSA 2003,MCTS 2010, My Blog : http://messagingschool.wordpress.com
    Thursday, July 7, 2011 3:31 PM
  • Get-Exchangeserver | where-object {$_.IsHubTransportServer -eq "True"} |get-messagetrackinglog -Sender "person@domain.com" |

    where-object {$_.MessageSubject -like  "*review*"}  


    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
    • Marked as answer by The_Messenger Thursday, July 7, 2011 3:49 PM
    Thursday, July 7, 2011 3:32 PM
  • mjolinor - Thanks!!  Got it.

    Thursday, July 7, 2011 3:49 PM
  • Get-messagetrackinglog -eventid "RECEIVE" -messagesubject "hello" -Start "01/12/2010 00:00:00" -End "07/07/2011 17"30:00"
    Thursday, July 7, 2011 4:14 PM