Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
79f8985
Create Add-SPOContainerUser
ShreyasSar26 Aug 11, 2025
150cd3e
Update Add-SPOContainerUser
ShreyasSar26 Aug 11, 2025
d7598be
Create Remove-SPOContainerUser
ShreyasSar26 Aug 11, 2025
6fd5cce
Create Set-SPOContainerUser
ShreyasSar26 Aug 11, 2025
dedc559
Update Remove-SPOContainerUser
ShreyasSar26 Aug 11, 2025
1cac876
Merge branch 'main' into patch-PS
ShreyasSar26 Aug 14, 2025
1dc6392
Merge branch 'main' into patch-PS
ShreyasSar26 Aug 20, 2025
262c933
Update Add-SPOContainerUser
ShreyasSar26 Aug 20, 2025
20c297e
Update Add-SPOContainerUser
ShreyasSar26 Aug 20, 2025
9bddbad
Update Add-SPOContainerUser
ShreyasSar26 Aug 20, 2025
04a795f
Update Remove-SPOContainerUser
ShreyasSar26 Aug 20, 2025
e726204
Update Remove-SPOContainerUser
ShreyasSar26 Aug 20, 2025
1d35326
Update Set-SPOContainerUser
ShreyasSar26 Aug 20, 2025
5c929bc
Update Add-SPOContainerUser
ShreyasSar26 Aug 20, 2025
8433113
Merge branch 'main' into patch-PS
ShreyasSar26 Aug 21, 2025
6aad8bb
Update Microsoft.Online.SharePoint.PowerShell.md
ShreyasSar26 Aug 21, 2025
884e8e0
Update Add-SPOContainerUser
ShreyasSar26 Aug 21, 2025
e3a5c1f
Update Set-SPOContainerUser
ShreyasSar26 Aug 21, 2025
b338d49
Update Remove-SPOContainerUser
ShreyasSar26 Aug 21, 2025
01a2d69
Rename Add-SPOContainerUser to Add-SPOContainerUser.md
ShreyasSar26 Aug 22, 2025
5fde187
Rename Remove-SPOContainerUser to Remove-SPOContainerUser.md
ShreyasSar26 Aug 22, 2025
a4efe09
Rename Set-SPOContainerUser to Set-SPOContainerUser.md
ShreyasSar26 Aug 22, 2025
46c0d4f
Merge branch 'main' into patch-PS
ShreyasSar26 Aug 22, 2025
4472e1d
typo fix
Ruchika-mittal01 Aug 22, 2025
35b3078
typo fix 2
Ruchika-mittal01 Aug 22, 2025
b70f0df
typo fix 3
Ruchika-mittal01 Aug 22, 2025
1ec1764
Merge pull request #981 from ShreyasSar26/patch-PS
Ruchika-mittal01 Aug 22, 2025
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,139 @@
---
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

Adds a user to a SharePoint Embedded container with a specified role.

## SYNTAX

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

##DESCRIPTION

Assigns a user to a defined role within a SharePoint Embedded container.

You must be a SharePoint Embedded Administrator to run this cmdlet.

For permissions and the most current information about Windows PowerShell for SharePoint Embedded Containers, see the documentation at [Intro to SharePoint Embedded Containers Management Shell](/powershell/sharepoint/sharepoint-online/introduction-sharepoint-online-management-shell).

> [!NOTE]
> A user can be assigned to only one role within a container at a time.
> **Owner** and **principal owner** are distinct. A container can have multiple owners, but only one principal owner at any time.
> Principal ownership of a container can't be added—it can only be transferred.


## EXAMPLES

### Example 1

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

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

## PARAMETERS

-ContainerId

> Applicable: SharePoint Online

The unique identifier of the container to which the user is being added.

```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’s login name to assign to the container. This is the User Principal Name.

```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 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.


```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)

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

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

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

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




Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ The following cmdlet references are for SharePoint Online.
### [Add-SPOContainerTypeBilling](Add-SPOContainerTypeBilling.md)
Adds the mentioned billing profile details to a standard container type.

### [Add-SPOContainerUser](Add-SPOContainerUser.md)
Adds a user to a SharePoint Embedded container with a specified role.

### [Add-SPOContentSecurityPolicy](Add-SPOContentSecurityPolicy.md)
Adds a source to the **Content Security Policy** configuration.

Expand Down Expand Up @@ -481,14 +484,17 @@ Cmdlet to register customer encryption status for your geo tenant. For more info
Enables the hub site feature on a site to make it a hub site. For more information visit [SharePoint hub sites overview](/sharepoint/dev/features/hub-site/hub-site-overview).

### [Remove-SPOAppBillingPolicy](Remove-SPOAppBillingPolicy.md)
Removes billing policy asscoiated with the application.
Removes billing policy associated with the application.

### [Remove-SPOContainer](Remove-SPOContainer.md)
Sends a Container to the Recycle Bin.

### [Remove-SPOContainerType](Remove-SPOContainerType.md)
This cmdlet removes the container type specified from the tenant.

### [Remove-SPOContainerUser](Remove-SPOContainerUser.md)
This cmdlet removes the container type specified from the tenant.

### [Remove-SPOContentEventEmailAddresses](Remove-SPOContentEventEmailAddresses.md)
Removes the email addresses associated with the specified category of content event if they exist. Consequently, notification emails will no longer be sent to these addresses.

Expand Down Expand Up @@ -666,6 +672,9 @@ Sets or updates one or more property values of a trial, standard or a direct to
### [Set-SPOContainerTypeConfiguration](Set-SPOContainerTypeConfiguration.md)
Sets or updates the configuration settings of a container type in SharePoint Embedded.

### [Set-SPOContainerUser](Set-SPOContainerUser.md)
Reassigns a user from their current role to a new role within a SharePoint Embedded container.

### [Set-SPOContentEventEmailAddresses](Set-SPOContentEventEmailAddresses.md)
Adds the email addresses to the specified category of content event. Consequently, notification emails will be sent to these addresses.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
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 a specified role in a SharePoint Embedded container.

## SYNTAX

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

##DESCRIPTION

Removes a user from a defined role within a SharePoint Embedded container.

You must be a SharePoint Embedded Administrator to run this cmdlet.

For permissions and the most current information about Windows PowerShell for SharePoint Embedded Containers, see the documentation at [Intro to SharePoint Embedded Containers Management Shell](/powershell/sharepoint/sharepoint-online/introduction-sharepoint-online-management-shell).

> [!NOTE]
> You can't remove the principal owner of a container.


## EXAMPLES

### Example 1

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

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

The unique identifier of the container to which the user is being added.

```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’s login name to assign to the container. This is the User Principal Name.

```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 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.


```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)

[Add-SPOContainerUser](./Add-SPOContainerUser.md)

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

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

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

Loading
Loading