Search-Mailbox -deletecontent...not deleting all items?

Hi, I am trying to purge some data from my Exchange server. I am running:
Search-Mailbox -id username -searchquery "system.message.datareceived:01/01/2011..01/09/2011" -DeleteContent
The first time I ran this against a mailbox it went off and deleted a load of mail. But looking into things further, there is still lots of mail that was received in the period stated. Not sure why the cmd hasn;t got rid of this as well? Also tried system.message.datesent
but again when I run this the log states that there is nothing to delete, even though I have over 200 emails from June-Sept. Whats the deal here?

Hi,
Please try the following command and check:
Search-Mailbox -Identity <username> -SearchQuery "Received:> $('01/01/2011 00:00:00') and Received:< $('01/09/2011 23:59:59')"
–DeleteContent
Hope it helps. If this issue still occurs, please let us know.
Thanks
Sophia Xu
TechNet Community Support

Similar Messages

  • Exchange 2010 SP3 - Search-Mailbox -DeleteContent fails: the search folder timed out.

    We have a bunch of users that have hundreds of thousands of Undelivered Mail Returned to Sender email in their inbox. I believe these mailboxes were compromised and were sending out spam. We have fixed that issue, but I am trying to clean out all these messages
    from their inbox. I have run this command successfully on a few users, but this one in particular is giving me troubles. This mailbox has over 400,000 items to delete so I am wondering if there are just too many to process.
    Search-Mailbox -Identity EMAIL -SearchQuery "Subject:'Undelivered Mail Returned to Sender'" -DeleteContent
    Here is the error:
    The search on mailbox ....... did not complete because the search folder timed out.
        + CategoryInfo          : ReadError: (0:Int32) [Search-Mailbox], SearchFolderTimeoutException
        + FullyQualifiedErrorId : EC2CC554,Microsoft.Exchange.Management.Tasks.SearchMailbox
    I don't like the idea of having to delete these manually. If someone has an idea that would be fantastic.
    Thanks

    Hi,
    Based on the description, you couldn't run the search-mailbox cmdlet to delete all items after several times. I discussed with my colleagues, there is a limit when trying to delete items using search-mailbox cmdlet, it's 10000 at a time if a search query
    is specified. The error you got may be related to the large amount of items. Some scripts may help you to delete them all at a time, you can ask this question on the Script forum to get a better help.
    As a workaround, you can create an Outlook Inbox rule for these messages and move them to a specific folder. After that, you can delete the folder permanently.
    Here is a similar thread for your reference.
    http://community.office365.com/en-us/f/158/t/239292.aspx
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • PURCHASE ORDER STATUS :When Deleting ALL ITEMS.

    Hi experts,
    I need  to make purchase order status stay  " Release Compleated " when deleting all items.
    Anyone Know How to do it?
    Or anyone Know how to use BAPI_PO_CHANGE in BAdI : ME_PROCESS_PO_CUST 
    In my project , I use Release Strategy of purchase orders, and there is a case of deleting all items.
    In this situation, purchase order status returns to "Active " and release strategy tab disappears.
    This is our problem.
    I need to make purchase order status stay  " Release Compleated " and prevent  release strategy tab disappearing.
    I tried to update the fields EREKZ(final invoice) and ELIKZ(delivery completed) in
    BAdI : ME_PROCESS_PO_CUST  Method : PROCESS_ITEM using BAPI_PO_CHANGE according to SAP Note 456691.
    But BAPI_PO_CHANGE couldn't update EREKZ because of our customize , and I couldn't find how to use
    BAPI_PO_CHANGE in the BAdI.
    Anyone know solutions to solve this problem?
    Thanks a lot.
    Regards,
    TKD

    Hi,
    please review the following information in SAP Note No. 456691 as
    copied below:
    18. Question:
    When are the header conditions updated if a purchase order item is
    deleted?
    Answer:
    If a purchase order item is deleted, the item is marked as 'statistical'
    (field EKPO-STAPO = X) and the change is reflected in the header
    conditions.
    However, if for the item the final invoice indicator(EKPO-EREKZ) or the
    inward delivery completed indicator (EKPO-ELIKZ) is set, the item is not
    marked as 'statistical' (EKPO-STAPO is not set) and thus the header
    conditions are not updated.
    I hope this helps you
    BR
    Nadia Orlandi

  • Emptying trash securely does not delete all files? Any ideas?

    When I try and empty trash (securely) it does not delete all files, so I am left with files in the Trash?  Any ideas?

    Select one of the items in the Trash and open the Info window. What does it show for Where?

  • How can I delete all items on the "Done" list in Reminer-App? There are meanwhile hundreds of items (shopping, appoitments, ...) and I don't want to spend hours deleting them.

    How can I delete all items on the "Done" list in Reminer-App? There are meanwhile hundreds of items (shopping, appoitments, ...) and I don't want to spend hours deleting them.

    You can't remove the built-in root certificates, but you can remove their trust bits via the Edit button to prevent Firefox from using them as a trusted root certificate.
    Intermediate certificates that Firefox has stored when visiting websites that show as "Software Security Device" should never has trust bits set.
    Note that it is the responsibility of a server to send all required intermediate certificates to make it possible to build a certificate chain that ends with a built-in root certificate.

  • How to delete all items in download folder under bookmark in the shortest time?

    I understand that all downloads from internet and yahoo/google mail are stored in the "Download" folder which I see under bookmark when I want to delete. I think that if the download folder is never emptied, then my mac will slow down. Therefore I want to delete these downloads which I have already seen. How do I delete ALL items in the shortest time? Deleting items, even in groups, takes a long time. Is there a method that I can use so that all items in the folder are deleted in one stroke?
    Thanks.
    Unguja

    Try (first button on toolbar) Organize > Select All (Command + A) to select all items in the right pane in the Library.

  • How to delete all items in the HUB ?

    How to delete all items on shot in the HUB ?

    Hi all,pay attention to the words I've marked in bold in the first answer from the technical support member:  "From the BlackBerry Hub, hold your finger on the date at the top of the list. A side menu will appear. Click on the Garbage Can to delete all messages prior to that date" At first, I also didn't understand how to make it works, but you have to slide until the date is at the top of displayed messages, then you can tap and hold to select all messages preceding that date. 

  • Delete command is not deleting all rows

    Hi All,
    Database version 10.2.0.2
    Delete command is not deleting all rows and deleting some subset of rows which it should delete, ever time I delete and do the roll back, next time it will delete some random rows, count is different everytime with in the range but not complete in anyway. see the following -
    select count(*) from test where evt_id in (select evt_id from test1);
    COUNT(*)
    27105
    delete from test where evt_id in (select evt_id from test1);
    16045 rows deleted.
    select count(*) from test where evt_id in (select evt_id from test1);
    11060
    rollback;
    Againg the same procedure -
    select count(*) from test where evt_id in (select evt_id from test1);
    COUNT(*)
    27105
    delete from test where evt_id in (select evt_id from test1);
    14320 rows deleted.
    select count(*) from test where evt_id in (select evt_id from test1);
    COUNT(*)
    12785
    why its not deleting all the 27k rows in one shot? Is there any bug related to that?
    Thanks
    Abhinav

    Odd that what looked like identical statements produced different results, both the counts and the deletes. The most likely cause of that is your data is changing - as Fahd suggested perhaps a simultaneous load taking place.
    The delete issue is probably not due to a bug. Possible but unlikely.
    If any evt_id values are NULL they won't be deleted with the subquery - a NULL in test.evt_id will never match a NULL in test1.evt_id.
    Have you tried alternative subqueries - a correlated EXISTS subquery for instance?

  • Delete obsolete does not delete all backupset

    Dear friends,
    I take backup with the "backup database plus archivelog". For example, it took 3 backup, 3 archivelog and 1 control files. I took a backup 5 minutes later to try "delete obsolete" command. It also took same number of files.
    When i typed "delete obsolete" command, it only removes 1 backup and 1 control file from old backupset. 2 backup and 3 archivelog files are still there.
    What am i wrong? OR How can i delete all old backupset files(backups,copies,controlfiles,...)?
    You can find the details below,
    Thanks in advance and Best Regards;
    Onur
    RMAN> show all;
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oranew/arch/cf_%F';
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
    CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/oranew/arch/%U.bak';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oranew/9i/dbs/snapcf_....f'; # default
    CONFIGURE EXCLUDE FOR TABLESPACE 'CWMLITE';
    CONFIGURE EXCLUDE FOR TABLESPACE 'EXAMPLE';
    List of Backup Sets
    ===================
    BS Key Device Type Elapsed Time Completion Time
    812 DISK 00:00:01 11-JUL-06
    BP Key: 813 Status: AVAILABLE Tag:
    Piece Name: /oranew/arch/1hhntfj9_1_1.bak
    List of Archived Logs in backup set 812
    Thrd Seq Low SCN Low Time Next SCN Next Time
    1 270 1147860 11-JUL-06 1147877 11-JUL-06
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    816 Full 313M DISK 00:01:50 11-JUL-06
    BP Key: 817 Status: AVAILABLE Tag:
    Piece Name: /oranew/arch/1ihntfjd_1_1.bak
    List of Datafiles in backup set 816
    File LV Type Ckp SCN Ckp Time Name
    1 Full 1147880 11-JUL-06 /oranew/oradb/oradata/.../system01.dbf
    2 Full 1147880 11-JUL-06 /oranew/oradb/oradata/.../undotbs01.dbf
    4 Full 1147880 11-JUL-06 /oranew/oradb/oradata/.../drsys01.dbf
    6 Full 1147880 11-JUL-06 /oranew/oradb/oradata/.../indx01.dbf
    7 Full 1147880 11-JUL-06 /oranew/oradb/oradata/.../tools01.dbf
    8 Full 1147880 11-JUL-06 /oranew/oradb/oradata/.../users01.dbf
    BS Key Device Type Elapsed Time Completion Time
    828 DISK 00:00:01 11-JUL-06
    BP Key: 829 Status: AVAILABLE Tag:
    Piece Name: /oranew/arch/1jhntfn4_1_1.bak
    List of Archived Logs in backup set 828
    Thrd Seq Low SCN Low Time Next SCN Next Time
    1 271 1147877 11-JUL-06 1147884 11-JUL-06
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    832 Full 1M DISK 00:00:01 11-JUL-06
    BP Key: 833 Status: AVAILABLE Tag:
    Piece Name: /oranew/arch/cf_c-4041210959-20060711-00
    Controlfile Included: Ckp SCN: 1147886 Ckp time: 11-JUL-06
    BS Key Device Type Elapsed Time Completion Time
    839 DISK 00:00:01 11-JUL-06
    BP Key: 840 Status: AVAILABLE Tag:
    Piece Name: /oranew/arch/1lhntfod_1_1.bak
    List of Archived Logs in backup set 839
    Thrd Seq Low SCN Low Time Next SCN Next Time
    1 270 1147860 11-JUL-06 1147877 11-JUL-06
    1 271 1147877 11-JUL-06 1147884 11-JUL-06
    1 272 1147884 11-JUL-06 1147890 11-JUL-06
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    845 Full 313M DISK 00:01:51 11-JUL-06
    BP Key: 846 Status: AVAILABLE Tag:
    Piece Name: /oranew/arch/1mhntfoh_1_1.bak
    List of Datafiles in backup set 845
    File LV Type Ckp SCN Ckp Time Name
    1 Full 1147893 11-JUL-06 /oranew/oradb/oradata/.../system01.dbf
    2 Full 1147893 11-JUL-06 /oranew/oradb/oradata/.../undotbs01.dbf
    4 Full 1147893 11-JUL-06 /oranew/oradb/oradata/.../drsys01.dbf
    6 Full 1147893 11-JUL-06 /oranew/oradb/oradata/.../indx01.dbf
    7 Full 1147893 11-JUL-06 /oranew/oradb/oradata/.../tools01.dbf
    8 Full 1147893 11-JUL-06 /oranew/oradb/oradata/.../users01.dbf
    BS Key Device Type Elapsed Time Completion Time
    857 DISK 00:00:01 11-JUL-06
    BP Key: 858 Status: AVAILABLE Tag:
    Piece Name: /oranew/arch/1nhntfs8_1_1.bak
    List of Archived Logs in backup set 857
    Thrd Seq Low SCN Low Time Next SCN Next Time
    1 273 1147890 11-JUL-06 1147898 11-JUL-06
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    861 Full 1M DISK 00:00:01 11-JUL-06
    BP Key: 862 Status: AVAILABLE Tag:
    Piece Name: /oranew/arch/cf_c-4041210959-20060711-01
    Controlfile Included: Ckp SCN: 1147900 Ckp time: 11-JUL-06
    RMAN> delete obsolete;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to redundancy 1
    using channel ORA_DISK_1
    Deleting the following obsolete backups and copies:
    Type Key Completion Time Filename/Handle
    Backup Set 816 11-JUL-06
    Backup Piece 817 11-JUL-06 /oranew/arch/1ihntfjd_1_1.bak
    Backup Set 832 11-JUL-06
    Backup Piece 833 11-JUL-06 /oranew/arch/cf_c-4041210959-20060711-00
    Do you really want to delete the above objects (enter YES or NO)?

    Dear Kuljeet,
    I am new in rman. As i understood from your reply that rman only deletes the backup piece which includes all dbfs and its related control file. These two files are deleted from catalog and also from filesystem.
    But other archievelogs (from first backup) joins to the second backup,as you said. This goes on like that in every backup if we take backup with "plus archivelog" parameter. Am i right?
    And they won't be deleted from the file system.
    I think the answers to the following questions will solve my confusion.
    1. Should not we delete (from catalog and fs, for ex. "delete archivelog ...") the previous archivelogs, even the latest backup set is enough to recover database?
    2. Let's say, we moved all these files (old archivelogs and latest dbf backups) to tape. I don't think so but should we keep all the old archivelogs to recover db even the ones from the latest backup is enough?
    3. Is "plus archivelog" parameter very important for a backup?
    I was confused about the principles of "delete obsolete" when the backup was taken with "plus archivelog" parameter. If you can explain it shortly, i will be very pleased. Why it did not delete all pieces of the previous backup set (from catalog and fs.), while the latest backup set is enough to recover db? I could not understand this.
    Thanks in advance and best regards,
    Onur

  • "ADF Navigation List" does not shows all items that are in table

    Hi
    Thank you for reading my post
    I am tring to use "ADF Navigation List" , (it can be draged from data control platte into a form)
    but when i drag and drop it on my form it does not shows all items that are available in my table ?
    it just shows 10 item when i have 60 record in my Table.
    Thanks

    Hi,
    in the pageDef ile, select the iterator for this list and set the fetch size to -1 (its 10 by default)
    Frank

  • Ipadmini inbox maintains there are 907 items in inbox, but I have deleted all items. How do I get rid of the numbers?

    ipadmini inbox maintains there are 907 items in inbox, but I have deleted all items. How do I get rid of the numbers?

    You can't delete the All On My Mac as it is an automatic group to display all of the contacts that are stored "On My Mac." You can delete all of the contacts that are in the ON MY MAC section by selecting All ON My Mac and then selecting all contacts. Press delete and approve the deletion. Then, select each group under ON My Mac and delete those individually.
    Then, Make sure iCloud is set as the default account in the General Address Book Preferences.

  • Search-Mailbox can't get all the items one time

    Support there are 10 items are satisfied the following search condition,then if I run the following commands, it should delete all the 10 items.
    but to my surprise, when I run the following command ,it just delete part of the 10 items, such as 5, or 8 .
    so I have to run the command once again to delete the remains items
    So my question is how to delete all of the 10 item one time? why I can't delete all of them one time?
    Search-Mailbox -Identity "administrator" -searchdumpsteronly -SearchQuery 'retentionpolicy:"NONARCHIVETAG"' -DeleteContent -confirm:$false -Force
    Please click the Mark as Answer button if a post solves your problem!

    Hi,
    Could you please create a new test mailbox and delete the messages by using subject query? Is it the same issue?
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • Export-Mailbox - DeleteContent not working

    Server: Exchange 2007 SP3 RU 10
    Client: Outlook 2010 SP1, OWA with IE 9
    ++++
    According to this (and other sources)...
    http://technet.microsoft.com/en-us/library/bb266964(v=exchg.80).aspx
    I should be able to search for, and delete, messages using this command:
    Get-Mailbox -Database DB1 | Export-Mailbox -SubjectKeywords "Virus message" -DeleteContent
    "This example first gets all the mailboxes on database DB1, searches for items that contain the string "Virus message" in the subject, and deletes those items."
    +++++
    I only tried this because a colleague mentioned that he had tried and could not make it work. So I though I would investigate.
    So I had test user Alan Reid send seven emails to test user Aisha Bhari. The subject was respectively: Blue, Red, Yellow, North, South, West and East. The content was "Export-Mailbox test 1" then 2, 3, 4, etc.
    So at the start of the experiment, Aisha Bhari's Inbox looks like this:
    Thinking, at first, that I needed to have an export folder (in fact, if I just want to delete, that is not necessary) I executed the following command:
    export-mailbox [email protected] -TargetMailbox ExportMailbox -TargetFolder ForDeletion -SubjectKeywords
    "Red" -DeleteContent
    Then realizing that was not necessary, and that the processing of the Calendar and Contacts was delaying the experiment, I used this command:
    export-mailbox [email protected] -SubjectKeywords "Red" -ExcludeFolders "\Calendar","\Contacts" -DeleteContent
    I tried "Red" with and without quotes.
    I tried "Blue" and "North". I tried the -ContentKeywords switch with strings like "mailbox" and "test".
    The output that displays after the command is executed puzzles me. I read:
    StandardMessagesDeleted          : 0
    AssociatedMessagesDeleted        : 0
    DumpsterMessagesDeleted          : 0
    MoveType                         : DeleteOnly
    MoveStage                        : Completed
    StartTime                        : 12/26/2013 4:36:56 PM
    EndTime                          : 12/26/2013 4:37:28 PM
    StatusCode                       : 0
    StatusMessage                    : Messages have been deleted from the source mailbox.
    0 messages have been deleted and "Messages have been deleted from the source mailbox."
    If I look at the content of Aisha's mailbox however, the message "Red" is still present, observed in both Outlook and OWA, after logging off and back on again. And thus, obviously, closing and opening both Outlook and OWA. What I see is what you
    (still) see in the image posted above. That's it.
    Does anyone know why this is not working?
    +++++
    What about the logs? Well, there is one created for each  "export" attempt. Here is one example:
    [12/26/2013 5:35:01 PM] [0] Executing Command: 'get-mailbox
    [email protected] | export-mailbox -ContentKeywords "Mailbox" -ExcludeFolders "\Calendar","\Contacts" -DeleteContent '
    [12/26/2013 5:35:01 PM] [0] Administrator Active Directory session settings are:  View Entire Forest: 'False', Default Scope: 'mynet.lan', Configuration Domain Controller: 'DC2.mynet.lan',
    [12/26/2013 5:35:01 PM] [0] Searching objects "[email protected]" of type "ADUser" under the root "$null".
    [12/26/2013 5:35:01 PM] [0] Previous operation run on domain controller 'DC2.mynet.lan'.
    [12/26/2013 5:35:01 PM] [0] Previous operation run on domain controller 'DC2.mynet.lan'.
    [12/26/2013 5:35:01 PM] [0] Preparing to output objects. Maximum result set size "1000".
    [12/26/2013 5:35:01 PM] [0] Searching objects "mynet.lan/ExchangeUsers/Aisha.Bhari" of type "ADUser" under the root "$null".
    [12/26/2013 5:35:01 PM] [0] Previous operation run on global catalog server 'DC2.mynet.lan'.
    [12/26/2013 5:35:01 PM] [0] Processing object "mynet.lan/ExchangeUsers/Aisha.Bhari".
    [12/26/2013 5:35:01 PM] [0] Searching objects "ex1" of type "Server" under the root "$null".
    [12/26/2013 5:35:01 PM] [0] Previous operation run on domain controller 'DC2.mynet.lan'.
    [12/26/2013 5:35:01 PM] [0] Searching objects "ex1\SG1\MBXDB1" of type "MailboxDatabase" under the root "$null".
    [12/26/2013 5:35:01 PM] [0] Previous operation run on domain controller 'DC2.mynet.lan'.
    [12/26/2013 5:35:04 PM] [0] Ending processing.
    [12/26/2013 5:35:04 PM] [0] Ending processing.
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] The operation has started.
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] Approving object.
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] Trying to open mailbox:
     szServerLegacyDN: /o=MYNET/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=ex1
     szUserLegacyDN: /o=MYNET/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=Aisha.Bhari
     szServer: EX1.mynet.lan
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] Open mailbox succeeded.
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] The operation has finished.
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] The operation has started.
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] Approving object.
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] Opening source mailbox.
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] Trying to open mailbox:
     szServerLegacyDN: /o=MYNET/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=ex1
     szUserLegacyDN: /o=MYNET/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=Aisha.Bhari
     szServer: EX1.mynet.lan
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] Open mailbox succeeded.
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] Moving messages.
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] Exporting messages.
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] Merging messages.
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] 0 items could not be moved to the target mailbox.
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] Messages moved. Closing connections.
    [12/26/2013 5:35:04 PM] [0] [Aisha.Bhari] The operation has finished.
    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.

    Hi David,
    From your description, I would like to clarify the following things:
    1. You need to grant the account which perform the task the full mailbox access permission.
    2. Export-Mailbox only marks the items for delete. It doesn't actually delete them. So "-DeleteContent" only marks it for deletion. Your mailbox retention schedule will delete the actual emails.
    Hope it helps.
    If there are any problems, please feel free to let me know.
    Best regards,
    Amy
    Amy Wang
    TechNet Community Support

  • Search-Mailbox -SearchQuery not filtering time correctly

    After reading: http://technet.microsoft.com/en-us/library/dd298173(v=exchg.150).aspx
    which links off to: http://msdn.microsoft.com/library/ee558911%28v=office.15%29.aspx
    I made the following PowerShell script for testing before I start deleting anything:
    $A=Get-Date '18/7/2014'
    $Start=Get-Date $A.ToUniversalTime() -Format yyyy-MM-ddThh:mm:ss
    $End=Get-Date $A.AddDays(1).ToUniversalTime() -Format yyyy-MM-ddThh:mm:ss
    $SearchQuery='Received>="'+$Start+'" AND Received<"'+$End+'"'
    Search-Mailbox -Identity 'mailbox@domain' -SearchQuery $SearchQuery -TargetMailbox 'targetmailbox@domain' -TargetFolder Inbox -LogOnly -LogLevel Full
    The results I get back are all the emails between 17/7/2014 12:00 AM - 18/7/2014 12:00 AM
    When I thought it should be the emails between 17/7/2014 2:30 PM - 18/7/2014 2:30 PM (Our time zone is +9:30)
    Does the query I'm passing to -SearchQuery need tweaking or am I doing something else wrong?
    The $SearchQuery variable expands out to this:
    Received>="2014-07-17T02:30:00" AND Received<"2014-07-18T02:30:00"
    I'm using the Search-Mailbox cmdlet because is wish to adjust this script to use the -DeleteContent paramater

    Hi,
    I recommend you post this in
    Powershell Forum also, as they should have more professional knowledge on scripting and you may get effective solution timely.
    Thanks.
    Niko Cheng
    TechNet Community Support

  • "search iphone" database not deleting

    I've deleted a lot of old iMessages and they still show up in the "search iPhone" results. Is there a way to either clear the search index to remove these old items or to turn off the search indexing of SMS/iMessages?

    This amounts to a security problem. If you sent a confidential text, and then deleted it, but it can still be found using the search iPhone feature, it's not very confidential

