다음을 통해 공유


SPServiceInstance.ShouldProvision method

Available in SharePoint 2016 and later. When overridden in a derived class, returns a value that indicates whether an instance of the service should be automatically provisioned on servers with the specified role.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Overridable Function ShouldProvision ( _
    serverRole As SPServerRole _
) As Boolean
'Usage
Dim instance As SPServiceInstance
Dim serverRole As SPServerRole
Dim returnValue As Boolean

returnValue = instance.ShouldProvision(serverRole)
public virtual bool ShouldProvision(
    SPServerRole serverRole
)

Parameters

Return value

Type: System.Boolean

Remarks

The default implementation returns false.

If serverRole is Custom, the value returned by this method has no effect. Farm administrators must manually provision an instance of the service on the server.

For more information, see MinRole overview.

See also

Reference

SPServiceInstance class

SPServiceInstance members

Microsoft.SharePoint.Administration namespace