Table of Contents

Set-PnPTeamsTeamArchivedState

SYNOPSIS

Required Permissions

  • Microsoft Graph API : One of Directory.ReadWrite.All, Group.ReadWrite.All

Sets the archived state of a team.

SYNTAX

Set-PnPTeamsTeamArchivedState -Identity <TeamsTeamPipeBind> -Archived <Boolean>
 [-SetSiteReadOnlyForMembers <Boolean>]  [-Connection <PnPConnection>] 

DESCRIPTION

Allows to update the archived state of a team.

EXAMPLES

EXAMPLE 1

Set-PnPTeamsTeamArchivedState -Identity "My Team" -Archived $true

Archives the team as identified.

EXAMPLE 2

Set-PnPTeamsTeamArchivedState -Identity "My Team" -Archived $false

Un-archives the team as identified.

EXAMPLE 3

Set-PnPTeamsTeamArchivedState -Identity "My Team" -Archived $true -SetSiteReadOnlyForMembers $true

Archives the team as identified and sets the underlying SharePoint Online Site Collection as read only for members.

PARAMETERS

-Archived

Setting that determines whether the Team is archived.

Type: Boolean
Parameter Sets: (All)

Required: True
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

Specify the group id, mailNickname or display name of the team to use.

Type: TeamsTeamPipeBind
Parameter Sets: (All)

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

-SetSiteReadOnlyForMembers

Setting that determines whether the connected SharePoint site is set to read only.

Type: Boolean
Parameter Sets: (All)

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

Microsoft 365 Patterns and Practices