Table of Contents

Remove-PnPSiteGroup

SYNOPSIS

Removes a group from a web.

SYNTAX

Remove-PnPSiteGroup -Identity <String> [-Site <SitePipeBind>]    
    [-Force]

DESCRIPTION

Allows to remove a group from specified site.

EXAMPLES

EXAMPLE 1

Remove-PnPSiteGroup -Identity GroupToRemove -Site "https://contoso.sharepoint.com/sites/marketing"

This example removes a group named GroupToRemove from the site collection https://contoso.sharepoint.com/sites/marketing.

EXAMPLE 2

Remove-PnPSiteGroup -Identity GroupToRemove

This example removes a group named GroupToRemove from the current site collection that has been connected to with Connect-PnPOnline.

PARAMETERS

-Identity

Specifies the name of the group to remove.

Type: String
Parameter Sets: (All)
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site

Specifies the site collection to remove the group from.

Type: SitePipeBind
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Microsoft 365 Patterns and Practices