I need to export mail items except for ones that come from or have been sent to particular addresses. I'm using the commands below but I get all of the messages I tried to exclude along with the rest. I need some help.
Based on the documentation your code should work, but I tried it here as well and it doesn't look like it does. I'll try to find out if this is a bug or if some other undocumented syntax is required.
by awmcgregor at 2012-11-13 13:41:12
Hello, Is there any update on this issue?? I have a similar issue, and I don't know if it has to do with the variable I'm using or some other issue. I'm trying to export all items in a certain mailbox that are received in the last 24 hours. I need this to run every day at a particular time, so I'm using the get-date cmdlet and then using the .addDays(-1) to create a start date for my Content filter. However, just as the poster above, I get everything instead of just the one day. If I take the contents of my variable that has the start date and time and paste in verbatim into the script, I get the right output. Below are what my commands look like.