How to delete expired messages from mailboxes using EMS

Hi.   I'm on a quest to come up with something that will delete old/expired messages.   This is with Exchange 2010 in SBS 2011.  I got the suggestion of the following EMS code:
Get-Mailbox -Identity "some user mailbox" | Search-Mailbox -SearchQuery expires:4/10/13 -DeleteContent
So I ran this and got an error.   It didn't work.   Some research let me know that the error I was getting indicated that the user I was working as needed to be part of a group.   I added that user (Administrator) to that group
and tried again.  This time I got a different error.  More research and found that I needed to be in a role group.   OK.   Did that and yet another error.   Still more searching and found that there was another role
group that was needed.   Added that role group and thought OK this is going to be it.  Unfortunately there were two new, never before seen, error messages.   It said I need to specify a TargetMailbox and a TargetFolder.  
While I did specify a legitimate mailbox obviously something is wrong, but what.   Does anyone have any ideas?
The goal of all this is simply to come up with a script of some sort where we can delete all messages older than 1 year.   We would want to run this regularly, probably every Sunday.   Further we'd want to purge old messages in all folders.

Well, I tried again this morning and did not get the previous error message that I posted about.   Instead I got this.  It almost seemed to work, or at least try up until the new error.
         Welcome to the Exchange Management Shell!
Full list of cmdlets: Get-Command
Only Exchange cmdlets: Get-ExCommand
Cmdlets that match a specific string: Help *<string>*
Get general help: Help
Get help for a cmdlet: Help <cmdlet name> or <cmdlet name> -?
Show quick reference guide: QuickRef
Exchange team blog: Get-ExBlog
Show full output for a command: <command> | Format-List
Tip of the day #7:
The Exchange Management Shell is a calculator too! Try it directly at a command prompt:
 1.2343+3123 or (23/435)*2
VERBOSE: Connecting to PPSVR3.PivotPoint.local
VERBOSE: Connected to PPSVR3.PivotPoint.local.
[PS] C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Exchange Server 2010>get-mailbox -identity "dave fen
ske" |search-mailbox -searchquery expires:4/10/13 -deletecontent
Confirm
Deleting content from mailboxes xxxxxxx/MyBusiness/Users/SBSUsers/dave f
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): a
The property keyword isn't supported.
    + CategoryInfo          : InvalidArgument: (:) [], ParserException
    + FullyQualifiedErrorId : 34E99521
[PS] C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Exchange Server 2010>get-mailbox -identity "dave fen
ske" |search-mailbox -searchquery expires:4/10/13 -deletecontent
Confirm
Deleting content from mailboxes xxxxxxxx/MyBusiness/Users/SBSUsers/dave f
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): A
The property keyword isn't supported.
    + CategoryInfo          : InvalidArgument: (:) [], ParserException
    + FullyQualifiedErrorId : 34E99521
[PS] C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Exchange Server 2010>

