Table of Contents

Enable-PnPContainer

SYNOPSIS

Required Permissions

  • Microsoft Graph API : FileStorageContainer.Selected, plus permission on the Container Type for the application you connect with

Activates a Container in SharePoint Embedded.

SYNTAX

Enable-PnPContainer [-Identity] <ContainerPipeBind> [-WhatIf] [-Confirm] [-Connection <PnPConnection>]

DESCRIPTION

A Container is created inactive and is deleted automatically if it is not activated within 24 hours after its creation. This cmdlet activates it through Microsoft Graph.

EXAMPLES

EXAMPLE 1

Enable-PnPContainer -Identity "b!aBrXSxKDdUKZsaK3Djug6C5rF4MG3pRBomypnjOHiSrjkM_EBk_1S57U3gD7oW-1"

Activates the specified Container.

EXAMPLE 2

New-PnPContainer -Name "Contoso Legal" -ContainerTypeId 4f0af585-8dcc-0000-223d-661eb2c604e4 | Enable-PnPContainer

Creates a Container and activates it.

PARAMETERS

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

-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: PnPConnection
Parameter Sets: (All)

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

-Identity

The id or the api url of the Container. Microsoft Graph cannot look a Container up by its site url.

Type: ContainerPipeBind
Parameter Sets: (All)

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

Microsoft 365 Patterns and Practices Activate fileStorageContainer