cancel
Showing results for 
Search instead for 
Did you mean: 

Archive email until a particular date automatically

MastroBirraio
Level 3

Hello.

I need to archive all email until 31/12/2016.

Now i have an Archiving Policy based on number of days calculated from 31/12/2016 until the day when i manually start Archiving Task.

The problem is that i have to run Exchange task every day manually and one mailbox at time (after modify the number of days).

There is a sort of script that can i use to accomplish this?

Thank You.

 

Daniele

2 ACCEPTED SOLUTIONS

Accepted Solutions

Titoine31
Moderator
Moderator
Partner    VIP    Accredited Certified

Hi Daniele,

Which version of Enterprise Vault have you ?
In version 12.0 you can use powershell for script your change in the archiving policy each day. Look the command "Set-EVExchangeMailboxPolicy" for update the properties of your archiving policy.

Out of curiosity, could you explain me why you need to do it ? I think that all email received before 31/12/2016 must be archived since a long time and that you can stop archiving for dont't archive more email. Other solution, you can scheduled an archiving only one time by week, and update your policy only one time by week ...

Regards,

Antoine

View solution in original post

@MastroBirraio 

As @Titoine31 correctly mentioned, you can easily achieve this using specific EV Powershell commands introduced in EV12.

The command Set-EVExchangeMailboxPolicy will set the 'Never archive items younger than' value on the Exchange Mailbox Policy. You may schedule a task to run the Powershell command everyday prior to the scheduled mailbox synchronisation task, so that everyday the policy (and mailbox) is stamped with a value to not archive items younger than 31-Dec-16.

Set-EVExchangeMailboxPolicy -Name "YourPolicyName" -MinimumArchiveAge (New-TimeSpan -Start 31-Dec-2016).Days -MinimumArchiveAgeUnits 0

The scheduled archiving task then doesn't need to be run manually if you are updating the policy everyday. Would suggest you test this thoroughly before implementation.

 

View solution in original post

5 REPLIES 5

Titoine31
Moderator
Moderator
Partner    VIP    Accredited Certified

Hi Daniele,

Which version of Enterprise Vault have you ?
In version 12.0 you can use powershell for script your change in the archiving policy each day. Look the command "Set-EVExchangeMailboxPolicy" for update the properties of your archiving policy.

Out of curiosity, could you explain me why you need to do it ? I think that all email received before 31/12/2016 must be archived since a long time and that you can stop archiving for dont't archive more email. Other solution, you can scheduled an archiving only one time by week, and update your policy only one time by week ...

Regards,

Antoine

@MastroBirraio 

As @Titoine31 correctly mentioned, you can easily achieve this using specific EV Powershell commands introduced in EV12.

The command Set-EVExchangeMailboxPolicy will set the 'Never archive items younger than' value on the Exchange Mailbox Policy. You may schedule a task to run the Powershell command everyday prior to the scheduled mailbox synchronisation task, so that everyday the policy (and mailbox) is stamped with a value to not archive items younger than 31-Dec-16.

Set-EVExchangeMailboxPolicy -Name "YourPolicyName" -MinimumArchiveAge (New-TimeSpan -Start 31-Dec-2016).Days -MinimumArchiveAgeUnits 0

The scheduled archiving task then doesn't need to be run manually if you are updating the policy everyday. Would suggest you test this thoroughly before implementation.

 

Hi Antoine.

Vault version is 12.0

Previous archiving policy was 6 Month.

Vault stop to working on May and until August we cannot are able to archiving.

On September we repair vault but customer in the meantime, move to Office365 (without migration, they have 2 different accounts). So it want to archive all mail until migration and then dismiss onpremise Exchange.

Thank You.


Daniele

@arnoldmathias

So for example, i start Powershell Script at 00:01 and they increase the number of the days.

Then i modify archiving task to run from 00:10 until 23:59, correct?

 

Thank you.

 

Daniele

@MastroBirraio sorry am not able to grasp the scenario here.

Could you please elaborate on the requirement? Do you wish to archive all mails from the mailboxes in on-premise Exchange? Or do you want to archive all emails up until 31-Dec-2016?

The EV Powershell command provided earlier would set the 'Never archive items younger than' value on the Exchange Mailbox Policy and automatically calculates the difference between today's date (the date the command is run) and 31-Dec-2016 and updates the difference on the archiving policy.