Similar Messages

  • How to delete the messages from SXMB_MONI which are already cancelled .

    Hi All,
    The messages were earlier in System error(Red flag) state so i cancelled it manually.
    I want to know how to delete the messages from sxmb_moni which are already cancelled manually using ctrl+f8.
    if not possible , then i want to see them in earlier state i.e.., in System error(Red flag).
    can any tell me the procedure of doing it.
    thanks
    Sai.

    Hi AmitSri,
    Thanks for u r reply,
    What is retention period, where can i find this option.
    And i don't have authorizations to sxmb_adm --> configure delete procedure
                                                                             --> Define interfaces for archiving and retention period.
    and to RSXMB_DELETE_MESSAGES in se38 , i don't have authorizations to run
    Is there any way to delete the messages or make them to System error( Red flag) which are manually cancelled.
    Thanks
    Sai.
    Edited by: sai_SHA on Aug 17, 2011 12:29 AM

  • How to delete the messages from sxmb_moni with status cancelled

    Hi ,
    how to delete the messages from sxmb_moni with status cancelled
    Is there any report for this
    Regards
    Suman

    I think just for deleting the jobs you can do this only
    Scheduling Delete Jobs
    To schedule delete jobs, proceed as follows:
           1.      In the Integration Engine -
    > Administration menu, choose Schedule Delete Jobs.
           2.      Select the job(s) to be scheduled.
           3.      Specify the start time and date.
           4.      Specify the period you want to use and choose Schedule.
    For an overview of all jobs, choose Jobs.

  • How to delete the messages from JMS Queue

    Hi,Can anybody help how to delete the messages from the JMS Queue.Thanks in advance.

    You can dequeue the message using a JMS client or delete it using Weblogic Admin Console -
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e13952/taskhelp/jms_modules/queues/ManageQueues.html
    Regards,
    Anuj

  • How to delete an operation from order using the bapi

    Can somebody please tell me how to delete an operation from order using the bapi
    BAPI_ALM_ORDER_MAINTAIN.
    Following was the test data for the BAPI.
    000000 OPERATION DELETE 0000040052810070
    000000 SAVE 0000040052810070
    Even I tried entering the operation table. The BAPI control ends fine, but when I check the order using IW32, the operation still exists.
    So, can you please tell me where Iam going wrong.

    Hi Subash Mohanvel,
    Check bapireturn parameter of the bapi BAPI_ALM_ORDER_MAINTAIN after execution of the code , and if there is no error message in the return table then call bapi_Transaction_commit.
    Unless you call this database saving of the records/values will not get reflected in the system.
    Hope that helps.
    Regards
    Kapadia
    ***Assigning points is the way to say thanks in SDN.***

  • HT3529 How to recover deleted text messages from iphone using iPhone

    I'm trying to recover text messages I deleted on my iPhone4s. Is it possible?
    Is it possible to do with out using a computer. If possible I'd like to recover the messages using my iPhone.

    If the backup is made after the messages were deleted, then you won't be able to get them back via an iTunes restore. However, you may be able to use a third-party program to look at the backup made after the messages were deleted and see what information about those messages is recoverable.
    One program, the one I work on, is called Decipher TextMessage. Our software will scan the text-message database and show you what information (whole and incomplete) was found that has been previously deleted. We've had a lot of success helping folks recover their deleted text messages -- it doesn't always work 100% since we're at the mercy of how the database works but it's worth a shot to see what you can find!
    The website for Decipher TextMessage is http://deciphertools.com
    You're also welcome to visit our website, try the software free, and send us any questions that you have.
    Disclaimer: Since I work on Decipher TextMessage, I stand to benefit from the links to our website that I've made above.

  • How to delete a song from iphone using "itunes 12"

    iTunes 12 & iPhone 5s v8.1, iTunes installed on PC with Windows 7
    I need to delete some songs from my iPhone. They are not on any playlist. I see no way to delete them using either iTunes or the iPhone.
    How do I delete songs from my iPhone using the iPhone OR iTunes?

    I also have this question as well. I've done everything from turning off the "show all music" to turning off icloud. After hours of frustration, I decided to delete all music and just re-download the songs i actually want on my phone. Apple makes everything so much more difficult than it has to be. Next time, I'll try the "throw phone at wall" method.

  • How to delete a files from MNT using scripting in OSD

    Hi ,
    I am looking a method for deleting a set of files present in virtual drive(MNT).
    Please let me know scripting methods that can achieve above things and i can add that in OSD FIle.
    Kindly advise
    Umeed4u

    Here's two basic options (this does not count as scripting):
    http://ss64.com/ps/remove-item.html
    http://ss64.com/nt/del.html
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • Deleting Expired certificates from IOS CA

    I have been looking at how to delete expired certificates from an IOS CA. I have seen the command "crypto pki server trim" but this command appears to only apply to certificates in the CRL list. Does anyone know if there is a similar command to just delete expired certificates rather than ones that have been revoked first? It would be a hassle to have to manually go through each one.

    Hi Yerko,
    Yes you can.  Please have a look at the below link:
    http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/sec_conn_pki/configuration/15-mt/sec-pki-15-mt-book/sec-cert-enroll-pki.html
    Please visit the below section.
    Configuring Cut-and-Paste Certificate Enrollment
    SUMMARY STEPS
    1.    enable
    2.    configure terminal
    3.    crypto pki trustpoint name
    4.    enrollment terminal pem
    5.    fingerprint ca-fingerprint
    6.    exit
    7.    crypto pki authenticate name
    8.    crypto pki enroll name
    9.    crypto pki import name certificate
    10.    exit
    11.    show crypto pki certificates
    Regards,
    Kanwal
    Note: Please mark answers if they are helpful.

  • HT201436 I have deleted voicemail messages from my 4s and it still says my mailbox is full.  How do I clear out my mailbox?

    I have deleted voicemail messages from my 4s and it still says my mailbox is full.  How do I remove my voicemail messages?

    phone - voicemail - delete message - then swipe right to left, to delete the deleted messaged.
    This is where the deleted message is store when you delete the message.

  • How can i link my E-mail with my iPad in a way that i can delete my messages from my email inbox server not from my iPad inbox only?

    How can i link my E-mail with my iPad in a way that i can delete my messages from my email inbox server also not from my iPad inbox only?
    Because when i delete emails from my iPad inbox, it will be deleted on my iPad only but when i check my email inbox server from the browser its not deleted!
    So how can i set up this link so when i delete any email from my iPad it will be deleted from my email inbox server also?

    Hi Pierrot10,
    Insert your backup disc (or plug your external hd), then open Mail.
    In the File menu, click *Import Mailboxes* and follow the steps for a *Mail for Mac OS X* transfer.
    Navigate to your CD/DVD's or external HD's backup and hit "OK".
    This should create a new "Imported" folder in Mail with all your old messages in it, that you can then rearrange as you wish, creating new mailboxes etc.
    Axel

  • How do i delete all messages from my email?

    I had a server problem over the weekend and all of my email messages that i got from day #1 are reloading as new, unread mail. How can i delete them all(thousands). I'm using outlook and have not been able to sync my Inbox. Contacts and all else is fine.???

    Check your account settings with Outlook for removing or deleting messages from the server when downloaded by Outlook.
    The iPhone's email client includes the same settings, as do all email clients for a POP account.
    I would handle this with Outlook. Delete and recreate the account with Outlook, and before checking the account for new message with Outlook, select remove or deleted messages from the server when downloaded for the account preferences with Outlook.
    All messages available on the server will be downloaded again by Outlook, and removed from the server when doing so. You can mass delete all messages from Outlook.
    When deleting and recreating the account with the iPhone's Mail client, none of these messages will be downloaded by the iPhone's Mail client after being removed from the server when downloaded by Outlook.
    Or since you likely have webmail access for this account using a browser, you can mass delete all messages available on the server via webmail access. After deleting the messages from the server, delete and recreate the account with the iPhone's Mail client.
    An IMAP account is much easier in this regard, which is designed to be accessed with multiple email clients on different computers or devices.
    A POP account is designed to be accessed with a single email client on one computer or device.

  • If I delete one message from my inbox they all disappear -why & how do I retrieve them?

    Twice this week I have deleted a message from my inbox, using the edit button &amp; then highlighting the message to delete, then pressing the delete button at the bottom of the page &amp; ALL my emails in my inbox disappear!  Where are they &amp; how can I retrieve them?

    wow thanks I don't understand why no one could have told me this. By any chance do you know why iTunes Store won't work onmy laptop and says an error occurred then some random number like -9872 or something

  • How do you delete specific message from users in Exchange 2013 DAG database?

    Our network has been inundated with spam from INTUIT.COM with the SUBJECT: PAYMENT OVERDUE and contains a link to download a form from a Dropbox. Obviously, very suspicious and clearly spam. We're using Postini as our Edge Transport/ Spam filter but messages
    are still getting in. I've enable anti-spam on all my mailbox servers, set the SCL values but that hasn't worked.
    I understand that Exchange Edge Transport role has the more aggressive spam fighting features but Microsoft also recommends an online spam filter. 
    Needless to say, we've taken steps to quarantine those messages based on subject and sender in Postini but now would like to delete those messages from the users in went to. My users are two different DAG mailbox databases. I found this article http://www.techieshelp.com/delete-mail-from-multiple-mailboxes/ but
    the command didn't work. I'm thinking its because I have DAG and a couple of databases. I even tried "get-mailbox -database "databasename" | search-mailbox -searchquery subject: "Payment Overdue"" and that didn't work. 
    I'm running Exchange 2013 SP1 DAG across two sites comprised of four 2013 SP1 mailbox servers.

    Check this out
    http://technet.microsoft.com/en-us/library/ff459253%28v=exchg.150%29.aspx and specifically look at the section titled  "Search messages and log the search results"
    Or you can use this
    http://technet.microsoft.com/en-us/library/aa996371%28v=exchg.150%29.aspx with the WHATIF parameter
    Alternatively if you are open the 3rd party solutions check out Lucid8's DigiScope
    http://www.lucid8.com/product/digiscope.asp
    which would allow you to see the search results and then delete OR if desired you can set the On FIND action to Export to PST and then Delete so that you can preserve and then remove messages on the fly as the search system finds
    Search, Recover, & Extract Mailboxes, Folders, & Email Items from Offline Exchange Mailbox and Public Folder EDB's and Live Exchange Servers or Import/Migrate direct from Offline EDB to Any Production Exchange Server, even cross version i.e. 2003 -->
    2007 --> 2010 --> 2013 with Lucid8's
    DigiScope

  • If I delete any message from email account it gets deleted from thunderbird as well so how can i keep back up

    If I delete any message from email account it gets deleted from thunder bird as well so how can i keep back up

    either use the pop protocol to get your mails, or move mail into a "local Folder" from your mail account and it will delete on the server as well as from the account in Thunderbird.

