How to configure Document expiration policy

This document will help you out in configuring a document library to set document expiration policy. Meaning , you can configure a document library to automatically manage its documents .

Image , we need to gradually check all the documents in the document library and delete all the documents which are more than one month old. As the documents keep coming , its very hard for an administrator to look at all the document libraries available and check for each documents created date and manually delete them if the conditions are met.

To over come this manual task, SharePoint can be configured in such a way that it can manage the documents by creating information management policy.

There are 2 steps we need to follow to configure this policy.

1. To define the policy execution time (this is a global setting)

2. To create a policy and associate with the document library (this is individual setting)

STEP 1

1. Open up the central administration site and navigate to operations->Information management policy configuration (under security configuration)

2. Click on Expiration

3. Click on “Automatically find the process expired items” and schedule it as “Daily”

If you wish to run this only on week days , select the day and the time frame to execute this job.

The option “Process expired items now” is provided for the administrator to perform the activity manually in between the specific time frame if required.

4. Click on Save and you will be redirected back to Information management policy configuration settings page again.

STEP 2

1. Open the end user site as the site collection administrator or farm administrator

2. Click on “View all site contents” and click on “Create” then select “Document library”

3. Provide the document library name and create

4. Once document library is created, Click on settings->document library settings->Information management policy settings

5. Click on “Define a policy” and click OK

6. Provide the name of the document policy , policy state and administrative description

7. Click on “Enable Expiration” under “Expiration”

8. Click on “A timer period based on the items properties”

9. Set the value as  “Created” +30+”days” (as previously discussed, its an example)

Select “Set programmatically” if you wish to set the value using coding.

10. Select the option “delete” for “Perform this action” under “When the item expires”

11. Click on Ok

You can verify that a timer job is created as “Information management policy” to run daily. If you wish to clear of the documents on the newly created document library now, rather than waiting for the job to run , once again access the central admin and then click on “process expired items now” (as per step 1 –>3) .

But this will force the policies which are set on other document libraries as well.

In the event you feel that the timer job is running and does not stop, wait for some time , this will take some time to run because it depends on the size of the site, size of number of doc libraries and documents.

By any chance , if the the timer job status shows freezed , you can go ahead and run the command stsadm –o execadmsvcjobs on the SharePoint