Why can't I delete mailbox items before a certain date?

What appears to be wrong with my syntax here? I am trying to delete all emails from the beggining of time up until today's date. I know it seems pointless because I could just execute -DeleteContent without a SearchQuery, but
I am trying to prove a concept here.
$date
= (get-date).ToShortDateString()
Search-Mailbox
userID -SearchQuery
"Received:<$($date)"
–DeleteContent
There are about 5 mail items that were sent yesterday (4/24/2014) in the mailbox I am testing with. My
ResultItemCount is still 0 though. I was curious, so I sent it a couple of emails this morning. When I remove the
< sign in my query, it actually does delete all emails that were sent today, and the
ResultItemsCount was 2.
Is it not liking the < sign? If so how do I work around that?

I'm not sure about the overall syntax right there, but if you want to indicate greater than or less than in Powershell, you use "-gt" and "-lt". Likewise, for equals, you do not use the = sign but rather -eq
Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

Similar Messages

  • Why is my iPad slow after downloading ios8, why can't I back up Ti icloud,why can't I delete mailboxes

    After downloading ios8, why I can no longer back up to i cloud,I cannot delete mailboxes,multitasking gestures do not work,why ?

    After downloading ios8, why I can no longer back up to i cloud,I cannot delete mailboxes,multitasking gestures do not work,why ?

  • How do I set a date line in my email so I can delete all msgs before a certain date?

    i have thousands of emails downloaded and i want to delete all but the most recent couple months..but i can't figure out how to insert the date line in the display so I can delete all prior to that date (I used to be able to do that on my Razor Maxx)

        sharonnyc,
    We would love to investigate into assisting you with getting the correct emails deleted. What make/model device do you currently have? What email program are you trying to delete the emails from (ie. Gmail, Yahoo, etc...)? Also, are you using the standard email application on the device or a downloaded 3rd party email app?
    LindseyT_VZW
    Follow us on Twitter @VZWSupport

  • Why can't I delete added mailboxes on my iPad mini since iOS 8 update? Every time I try to delete an old mailbox that I added it boots me right out of mIl completely. I want to clean up and get rid of old unused mailboxes?

    why can't I delete added mailboxes on my iPad mini after the ios8 update?

    The mail app is crashing on you for some reason. Close the mail app and reset your iPad.
    In order to close apps, you have to drag the app up from the multitasking display. Double tap the home button and you will see apps lined up going left to right across the screen. Swipe to get to the app that you want to close and then swipe "up" on the app preview thumbnail to close it.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.
    If that doesn't help, you can also try resetting all settings. You will not lose any data, but most of the device settings will have to be entered in the settings app again. Settings>General>Reset>Reset all Settings.

  • Why can't I delete a contact in my Iphone 5?, Why can't I delete a contact in my Iphone 5?

    Why can't I delete a contact in my Iphone 5?, Why can't I delete a contact in my Iphone 5?
    I have deleted it  on Icloud but it's still in my phone whenever I wrote the first letter in someones name.. My contacts i deleted are still there..
    It's so annoying how can I get rid of them?

    For the purpose of keep your privacy safe, you’d better do something before you change or sell your old iPhone. Deleting all data on your iPhone completely and permanently is a best choice to prevent your important private data from leaking.
    To Move Contacts group from iPhone Permanently,you must to use a iPhone data eraser software.This use guide about how to Wipe iPhone contacts permanently,it can help you delete all contacts from iPhone permanently.
    Read more here: https://itunes.apple.com/us/app/contacts-in-import-csv-manage/id549639443?mt=8&a ffId=1822652

  • On an iMac why can't you delete an email without opening it?

    Why can't I delete an email without opening it first? Is this not a security risk as I have always been advised that, if I don't know who the email is from, I should delete it so as to avoid opening any suspect attachments that open immediately.
    This is my first Mac so could it be that I have not realised how to do this?
    My wife can do this on her iPad.

    A couple of points:
    1. Your concern is not really an issue with macs. More of a PC thing. "Suspect attachments" are extremely, extremely rare for a mac. I mean, like one since 1984, when I bought my first mac. The reason is that Apple seems to be on top of things and keeps updating mac software to protect your mac from this sort of thing. Just keep up with the system updates and you won't have a problem. Microsoft, on the other hand, makes tons of security holes in their software because of their mindset, i.e., that the consumer is a moron and the enemy.
    2. In my mail.app, there are three columns in the message viewer, the first which lists the mailboxes, the second which lists the emails, and the third which is a preview window. I can select an email in the second column and delete it without opening it, so I don't see what the problem is that you're having.

  • Why can't I delete some of my emails

    Why can't I delete some of my emails?

    If it only happens with selected emails and not all of them, I don't think this is the problem, but you can check this to be sure.
    Go to Settings>Mail, contacts, calendars>Your email account>tap the blue arrow next to the email address under Account>Advanced>Deleted Mailbox>On my iPad>Trash. I have an IMAP account and it is set to On the Server>Trash.

  • Why can't I delete Mail from my iPhone? it just allows me to Archive, and where do the archives go?

    Why can't I delete Mail from my iPhone? it just allows me to Archive, and where do the archives go?

    You'll have to go to your Settings -> Mail, Contacts, etc -> Email Account -> Advanced -> Deleted Mailbox
    Turn off Archive mode, Turn on Trash
    You can also put the phone in airplane mode to delete them real quick, but that's only a temporary fix.

  • Why can't i delete photostream from icloud ??

    I was trying to delete some picture that i don't want to share with anyone so why can't i delete or where it the button say that is should be somewhere say DELETE BUTTON on photostream??
    I did go to icloud and click on advanced to reset my photostream but it keep saying error urgh why am i getting this again and again?? it shouldn't be so difficult just to delete only few pictures but why should i reset whole picture why WHY?? I think you guys struggling since RIP Steven Job passed away and you should be able fix this by now so please please help me on this thank you....

    I didn't say SJ announced the lack of a delete facility.
    I meant the way it works now is the way it worked when it was announced by him back in June because the OP was implying that due to SJ no longer being with us, somehow that had some bearing on there being no delete function, and somehow that must mean Apple are struggling without him.
    Too frequently on these forums lately, people attribute what they see as "bugs", "omissions" or "oversights" as being a result of Steve Jobs no longer being around, when in fact these things were decided long before Steve even stepped down as CEO.
    Photo Stream wasn't developed in-between 5th October and 12th October, so SJ would've known about the lack of a delete function way back in June, and long before that too.

  • Why can't I delete books from iBooks/iCloud?

    Why can't I delete books from iBooks/iCloud?

    What happens when you try to delete them from the iBooks app on your Mac ? If they are downloaded into the app (i.e. they don't have the cloud symbol on them) then you should be able to select them and then press the delete button on your keyboard to delete them.
    In terms of the cloud, you can't permanently delete any item from your purchase history, all you can do is hide them so that they don't show for redownloading, which you can either do via your computer's iTunes : http://support.apple.com/kb/HT4919
    Or for the iBooks app you can go into the Store in the app, and on the Featured tab select the Purchased link under Quick Links on the right-hand side of the screen and hide them (hover your mouse pointer on a book and it should get an 'x' on its top left corner, click that to hide the book).

  • Why can't I delete pictures off of camera roll. I also can't send a picture to a friends phone. One last question.......why do pictures freeze up on the screen and I have to hit the power button to go back to home screen. Thanks for any help.

    Why can't I delete pictures off of camera roll?  I also can't send Pictures to someone else's phone. My picture seems to freeze up and I can't do anything, particularly delete the picture. I'm new to iPhone so I'm really just learning how this iphone thing works :)

    Did you recently start using iCloud to backup your photos?
    Wife had the same problem today.  Remembering that I had recently signed her up for more space on iCloud and started backing up her photos, I decided to roll the dice and turn that off.  Plug phone back into computer and *boom* I now have the option to delete.  Now I just have to figure out how I can do both = \

  • Why can't I delete a user name and password from saved passwords in iOS 7?

    Why can't I delete a user name and password from saved passwords in iOS 7? I found them and they are not anything that I am familiar with? They are from a t-com.de. I have been to Germany in the last month. Not sure if there is any association. Any thoughts? 

    You found them ... where?  Are they in Safari somewhere?
    If so, do Settings > Safari > Clear History and Settings > Safari > Clear Cookies and Data
    If that doesn't clear them (and they are from Safari), try Settings > Safari > Advanced > Website Data and clear that area.

  • Why can I not delete a book from my iTunes library

    Why can I not delete a book from my iTunes library. There are many books that I want to delete and replace with current books, but cannot remove the old books.  Thanks  Guy

    Hey cjt101,
    Thanks for the question. Was this song purchased from the iTunes Store? If so, it may be that your device is configured to show all of your purchased music that has not yet been downloaded. The following resource may resolve your issue:
    iCloud and iTunes Match - iPhone
    http://help.apple.com/iphone/8/#/iphb8d9fd5a6
    View only music that’s downloaded. Go to Settings > iTunes & App Store. Under Show All, turn off Music.
    Thanks,
    Matt M.

  • Why can I not delete any emails on iPhone. 5?

    Why can I not delete any emails on my iphone5?

    Thx. That seems to have solved my problem. I don't know but just all of a sudden when I opened an emal there was no option at the bottom.  After doing as you suggested, now all the options are back. Quite confusing to me. I do appreciate your suggestion and fix.

  • Why can't I delete or edit my checkboxes in acrobat 8?

    Why can't I delete my checkboxes in Adobe acrobat?? I have created and deleted hundreds of checkboxes all with different functions. I have never run into this problem. I can't edit, move, or delete a checkbox. Nothing happens when I hover over it. They work just fine when you check them, you just can't edit them. Help!

    I'm using Adobe Acrobat 8 Professional. I literally just used that to create my form. It's very basic. No - the form is not secured. And I have no idea what enabling a form for extended rights.
    It's as simple as this. I have created a form out of a blank adobe acrobat page. I just started a new document. I have created around 200 checkboxes. All of which worked up until yesterday. They still check and uncheck. I just can't edit them. When I hover my mouse over the checkbox, it doesn't light up red anymore (which means you're hovering over an editable form) it is just the cross; the same one you use to create a checkbox.
    I'm using no special program. Simply Adobe Acrobat 8 professional

Maybe you are looking for

  • Pls help me with this installation problem. Your advice is highly needed.

    I am installing oracle 11.1.6.0 on windows xp professional everything was going fine untill there was a pop up that reads below INFO: exit-tool: Launch browser INFO: saving exit only tools ... INFO: no detached only tools in this session INFO: exit-o

  • Connecting my xbox 360 to my cable box

    I have recently been gifted a flat screen TV. It's HDMI inputs are being used by the cable box & my blue ray player. What I want to do is connect my gaming console to the cable box. Can someone instruct me on how to do this and how to access it once

  • Write protection error with my soundblaster live

    Running win ME and cannot fully install soundblaster software disk.Doing a complete install.When system reboots,blue screen with the "Write Protection Error".Have to shut down comp with power switch. Then when I turn it back on,it comes up in safe mo

  • How do I replace SendNow in Outlook with Adobe Send?

    I wish to change the parameters from the older version of SendNow to Send within my Outlook account. How is this done?

  • Inability to Import to Powerpoint, Word, PDF

    Anyone have problems importing their dashboard to PowerPoint, et.al.?  The initializing box comes up but then never finishes.  Most of the dashboard loads but parts of it do not?