Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Add-SPOUser

Add-SPOUser

microsoft.online.sharepoint.powershell.dll, microsoft.online.sharepoint.powershell-1.dll

Synopsis

Adds an existing Office 365 user or an Office 365 security group to a SharePoint group.

Syntax

Add-SPOUser [-Site] [-LoginName] [-Group] [<CommonParameters>]

Detailed Description

Along with the group memberships that are normally required to run Windows PowerShell, you must be a SharePoint Online global administrator and a site collection administrator to use the Add-SPOUser cmdlet.

For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at http://go.microsoft.com/fwlink/p/?LinkId=251832 (http://go.microsoft.com/fwlink/p/?LinkId=251832).

Parameters

-Site <SpoSitePipeBind>

Specifies the URL of the site collection to which you want to add the user.

Aliases

None

Required?

True

Position

2

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-LoginName <String>

Specifies the login name of the user to add.

Aliases

None

Required?

True

Position

3

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-Group <String>

Specifies the name of the SharePoint group to add the user or the security group to.

Aliases

None

Required?

True

Position

4

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

Input Type

Return Type

Notes

None

Examples

--------EXAMPLE 1--------

Example 1 adds a user who has the e-mail address joe.healy@contoso.com to the group "SC1 Owners" in the site collection https://contoso.sharepoint.com/sites/sc1.

C:\PS>Add-SPOUser -Site https://contoso.sharepoint.com/sites/sc1 -LoginName joe.healy@contoso.com -Group "SC1 Owners"

--------EXAMPLE 2--------

Example 2 adds a user who has the e-mail address melissa.kerr@contoso.com to the group "Team Site Members" in the site collection https://contoso.sharepoint.com.

C:\PS>Add-SPOUser -Site https://contoso.sharepoint.com -LoginName melissa.kerr@contoso.com -Group "Team Site Members"

Introduction to the SharePoint Online management shell
Set up the SharePoint Online Management Shell Windows PowerShell environment
New-SPOSiteGroup
Get-SPOUser
Set-SPOUser
Remove-SPOUser