SPFarm members

Represents a Microsoft SharePoint Foundation farm.

The SPFarm type exposes the following members.

Constructors

  Name Description
Public method SPFarm Reserved for internal use only.

Top

Properties

  Name Description
Public property AlternateUrlCollections Gets the collection of alternate URL objects in the farm.
Public property BuildVersion Gets the Microsoft SharePoint Foundation build version of the server farm.
Public property CanBackupRestoreAsConfiguration Gets a value that indicates whether the farm object can be selected for inclusion in a configuration-only backup or restore operation.
Public property CanMigrate Obsolete. Gets a Boolean value that indicates whether a server farm can be migrated from a Windows SharePoint Services 2.0 farm with which it is paired.
Public property CanRenameOnRestore Gets a Boolean value that indicates whether the server farm can be renamed when it is restored.
Public property CanSelectForBackup Gets or sets a Boolean value that specifies whether the server farm can be selected for backup in the Central Administration user interface.
Public property CanSelectForRestore Gets or sets a Boolean value that specifies whether the server farm can be selected for restore operations in the Central Administration user interface.
Public property CanUpgrade Gets a value that indicates whether the object can be upgraded. (Inherited from SPPersistedUpgradableObject.)
Public property CEIPEnabled Obsolete. Gets or sets a Boolean value that specifies whether Software Quality Metrics (SQM) data collection is enabled in the server farm to improve customer experience.
Public property DaysBeforePasswordExpirationToSendEmail Number of days before password expiration to send email warning Used by the automatic password change feature.
Public property DefaultServiceAccount Gets the default service process account.
Public property DeploymentLocked (Inherited from SPPersistedObject.)
Public property DiagnosticsProviders The diagnostics providers in the local farm
Public property DiskSizeRequired Gets the amount of disk space that is required for a backup.
Public property DisplayName Gets the display name that describes the persisted object instance within the administrative user interface. (Inherited from SPPersistedObject.)
Public property DownloadErrorReportingUpdates Obsolete. Gets or sets a Boolean value that specifies whether to download updates for an application that performs crash data collection and error reporting within the server farm.
Public property EncodedFarmId An uint id to identify the farm
Public property ErrorReportingAutomaticUpload Obsolete. Gets or sets a Boolean value that specifies whether to trigger automatic upload of crash data collection and error reporting in the server farm.
Public property ErrorReportingEnabled Obsolete. Gets or sets a Boolean value that specifies whether to enable an application that performs crash data collection and error reporting in the server farm.
Public property Farm Gets the server farm where the object resides. (Inherited from SPPersistedObject.)
Public property FeatureDefinitions Gets the collection of Feature definitions that are available in the server farm.
Public property Id Gets or sets the GUID that is associated with the object. (Inherited from SPPersistedObject.)
Public property InitializationSettings
Public property IsBackwardsCompatible Gets or sets a value that indicates whether the current object is backward compatible. (Inherited from SPPersistedUpgradableObject.)
Public property IsPaired Obsolete. Gets or sets a Boolean value that specifies whether the server farm is paired to a Windows SharePoint Services 2.0 farm.
Public propertyStatic member IsSPO
Public propertyStatic member Joined Gets a Boolean value that indicates whether the local server has been joined to a server farm.
Public propertyStatic member Local Gets an object that represents the local server farm.
Public property Name Gets or sets a name that is used to uniquely identify two objects that have the same parent and class. (Inherited from SPPersistedObject.)
Public property NeedsUpgrade Gets or sets a Boolean value that specifies whether the object needs to be upgraded. (Inherited from SPPersistedUpgradableObject.)
Public property NeedsUpgradeIncludeChildren Gets a Boolean value that indicates whether the object should be upgraded, considering the children of the object. (Inherited from SPPersistedUpgradableObject.)
Public property PairConnectionString Obsolete. Gets or sets the connection string to the Windows SharePoint Services 2.0 server farm with which this farm is paired.
Public property Parent Gets the parent in the logical hierarchy of the configuration object tree. (Inherited from SPPersistedObject.)
Public property PasswordChangeEmailAddress Email address to which to send password change notifcations Used by the automatic password change feature.
Public property PasswordChangeGuardTime Number of seconds to wait to allow other machines to finish responding to password change events. Used by the automatic password change feature.
Public property PasswordChangeMaximumTries Number of times to try changing the password before failing. Used by the automatic password change feature.
Public property PersistedFileChunkSize Gets or sets the number of bytes to retrieve from or send to the configuration database during a read/write operation when transferring files.
Public property Products Gets or sets a collection of IDs of products installed in this farm.
Public property Properties Gets metadata for the persisted object. (Inherited from SPPersistedObject.)
Public property ServerDebugFlags Server debug flags that can be added or removed to change the way certain operations or features work. The existence and behavior of these flags is not guaranteed in future versions of the product. Documentation in KBs and tech articles will provide instructions and details for usage.
Public property Servers Gets the collection of all physical computers that are in the local server farm.
Public property ServiceApplicationProxyGroups Gets a collection of service proxies in the server farm.
Public property ServiceProxies Gets a collection of service proxies from this farm.
Public property Services Gets the collection of all services that are in the server farm.
Public property ShouldDeferUpgradeActions (Inherited from SPPersistedUpgradableObject.)
Public property SiteSubscriptions Gets a collection of site subscriptions from this farm
Public property Solutions Gets the collection of all solutions that are in the server farm.
Public property Status Gets or sets the status of the object that the class represents. (Inherited from SPPersistedObject.)
Public property TimerService Gets the timer service that is associated with the server farm.
Public property TraceSessionGuid Gets the static GUID that is used to register a trace session.
Public property TypeName Gets the display name that is used to describe the object type in the Central Administration user interface. (Overrides SPPersistedObject.TypeName.)
Public property UpgradeContext Gets the SPUpgradeContext for the current upgrade operation. (Inherited from SPPersistedUpgradableObject.)
Public property UpgradedPersistedProperties Gets the collection of field names and values for fields that were deleted or changed. (Inherited from SPAutoSerializingObject.)
Public property UseMinWidthForHtmlPicker Gets or sets the HTML select control.
Public property UserLicensingEnabled Gets or sets whether per-user licensing is enabled.
Public property Version Gets a value that is incremented each time the object is updated. (Inherited from SPPersistedObject.)
Protected property WasCreated Gets a Boolean value that indicates whether the object is initialized and can be found in the database. (Inherited from SPPersistedObject.)
Public property XsltTransformTimeOut Specifies the seconds that a customized XSLT transformation is allowed to run.

Top

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

Events

  Name Description
Public eventStatic member ObjectChanged Raised after any configuration object in the system that is above the level of a site collection (SPSite) is changed. This event is raised on all computers in the server farm after the caches have been refreshed, but it is not raised if caching is disabled for the process.
Public eventStatic member ObjectCreated Raised after any configuration object in the system above the level of a site collection (SPSite) is created. This event is raised on all computers in the server farm after the caches have been refreshed, but it is not raised if caching is disabled for the process.
Public eventStatic member ObjectDeleted Raised after any configuration object in the system above the level of a site collection (SPSite) is deleted. This event is raised on all computers in the server farm after the caches have been refreshed, but it is not raised if caching is disabled for the process.
Public eventStatic member ObjectsRestored Raised after any configuration object in the system above the level of a site collection (SPSite) is restored. This event is raised on all computers in the server farm after the caches have been refreshed, but it is not raised if caching is disabled for the process.

Top

See also

Reference

SPFarm class

Microsoft.SharePoint.Administration namespace