HELP! Exchange 2013 shell command to get both a count and then later copy specific emails from a particular user
Posted on 2014-11-10
Shell is new to me and I recently downloaded Power-GUI. I am fairly good with MySQL(SQLYOG user) and MSSQL statements. I am also decent with Winbatch, But so far I am lost with powershell cmdlets. I need to do two things.
I need to get total count of email in a users mailbox Lets say "John email@example.com" I need the count of all emails sent to and received from a clients domain such as wildcard@NotMyDomain.com" Something like
getemailcount WHERE mailboxnameis "John Doe" AND WHERE senderis LIKE "notmydomain.com" OR recipientis LIKE "notmydomain.com"
Then once I have the counts confirmed I would like to run a second script that does the same thing as the first except each result is copied to another mailbox or a public folder.
I am pressed for time so figure I would ask here. Wish we could use the old system and award points as we see fit.