Deleted items retention is configured by default in Exchange Server 2007 for both mailboxes and individual items within a mailbox. For mailboxes, the default setting is 30 days, and for mail items, the default setting is 14 days. The retention periods can be changed using the following Windows PowerShell commands in Exchange Management Shell:
Set-MailboxDatabase `
-Identity "Mailbox Database" `
-DeletedItemRetention 7.00:00:00
Set-MailboxDatabase `
-Identity "Mailbox Database" `
-MailboxRetention 7.00:00:00
Note that the backtick (`) at the end of a line indicates that the command continues on the next line; in Exchange Management Shell, you could enter the command all on one line without the backticks. The time period is set with the following format: days.hours.minutes.seconds. In the examples, 7.00:00:00 indicates a retention period of seven days.
The Deleted items retention period can also be set per user by entering the command
Set-Mailbox <account name> `
-ItemRetention 7.00:00:00
where <account name> is the account name of the individual user. . . .

