Skip to content

Membership management changes #981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---
external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml
Module Name: Microsoft.Online.SharePoint.PowerShell
online version: https://learn.microsoft.com/powershell/module/sharepoint-online/add-spocontaineruser
applicable: SharePoint Online
title: Add-SPOContainerUser
schema: 2.0.0
author: ShreyasSar26
ms.author: shsaravanan
ms.reviewer:
---

# Add-SPOContainerUser

## SYNOPSIS

Assigns a particular membership of a container to users.
Copy link
Contributor

@samkabue samkabue Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file and the others: please use M365 Copilot to polish the strings. Here's example for this one:

prompt:

I have this cmdlet:

Add-SPOContainerUser [-ContainerId] -LoginName -Role []
here's the current description:

"Assigns a particular membership of a container to users."

Rewrite this description based on Microsoft 365 Style Guide.

output:

Here’s a revised description for the Add-SPOContainerUser cmdlet, aligned with the https://learn.microsoft.com/style-guide/welcome/:

Adds a user to a container with a specified role.

This version uses active voice, avoids unnecessary complexity, and clearly states what the cmdlet does. Let me know if you'd like help updating related cmdlet descriptions or examples.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other suggestions from M365 Copilot:

ContainerId: The unique identifier of the container to which the user is being added.
LoginName: The user’s login name to assign to the container.
Role: The role to assign to the user within the container. Valid roles are:

  • Owner: Has full control over the container and its contents.
  • Manager: Can add, update, and delete content, and manage permissions, but can't delete the container.
  • Writer: Can add, update, and delete content in the container.
  • Reader: Can only view content in the container.


## SYNTAX

```
Add-SPOContainerUser [-ContainerId] <String> -LoginName <String> -Role <String> [<CommonParameters>]
```

## EXAMPLES

### Example 1

```powershell
Add-SPOContainerUser 423poi45 -LoginName [email protected] Owmer
```

Example 1 assigns the role of owner to user with User Principal Name "[email protected]"

## PARAMETERS

-ContainerId

> Applicable: SharePoint Online

Use this parameter to specify the Container ID.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

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

-LoginName

> Applicable: SharePoint Online

The User Principal Name to whom a membership is to be assigned.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

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

-Role

> Applicable: SharePoint Online

The membership role intended to be assigned to a user. The available roles are :
Owner: have full control over the container and the contents of the container.
Manager: can add, update, and delete contents of a container and also maintain permissions of the container but cannot delete a container.
Writer: can add, update, and delete content in the container.
Reader: can only view content in the container.

```yaml
Type: String
Parameter Sets: (All)
Aliases:
Accepted values: Owner, Reader, Writer, Manager

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

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters).

## INPUTS

### None

## OUTPUTS

### System.Object

## NOTES

## RELATED LINKS

[Intro to SharePoint Embedded Containers Management Shell](/powershell/sharepoint/sharepoint-online/introduction-sharepoint-online-management-shell)

[Get-SPOApplication](./Get-SPOApplication.md)

[Set-SPOContainer](./Set-SPOContainer.md)

[Get-SPODeletedContainer](./Get-SPODeletedContainer.md)

[Remove-SPOContainer](./Remove-SPOContainer.md)

[Remove-SPODeletedContainer](./Remove-SPODeletedContainer.md)

[Restore-SPODeletedContainer](./Restore-SPODeletedContainer.md)


Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml
Module Name: Microsoft.Online.SharePoint.PowerShell
online version: https://learn.microsoft.com/powershell/module/sharepoint-online/remove-spocontaineruser
applicable: SharePoint Online
title: Remove-SPOContainerUser
schema: 2.0.0
author: ShreyasSar26
ms.author: shsaravanan
ms.reviewer:
---

# Remove-SPOContainerUser

## SYNOPSIS

Removes a user from an assigned role of a container.

## SYNTAX

```
Remove-SPOContainerUser [-ContainerId] <String> -LoginName <String> -Role <String> [<CommonParameters>]
```

## EXAMPLES

### Example 1

```powershell
Remove-SPOContainerUser 423poi45 -LoginName [email protected] Owmer
```

Example 1 removes the user with User Principal Name "[email protected]" from the role of an owner of container whose ContainerId is 423poi45 .

## PARAMETERS

-ContainerId

> Applicable: SharePoint Online

Use this parameter to specify the Container ID.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

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

-LoginName

> Applicable: SharePoint Online

The User Principal Name to whom a membership is to be assigned.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

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

-Role

> Applicable: SharePoint Online

The membership role intended to be assigned to a user. The available roles are :
Owner: have full control over the container and the contents of the container.
Manager: can add, update, and delete contents of a container and also maintain permissions of the container but cannot delete a container.
Writer: can add, update, and delete content in the container.
Reader: can only view content in the container.

```yaml
Type: String
Parameter Sets: (All)
Aliases:
Accepted values: Owner, Reader, Writer, Manager

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

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters).

