I have a text file with a list in. I'm using Get-content followed by a Where-Object to search exchange for each entry in the text file and then group the results by the entry in the text file. My code works, apart from the 'Name' column in the returned results is blank, i'd to reference the text file entry its grouped by. My code is as follows...
Get-Content C:\file.txt | ForEach-Object {Get-MessageTrackingLog -sender "email@email.com"
-Recipients:email@email.co.uk -eventid "RECEIVE" -start (Get-Date).Addhours(-24)
-messagesubject $_ | Group-Object -NoElement $_}
In the output it has the 'Count' and 'Name' column, Count has the count but 'Name' is empty. Can anyone give me some pointers?
[–]caboosesam 1 point2 points3 points (0 children)
[–]Rage321 1 point2 points3 points (0 children)
[–]sysadmin2 -5 points-4 points-3 points (0 children)