none
-append searchmailbox log RRS feed

  • General discussion

  • Hello

    I have E3 licenses and I am preforming searches with Powershell. 

    When we have a Phishing attack, I will have a CSV file of the mailboxes that were targeted. We would like to delete the email and know which users opened the email.  I would use the following:

    import-csv example.csv | % {search-mail $_.upn -Searchquery "from:example@example.com" -deletecontent -loglevel full -targetfolder Examplefolder -targetmailbox examplemailox}

    This does what I want and gives me the information I want, but not in the format I want.  The log files are separate CSVs for each mailbox, I'd like to do something similar to -append so that I would have one CSV withal the log information.

    Is this and if so how do I do it?

    Thank you

    Steve 

    Monday, June 22, 2015 6:58 PM

All replies

  • Get-ChildItem *.csv |%{Import-Csv  $_}| Export-Csv combined.csv


    \_(ツ)_/



    • Edited by jrv Monday, June 22, 2015 8:34 PM
    Monday, June 22, 2015 8:33 PM
  • Hello,

    Thanks for the response, but I'm sorry I don't really follow.  If I could send the logs to a file, I would see how this would work, but the logs get sent to an outlook mailbox as a zipped attachment and a different mail item for each mailbox searched.

    Further explanation on this process would be greatly appreciated. 

    Thanks again

    Steve

    Tuesday, June 23, 2015 3:07 PM
  • Hello,

    Thanks for the response, but I'm sorry I don't really follow.  If I could send the logs to a file, I would see how this would work, but the logs get sent to an outlook mailbox as a zipped attachment and a different mail item for each mailbox searched.

    Further explanation on this process would be greatly appreciated. 

    Thanks again

    Steve

    I think you will have to learn PowerShell to understand.  You import the file so the file exists.  Just get al of the files and generate a single file.


    \_(ツ)_/

    Tuesday, June 23, 2015 3:42 PM