Maybe you are looking for

  • Issue while passing Target URL dynamically in SOAP Receiver Adapter

    Experts, I am stuck with an issue while passing the Target URL dynamically. The UDF required for this works just fine. I can see the Target URL in Dynamic Configuration header(The Key is TServerLocation) in SXMB_MONI but the request that I am sending

  • [SOLVED] X Server not accepting remote connections after update

    Hi everyone! After recent upgrade Xorg on my laptop not allows other machines to use him as a window server, just an example: on laptop: vitaly@trifon:~/VM$ ps aux | grep Xorg root       499  2.7  1.3 393628 105276 tty7    Ssl+ фев17 139:48 /usr/lib/

  • Loading a Dynamic Library on Mac OSX 10.5.6: Unsatisfied Link Error: Matlab

    Hi guys, The Matlab Builder JA generates JAR files that allow you to use Matlab functions in JAVA. I have had a friend run through the process of creating the files and running them on WINDOWS and it works fine, but it fails on Mac OSX. The program u

  • Inprocess Inspection & result recording

    Hi all, We are implementing QM. The requirement of client is to carry out inprocess inspection(preferable without inspection plan) including result recording & defect recording & that to with quiet ease. Help me with the basic settings. Also to have

  • So far my Adobe experience "SUCKS!!" cant get past instal of free trial??

    I keep trying to install a "FREE TRIAL" of Acrobat so I can see if I like it! can't get past screen where it asks for User Name, Organization, ?? I click free trial but NOTHING!!! So far ADOBE IS A WASTE OF TIME !! Anyone suggest a better pfd editer