Skip to content

Commit 1ec1764

Browse files
Merge pull request #981 from ShreyasSar26/patch-PS
Membership management changes
2 parents f9b66c4 + b70f0df commit 1ec1764

File tree

4 files changed

+418
-1
lines changed

4 files changed

+418
-1
lines changed
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
---
2+
external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml
3+
Module Name: Microsoft.Online.SharePoint.PowerShell
4+
online version: https://learn.microsoft.com/powershell/module/sharepoint-online/add-spocontaineruser
5+
applicable: SharePoint Online
6+
title: Add-SPOContainerUser
7+
schema: 2.0.0
8+
author: ShreyasSar26
9+
ms.author: shsaravanan
10+
ms.reviewer:
11+
---
12+
13+
# Add-SPOContainerUser
14+
15+
## SYNOPSIS
16+
17+
Adds a user to a SharePoint Embedded container with a specified role.
18+
19+
## SYNTAX
20+
21+
```
22+
Add-SPOContainerUser [-ContainerId] <String> -LoginName <String> -Role <String> [<CommonParameters>]
23+
```
24+
25+
##DESCRIPTION
26+
27+
Assigns a user to a defined role within a SharePoint Embedded container.
28+
29+
You must be a SharePoint Embedded Administrator to run this cmdlet.
30+
31+
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).
32+
33+
> [!NOTE]
34+
> A user can be assigned to only one role within a container at a time.
35+
> **Owner** and **principal owner** are distinct. A container can have multiple owners, but only one principal owner at any time.
36+
> Principal ownership of a container can't be added—it can only be transferred.
37+
38+
39+
## EXAMPLES
40+
41+
### Example 1
42+
43+
```powershell
44+
Add-SPOContainerUser 423poi45 -LoginName [email protected] Owner
45+
```
46+
47+
Example 1 assigns the role of owner to user with User Principal Name "[email protected]".
48+
49+
## PARAMETERS
50+
51+
-ContainerId
52+
53+
> Applicable: SharePoint Online
54+
55+
The unique identifier of the container to which the user is being added.
56+
57+
```yaml
58+
Type: String
59+
Parameter Sets: (All)
60+
Aliases:
61+
62+
Required: True
63+
Position: 0
64+
Default value: None
65+
Accept pipeline input: False
66+
Accept wildcard characters: False
67+
```
68+
69+
-LoginName
70+
71+
> Applicable: SharePoint Online
72+
73+
The user’s login name to assign to the container. This is the User Principal Name.
74+
75+
```yaml
76+
Type: String
77+
Parameter Sets: (All)
78+
Aliases:
79+
80+
Required: True
81+
Position: Named
82+
Default value: None
83+
Accept pipeline input: False
84+
Accept wildcard characters: False
85+
```
86+
87+
-Role
88+
89+
> Applicable: SharePoint Online
90+
91+
The role to assign to the user within the container. Valid roles are:
92+
93+
Owner: Has full control over the container and its contents.
94+
Manager: Can add, update, and delete content, and manage permissions, but can't delete the container.
95+
Writer: Can add, update, and delete content in the container.
96+
Reader: Can only view content in the container.
97+
98+
99+
```yaml
100+
Type: String
101+
Parameter Sets: (All)
102+
Aliases:
103+
Accepted values: Owner, Reader, Writer, Manager
104+
105+
Required: True
106+
Position: Named
107+
Default value: None
108+
Accept pipeline input: False
109+
Accept wildcard characters: False
110+
```
111+
112+
### CommonParameters
113+
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).
114+
115+
## INPUTS
116+
117+
### None
118+
119+
## OUTPUTS
120+
121+
### System.Object
122+
123+
## NOTES
124+
125+
## RELATED LINKS
126+
127+
[Intro to SharePoint Embedded Containers Management Shell](/powershell/sharepoint/sharepoint-online/introduction-sharepoint-online-management-shell)
128+
129+
[Set-SPOContainerUser](./Set-SPOContainerUser.md)
130+
131+
[Remove-SPOContainerUser](./Remove-SPOContainerUser.md)
132+
133+
[Set-SPOContainer](./Set-SPOContainer.md)
134+
135+
[Get-SPOContainer](./Get-SPOContainer.md)
136+
137+
138+
139+

sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Microsoft.Online.SharePoint.PowerShell.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ The following cmdlet references are for SharePoint Online.
1818
### [Add-SPOContainerTypeBilling](Add-SPOContainerTypeBilling.md)
1919
Adds the mentioned billing profile details to a standard container type.
2020

21+
### [Add-SPOContainerUser](Add-SPOContainerUser.md)
22+
Adds a user to a SharePoint Embedded container with a specified role.
23+
2124
### [Add-SPOContentSecurityPolicy](Add-SPOContentSecurityPolicy.md)
2225
Adds a source to the **Content Security Policy** configuration.
2326

