SPWFarm Class in SharePoint

In this blog 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

1.gif
Ebook Download
View all
Learn
View all