subject name

Iron Contributor

Hi  1. one of my user lets say user1 sent an email to user2 on jan 10th at 16:00 hours i want to know what is the subject name of that email.

 2. plz do provide me with the syntax if i need to get all subject names user1 has sent to user2 from16:00 to 16:30 hours
i am getting error for the 3 syntaxes i have even used recipients and recipient in syntax

PS C:\Windows\system32> Get-MessageTrackingLog -sender "user1@mydomain.com" -recipients "user2@mydomain.com" -start "01/10/2018 16:00" 
-end "01/10/2018 16:30" | select messagesubject

Get-MessageTrackingLog : The term 'Get-MessageTrackingLog' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1
+ Get-MessageTrackingLog -sender "user1@mydomain.com" -recipients "user2. ...
+ ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo         : ObjectNotFound: (Get-MessageTrackingLog:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Windows\system32> Get-MessageTrackingLog -sender "user1@mydomain.com" -recipients "user2@mydomain.com" -start "01/10/2018 16:00"
-end "1/10/2018 16:30" | select message subject

Get-MessageTrackingLog : The term 'Get-MessageTrackingLog' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1
+ Get-MessageTrackingLog -sender "user1@mydomain.com" -recipients "user2. ...
+ ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo         : ObjectNotFound: (Get-MessageTrackingLog:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
PS C:\Windows\system32> Get-MessageTrackingReport -sender "user1@mydomain.com" -Recipients "user2@mydomain.com" -start "01/10/2018 16:00" -end "1/10/2018 16:30" | select MessageSubject
1 Reply

The cmdlet you are looking for is Get-MessageTrace. You can also do it via the UI: https://technet.microsoft.com/en-us/library/jj200712(v=exchg.150).aspx