none
syntax for single items recovery

    Question

  • Hi 

    What is the syntax to set single item recovery to 1  day and retain deleted items to 1 day. while setting deleted items to 1 day do i need to use -UseDatabaseRetentionDefaults $false

    current status of my users mailbox

    PS C:\Windows\system32> Get-Mailbox "myuser@mydomain.com" | FL SingleItemRecoveryEnabled,RetainDeletedItemsFor

    SingleItemRecoveryEnabled : False
    RetainDeletedItemsFor     : 30.00:00:00


    Saturday, May 12, 2018 7:15 AM

All replies

  • Hello Roger,

    Please use the blow mentioned syntax to make the changes over the mailbox to reduce it to 1 day.

    Set-Mailbox -Identity - "Saurabhy" -RetainDeletedItemsFor 1

    For more information please refer to the below mentioned article:

    https://technet.microsoft.com/en-us/library/ee364752(v=exchg.160).aspx


    Cheers,

    Saurabh

    Please remember to mark the solution as the answer using "Mark as Answer". If you find a solution to be helpful, please use Vote as Helpful

    Saturday, May 12, 2018 8:30 AM
  • do i also need to enable SingleItemRecoveryEnabled from False to true
    Saturday, May 12, 2018 7:45 PM
  • Hello Roger,

    Yes you need to enable the singleitemrecoveryenabled for the user mailbox, Please find the below syntax for it

    Set-Mailbox -Identity "Saurabhy" -SingleItemRecoveryEnabled $true

    And also for more information please follow the below mentioned link:

    https://technet.microsoft.com/en-us/library/ee633460(v=exchg.160).aspx



    Cheers,

    Saurabh

    Please remember to mark the solution as the answer using "Mark as Answer". If you find a solution to be helpful, please use Vote as Helpful

    Sunday, May 13, 2018 4:18 AM
  • Hi Roger, 

    For your needs, you can run the following command:

    Set-Mailbox "UserName" -UseDatabaseRetentionDefaults $false -SingleItemRecoveryEnabled $true -RetainDeletedItemsFor 1


    Best Regards,
    Niko Cheng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Monday, May 14, 2018 9:03 AM