@@ -481,14 +484,17 @@ Cmdlet to register customer encryption status for your geo tenant. For more info
481484
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).
482485

483486
### [Remove-SPOAppBillingPolicy](Remove-SPOAppBillingPolicy.md)
484-
Removes billing policy asscoiated with the application.
487+
Removes billing policy associated with the application.
485488

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

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

495+
### [Remove-SPOContainerUser](Remove-SPOContainerUser.md)
496+
This cmdlet removes the container type specified from the tenant.
497+
492498
### [Remove-SPOContentEventEmailAddresses](Remove-SPOContentEventEmailAddresses.md)
493499
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.
494500

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

675+
### [Set-SPOContainerUser](Set-SPOContainerUser.md)
676+
Reassigns a user from their current role to a new role within a SharePoint Embedded container.
677+
669678
### [Set-SPOContentEventEmailAddresses](Set-SPOContentEventEmailAddresses.md)
670679
Adds the email addresses to the specified category of content event. Consequently, notification emails will be sent to these addresses.
671680

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
---
2+
external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml
3+
Module Name: Microsoft.Online.SharePoint.PowerShell
4+
online version: https://learn.microsoft.com/powershell/module/sharepoint-online/remove-spocontaineruser
5+
applicable: SharePoint Online
6+
title: Remove-SPOContainerUser
7+
schema: 2.0.0
8+
author: ShreyasSar26
9+
ms.author: shsaravanan
10+
ms.reviewer:
11+
---
12+
13+
# Remove-SPOContainerUser
14+
15+
## SYNOPSIS
16+
17+
Removes a user from a specified role in a SharePoint Embedded container.
18+
19+
## SYNTAX
20+
21+
```
22+
Remove-SPOContainerUser [-ContainerId] <String> -LoginName <String> -Role <String> [<CommonParameters>]
23+
```
24+
25+
##DESCRIPTION
26+
27+
Removes a user from a defined role within a SharePoint Embedded container.
28+
29+
You must be a SharePoint Embedded Administrator to run this cmdlet.
30+
31+
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).
32+
33+
> [!NOTE]
34+
> You can't remove the principal owner of a container.
35+
36+
37+
## EXAMPLES
38+
39+
### Example 1
40+
41+
```powershell
42+
Remove-SPOContainerUser 423poi45 -LoginName [email protected] Owner
43+
```
44+
45+
Example 1 removes the user with User Principal Name "[email protected]" from the role of an owner of container whose ContainerId is 423poi45 .
46+
47+
## PARAMETERS
48+
49+
-ContainerId
50+
51+
> Applicable: SharePoint Online
52+
53+
The unique identifier of the container to which the user is being added.
54+
55+
```yaml
56+
Type: String
57+
Parameter Sets: (All)
58+
Aliases:
59+
60+
Required: True
61+
Position: 0
62+
Default value: None
63+
Accept pipeline input: False
64+
Accept wildcard characters: False
65+
```
66+
67+
-LoginName
68+
69+
> Applicable: SharePoint Online
70+
71+
The user’s login name to assign to the container. This is the User Principal Name.
72+
73+
```yaml
74+
Type: String
75+
Parameter Sets: (All)
76+
Aliases:
77+
78+
Required: True
79+
Position: Named
80+
Default value: None
81+
Accept pipeline input: False
82+
Accept wildcard characters: False
83+
```
84+
85+
-Role
86+
87+
> Applicable: SharePoint Online
88+
89+
The role to assign to the user within the container. Valid roles are:
90+
91+
Owner: Has full control over the container and its contents.
92+
Manager: Can add, update, and delete content, and manage permissions, but can't delete the container.
93+
Writer: Can add, update, and delete content in the container.
94+
Reader: Can only view content in the container.
95+
96+
97+
```yaml
98+
Type: String
99+
Parameter Sets: (All)
100+
Aliases:
101+
Accepted values: Owner, Reader, Writer, Manager
102+
103+
Required: True
104+
Position: Named
105+
Default value: None
106+
Accept pipeline input: False
107+
Accept wildcard characters: False
108+
```
109+
110+
### CommonParameters
111+
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).
112+
113+
## INPUTS
114+
115+
### None
116+
117+
## OUTPUTS
118+
119+
### System.Object
120+
121+
## NOTES
122+
123+
## RELATED LINKS
124+
125+
[Intro to SharePoint Embedded Containers Management Shell](/powershell/sharepoint/sharepoint-online/introduction-sharepoint-online-management-shell)
126+
127+
[Add-SPOContainerUser](./Add-SPOContainerUser.md)
128+
129+
[Set-SPOContainerUser](./Set-SPOContainerUser.md)
130+
131+
[Set-SPOContainer](./Set-SPOContainer.md)
132+
133+
[Get-SPOContainer](./Get-SPOContainer.md)
134+

0 commit comments

Comments
 (0)