Sharepoint 2010 Articles

Submit Article
Home » Articles » Sharepoint 2010 » Development and ProgrammingRSS Feeds

SPWFarm Class in SharePoint

Posted By: Destin Joy     Category: Sharepoint 2010     Views: 2818

In this article I am giving you an introduction on SPWFarm class. Most of the developers are naive about this class definitely this will give an introduction on the class

The SPFarm class is the top most nodes in object model. It is used to interact with the configuration data store. It contains global settings for all the servers, services, and solutions that are installed in a server farm. The main uses are as follows

·         To add a local computer to the server farm.

·         Creates a server farm and its associated configuration database. Delete a web application

·         Gets the Microsoft SharePoint Foundation build version of the server farm. Below is a small example to delete a web application

·         Gets the amount of disk space that is required for a backup.


The below example is for an object that represents a remote server farm based on the specified connection string

 Open the farm
SPFarm farm = SPFarm.Open("Data Source=server.domain.com;Initial Catalog=WSSS;Integrated
SPFarm farm = SPWebService.ContentService.Farm;


Didn't find what you were looking for? Find more on SPWFarm Class in SharePoint Or get search suggestion and latest updates.

Destin Joy
Destin Joy author of SPWFarm Class in SharePoint is from Pathanamthitta, India. Destin Joy says

 Hello Everyone,

I am Destin Joy from India I have MCPD in SharePoint 2010, MCTS SharePoint 2010 application development and MCTS in SharePoint 2007. I am mostly working in  core part of SharePoint (2010-2007) and passionate about new Microsoft technologies. Born and brought up in Kerala You can reach me  @ Destin.Joy@hotmail.com


View All Articles

Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

No Comment Found, Be the First to post comment!