## INPUTS

### None

## OUTPUTS

### System.Object

## NOTES

## RELATED LINKS

[Intro to SharePoint Embedded Containers Management Shell](/powershell/sharepoint/sharepoint-online/introduction-sharepoint-online-management-shell)

[Get-SPOApplication](./Get-SPOApplication.md)

[Set-SPOContainer](./Set-SPOContainer.md)

[Get-SPODeletedContainer](./Get-SPODeletedContainer.md)

[Remove-SPOContainer](./Remove-SPOContainer.md)

[Remove-SPODeletedContainer](./Remove-SPODeletedContainer.md)

[Restore-SPODeletedContainer](./Restore-SPODeletedContainer.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml
Module Name: Microsoft.Online.SharePoint.PowerShell
online version: https://learn.microsoft.com/powershell/module/sharepoint-online/set-spocontaineruser
applicable: SharePoint Online
title: Set-SPOContainerUser
schema: 2.0.0
author: ShreyasSar26
ms.author: shsaravanan
ms.reviewer:
---

# Set-SPOContainerUser

## SYNOPSIS

Reassigns the user from an already assigned role to a new role on a container.

## SYNTAX

```
Set-SPOContainerUser [-ContainerId] <String> -LoginName <String> -Role <String> [<CommonParameters>
```

## EXAMPLES

### Example 1

```powershell
Set-SPOContainerUser 423poi45 -LoginName [email protected] Manager
```

Example 1 reassigns the role of User Principal Name "[email protected]" to manager.

## PARAMETERS

-ContainerId

> Applicable: SharePoint Online

Use this parameter to specify the Container ID.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

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

-LoginName

> Applicable: SharePoint Online

The User Principal Name to whom a membership is to be assigned.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

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

-Role

> Applicable: SharePoint Online

The membership role intended to be assigned to a user. The available roles are :
Owner: have full control over the container and the contents of the container.
Manager: can add, update, and delete contents of a container and also maintain permissions of the container but cannot delete a container.
Writer: can add, update, and delete content in the container.
Reader: can only view content in the container.

```yaml
Type: String
Parameter Sets: (All)
Aliases:
Accepted values: Owner, Reader, Writer, Manager

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

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters).

## INPUTS

### None

## OUTPUTS

### System.Object

## NOTES

## RELATED LINKS

[Intro to SharePoint Embedded Containers Management Shell](/powershell/sharepoint/sharepoint-online/introduction-sharepoint-online-management-shell)

[Get-SPOApplication](./Get-SPOApplication.md)

[Set-SPOContainer](./Set-SPOContainer.md)

[Get-SPODeletedContainer](./Get-SPODeletedContainer.md)

[Remove-SPOContainer](./Remove-SPOContainer.md)

[Remove-SPODeletedContainer](./Remove-SPODeletedContainer.md)

[Restore-SPODeletedContainer](./Restore-SPODeletedContainer.md)