This post is over a year old, some of this information may be out of date.
In SharePoint 2007 you had the ability to quiesce the farm inside central administration. This ability is not implemented in SharePoint 2010, you need to use the STSADM command to achieve this.
But, I have done some research and development to achieve the same as in SharePoint 2007. In this blog post I will explain you how you can quiesce your farm by code, and I deliver you my SharePoint 2010 Solution file that makes the same functionality as in SharePoint 2007 available.
To be able to start writing some code to quiesce your farm, you need to add the following reference to your project: “Microsoft.Office.Server.Administration”.
The next step is to retrieve your farm “SessionStateService”. This service allows you to quiesce the farm.
Now the only thing we need is to write some code to quiesce the farm and to stop the quiescing.
The code for quiescing the farm, looks like this:
The code to stop the quiescing of the farm, looks like this:
SharePoint 2010 Quiesce Solution
The solution that I have created enables you to quiesce the SharePoint 2010 farm through central administration. This solution is based on the SharePoint 2007 version.
- Add and deploy the estruyf.QuiesceFarm solution to your farm;
- Go to Central Administration -> Site Actions -> Site Settings;
- Open the **Manage site features **page;
- Activate: E. Struyf Quiesce Farm Feature;
- Navigate to System Settings;
- Under Farm Management, the Quiesce Farm option should be available.
When the SharePoint farm is not quiesced, you receive the following screen.
When you quiesce the farm you will get the following results.