Disable-PnPFeature

Disables a feature

Syntax

Disable-PnPFeature
       -Identity <GuidPipeBind>
                         [-Force [<SwitchParameter>]]
                         [-Scope <FeatureScope>]
                         [-Web <WebPipeBind>]
                         [-Connection <SPOnlineConnection>]

Description

Deactives a feature that was active on a site

Examples

------------------EXAMPLE 1------------------

Disable-PnPFeature -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe

This will disable the feature with the id "99a00f6e-fb81-4dc7-8eac-e09c6f9132fe"

------------------EXAMPLE 2------------------

Disable-PnPFeature -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe -Force

This will disable the feature with the id "99a00f6e-fb81-4dc7-8eac-e09c6f9132fe" with force.

------------------EXAMPLE 3------------------

Disable-PnPFeature -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe -Scope Web

This will disable the feature with the id "99a00f6e-fb81-4dc7-8eac-e09c6f9132fe" with the web scope.

Required Parameters

-Identity

The id of the feature to disable.

Type:GuidPipeBind
Position:0
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type:SPOnlineConnection
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Force

Specifies whether to continue if an error occurs when deactivating the feature.

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Scope

Specify the scope of the feature to deactivate, either Web or Site. Defaults to Web.

Type:FeatureScope
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Web

This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.

Type:WebPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False