Maybe you are looking for

  • Is there a way to predict which video projectors will not work with the 2012 MacBook Air using the Mini-display to VGA adapter?

    I recently upgraded from a 2011 MBA to a 2012 MBA due to the larger capacity SSD.  The 2011 MBA running Lion and Mountain Lion worked with every video projector for lectures.  The new 2012 MBA is hit or miss with video projectors.  It is not an adapt

  • Colour Range Tool not Working in CC as it did in CS6.

    Hi,  I'm currently trying out Ps CC and have realised that the Colour Range tool is not working as it did in CS6. Rather than selecting the solid colour sampled by the eye dropper (in this case pink from a blue and pink design) it is selecting fragme

  • ABAP IS-Retail

    Hi, I am an ABAP Consultant and am newly into IS-Retail module. I may be working mostly on Reports,Scripts and User Exits.Could anyone let me know how IS-Retail can be significantly different from other modules technically (not functionally).I know e

  • Can i use thinkpad X1 with 65W adapter?

    just got X1 and it came with 90W adapter, which is bulkier than 65 W. i think it came with 90W cuz of that rapid charge feature. i have 65 W adapter from my other thinkpads. can i use it rather than 90W on my X1? Other than that rapid charge feature,

  • The audio isn't comming on when i play songs

    the little speaker comes up but the little sound icon isn't comming out of it, this is on itunes, anyone????