SPFarm methods

The SPFarm type exposes the following members.

Methods

  Name Description
Public method AddBackupObjects Adds the server farm and its children to the backup/restore operation.
Protected method AddSPPersistedChildren 014 bug 291541 - Added this specific method. Generic SPBackupRestoreObject.AddSPPersistedChildren is avoided to support specific logic to SPFarm
Public method Clone Returns a clone of the object that does not come from the in-memory cache, which enables calling code to help ensure thread safety. (Inherited from SPPersistedObject.)
Public methodStatic member Create(SqlConnectionStringBuilder) Creates a server farm, its associated configuration database, and a farm account on the local computer.
Public methodStatic member Create(String) Creates a server farm, its associated configuration database, and a farm account on the local computer.
Public methodStatic member Create(SqlConnectionStringBuilder, String, SecureString) Obsolete. Creates a server farm and its associated configuration database, based on the specified user and password. This method is obsolete. Use the Create() method that takes a passphrase.
Public methodStatic member Create(SqlConnectionStringBuilder, String, String) Obsolete. Creates a server farm and its associated configuration database, based on the specified user and password.
Public methodStatic member Create(SqlConnectionStringBuilder, SqlConnectionStringBuilder, String, SecureString) Obsolete. Creates a server farm and its associated configuration database based on the specified content database, user, and password.
Public methodStatic member Create(SqlConnectionStringBuilder, String, SecureString, SecureString) Creates a server farm and its associated configuration database, based on the specified user and password.
Public methodStatic member Create(SqlConnectionStringBuilder, SqlConnectionStringBuilder, String, SecureString, SecureString) Creates a server farm and its associated configuration database, based on the specified user and password.
Public method CurrentUserIsAdministrator() Returns a Boolean value that indicates whether the current user is an administrator in the server farm.
Public method CurrentUserIsAdministrator(Boolean) Returns a Boolean value that indicates whether the current user is an administrator in the server farm.
Public method Delete Deletes the object. (Inherited from SPPersistedObject.)
Public method DisableCaching Disables the file system and in-memory caches of configuration objects in the server farm.
Public method EnableCaching Enables the file system and in-memory caches of configuration objects in the server farm.
Public method Equals Determines whether the current persisted object equals the specified object. (Inherited from SPPersistedObject.)
Protected method Finalize (Inherited from Object.)
Public method GetChild<T>() Returns the child of the persisted object based on the specified type. (Inherited from SPPersistedObject.)
Public method GetChild<T>(String) Returns the child object of the persisted object based on the specified name. (Inherited from SPPersistedObject.)
Public method GetFeatureDefinitionsByVersion Get the feature definition collection for the specified compatibility level.
Public method GetHashCode Serves as a hash function for the persisted object. (Inherited from SPPersistedObject.)
Public method GetObject(Guid) Returns the specified object based on its associated GUID.
Public method GetObject(String, Guid, Type) Returns the specified object based on its associated name, GUID, and type.
Public method GetObjectData Gets the serialized state of the object. (Inherited from SPAutoSerializingObject.)
Public method GetPersistedFeatureDefinition(Guid, Int32) Returns the [T:HYPERLINK"https://msdn2.microsoft.com/EN-US/library/ms472446"\t"_blank"Microsoft.SharePoint.Administration.SPFeatureDefinition] object for the given compatibility level based on the featureId parameter value. If the [T:HYPERLINK"https://msdn2.microsoft.com/EN-US/library/ms472446"\t"_blank"Microsoft.SharePoint.Administration.SPFeatureDefinition] object is not found for the specified compatibilityLevel, a null reference (Nothing in Visual Basic) is returned.
Public method GetPersistedFeatureDefinition(Guid, Int32, Boolean) Returns the [T:HYPERLINK"https://msdn2.microsoft.com/EN-US/library/ms472446"\t"_blank"Microsoft.SharePoint.Administration.SPFeatureDefinition] object for the given compatibilityLevel and featureId values. If the fallback parameter value is true and a match cannot be found for the given compatibilityLevel and featureId values, the method will attempt to return a [T:HYPERLINK"https://msdn2.microsoft.com/EN-US/library/ms472446"\t"_blank"Microsoft.SharePoint.Administration.SPFeatureDefinition] object with a lower compatibilityLevel value. If a corresponding [T:HYPERLINK"https://msdn2.microsoft.com/EN-US/library/ms472446"\t"_blank"Microsoft.SharePoint.Administration.SPFeatureDefinition] object cannot be found with the given featureId using either the given compatibilityLevel or an earlier (fallback) build version, a null reference (Nothing in Visual Basic) is returned.
Public method GetType (Inherited from Object.)
Protected method HasAdditionalUpdateAccess Override this method to allow more users to update the object. (Inherited from SPPersistedObject.)
Public method Invalidate Invalidates computed property values. (Inherited from SPPersistedUpgradableObject.)
Public method Join() Adds the local computer to the server farm.
Public method Join(Boolean, Nullable<SPServerRole>)
Public method LegacyUpdate (Inherited from SPPersistedObject.)
Protected method MemberwiseClone (Inherited from Object.)
Public method Migrate() Obsolete. Migrates settings from the Windows SharePoint Services 2.0 server farm with which this farm is paired.
Public method Migrate(Boolean) Obsolete. Migrates settings from a Windows SharePoint Services 2.0 server farm with which this farm is paired, with the option of including all children.
Public method MigrateGroup Similar to MigrateUserAccount, except for groups
Public method MigrateUserAccount(String, String, Boolean) Migrates a user account in SharePoint Foundation to a new login name and binary ID.
Public method MigrateUserAccount(Guid, String, String, Boolean) Migrates a user account in SharePoint Foundation to a new login name and binary ID.
Public method OnAbort Raises the Abort (backup) event.
Public method OnBackup Raises the Backup event.
Public method OnBackupComplete Raises the BackupComplete event.
Protected method OnDeserialization Called immediately after the base class deserializes itself to do additional work. (Inherited from SPPersistedObject.)
Protected method OnPostCreate (Inherited from SPPersistedObject.)
Protected method OnPostFarmJoin
Public method OnPostRestore Raises the PostRestore event.
Protected method OnPreCreate (Overrides SPPersistedObject.OnPreCreate().)
Protected method OnPreFarmJoin
Public method OnPrepareBackup Raises the PrepareBackup event.
Public method OnPreRestore Raises the PreRestore event.
Public method OnRestore Raises the Restore event.
Public methodStatic member Open(String) Returns an object that represents a remote server farm based on the specified connection string.
Public methodStatic member Open(SqlConnectionStringBuilder, SecureString) Returns an object representing a remote server SPFarm object based on the specified connection string.
Public methodStatic member Open(SqlConnectionStringBuilder, String, SecureString) Obsolete. Obsolete. Use the Open() method that takes a passphrase. Returns an object representing a remote SPFarm.
Public methodStatic member Open(SqlConnectionStringBuilder, String, String) Obsolete. Returns a remote server farm based on the specified connection string, user name, and password. Obsolete. Use the Open() method that takes a passphrase.
Public method Provision Makes the changes to the local server that are needed before the object can be used. (Inherited from SPPersistedObject.)
Public method RemoveObsoleteClass Removes all references to an obsolete class. This includes base classes and child objects from the configuration database.
Public method RunWithConcurrencyRetries (Inherited from SPPersistedObject.)
Public method ToString Returns the type and name of an object and of all its ancestors (parent, grandparent, and so on). (Inherited from SPPersistedObject.)
Public method Uncache Frees the memory cache that is used by the object. (Inherited from SPPersistedObject.)
Public method Unjoin Removes the local server from the farm.
Public method Unprovision Makes the changes to the local server that are needed to clean up after deleting the object. (Inherited from SPPersistedObject.)
Public method Update() Obsolete. (Overrides SPPersistedObject.Update().)
Public method Update(Boolean) Causes the object to save its state and propagate changes to all the computers in the server farm, optionally throwing an exception if the object already exists in the configuration store. (Inherited from SPPersistedObject.)
Protected method UpdateParent Causes the containing SPPersistedObject, if one exists, to update its state. (Inherited from SPAutoSerializingObject.)
Public method UpdateServerDebugFlags Used after setting a value in ServerDebugFlags to trigger the operation or activate the feature behind it. The existence and behavior of this method is not guaranteed in future versions of the product. Documentation in KBs and tech articles will provide instructions and details for usage.
Public method UpdateWithNoObjectCallbackCheck (Inherited from SPPersistedObject.)
Public method Upgrade() Upgrades the object. (Inherited from SPPersistedUpgradableObject.)
Public method Upgrade(Boolean) Upgrades the object, and if a Boolean parameter equals true, recursively upgrades all descendants of the current object. (Inherited from SPPersistedUpgradableObject.)
Protected method Validate Validates the state of all fields before persisting the object. (Inherited from SPPersistedObject.)
Public method ValidateBackwardsCompatibility Validates the backward compatibility of the content database schema for the DLLs on the Web front end. This method is called each time a connection is made to the content database to verify that the database schema is compatible. (Inherited from SPPersistedUpgradableObject.)

Top

See also

Reference

SPFarm class

Microsoft.SharePoint.Administration namespace