Reputation: 1450
A while ago I went through and starting using the script guys get-outlookInbox which worked great with Data mining Subjects, however, I'm now trying to basically do the same thing but by trying to do this with bodies.
Originally I was importing the custom script from the script guys: https://blogs.technet.microsoft.com/heyscriptingguy/2011/05/26/use-powershell-to-data-mine-your-outlook-inbox/
Using the line
$inbox | Where-Object { $_.subject -match 'x'} | Where-Object { ($_.ReceivedTime -gt "06 11 2017") -and ($_.ReceivedTime -lt "10 10 2018") } | Group-Object -Property senderName -NoElement | Sort-Object count
I've tried changing $_.subject
to $_.body
however it seems that the original script doesn't pull body contents, i'm somewhat stuck here and was hoping someone might be able to point me in the right direction
Upvotes: 0
Views: 1072
Reputation: 1640
The reason why it is not available is because the original script does not select the body. In order to get the body of the message you will need to change the original script to include the body.
Change:
Get-OutlookInbox.ps1
Change the line from:
$folder.items | Select-Object -Property Subject, ReceivedTime, Importance, SenderName
To:
$folder.items | Select-Object -Property Subject, ReceivedTime, Importance, SenderName, body
Upvotes: 1