Introduction
Site retention in SharePoint is governed by site policies.
In SharePoint 2013, site policies have been improved. There is a new concept
within SharePoint 2013 regarding sites:
Site Closure. When a site is closed it is essentially ignored by
SharePoint in regards to displaying its existence, however, the site may still
be accessed via URL.
Executive
Summary
·
Site
policies are created at the site collection level but then are applied at the
site level (including the site collection root site).
·
Closure
of a sub-site does not prevent any usage of the site and essentially places it
in a deletion countdown state. Closure of a site collection, however, makes the
site collection read-only (this includes any sub-sites).
·
Deletion
of a site (or site collection) automatically removes sub-sites.
·
Site
owners may postpone deletion for a specified period of time (controlled by the
policy)
Close and
Delete Sites Automatically
Creating a Site
Policy
Site policies are created at the site collection level but
then may be applied to underlying sub-sites.
To create a new site policy, follow these steps:
1.
Navigate to the site collection where you would
like to create the site policy.
2.
Select Site Settings from the Settings menu (gear
icon):
3.
Under the Site Collection Administration
section, click on Site Policies:
The Site Policies page appears.
4.
Click on the Create link at the top of the page.
The New Site Policy page appears:
5.
Enter a name for the policy and select Close and
delete sites automatically. Various options appear.
Close
Event: The close event is based on a
specified period of time after site creation. It may be in Days, Months, or
Years. For testing purposes I chose 1 day.
Deletion
Event: The deletion event is based
on a specified period of time after site closure. It may be in Days, Months, or
Years. For testing purposes I chose 1 day.
Deletion
email notification: You may choose to send an email to the site owner
within the specified time to warn about future deletion of the site.
Follow-up
notifications: You may choose to send follow-up notifications warning of
site deletion based on the specified recurrence.
Deletion
Postponement: You may elect to allow
site owners to postpone deletion for the specified period of time.
6.
Optional: Site Collection Closure. You have the
option of closing the entire site collection when the policy is applied. Site
collection closure places the site collection in read-only mode.
7.
Click OK to create the new policy. The new policy
is created and appears in the Site Policies listing:
Applying a Site
Policy to a Site
Once the site policy is created at the site collection
level, it may be applied to sub-sites that exist within that site
collection. To apply a site policy to a
sub-site, follow these steps:
1.
Navigate to the sub-site where you would like to
apply the site policy.
2.
Select Site Settings from the Settings menu
(gear icon).
3.
Under Site Administration click on the Site
Closure and Deletion link:
The Site Closure and
Deletion page appears:
4.
Select the site policy to apply from the Site
Policy drop-down:
5.
Click OK. The policy is applied to the site.
6.
If you click on the Site Closure and Deletion
link again, you will see the Site Closure and Site Deletion results from the
policy:
I clicked the postpone button so the site would not be
deleted right away.
Results of the Site Closure
When a subsite is closed, it can still be accessed by users and modifications may occur. If the deletion of the site is coming soon (I believe within 30 days), there will be a message at the top of the screen:
Run a
Workflow Automatically to Manage Site Closure
Although the automatic closure and deletion looks great, we
need more control and functionality. One of the other site policy Site Closure
and Deletion options is to “Run a workflow automatically to manage site
closure, then delete them automatically”.
When this option is selected, a drop-down to select the
workflow appears:
The workflow may run on a recurring schedule if the site is
not closed.
For our purposes, we need the workflow to perform the
following actions:
1.
Send email to the site owner asking whether they
are still using the site
2.
Process the owner’s answer of yes or no*
3.
If yes - do nothing - let policy kick off
workflow again next year
4.
If no:
a.
Remove all permissions from site (except System
Account)
b.
Mark site as closed - site policy will then manage automatic
deletion
This will most likely require either a) custom workflow
activities for SPD Workflows or b) Visual Studio workflow. I am currently having issues getting SP Designer 2013 running properly but will update this post once I move forward with additional site retention proof-of-concepts.
*currently not sure how the user will interact with the
workflow