Export-SPOUserInfo

Export user information from site user information list.

Syntax

Export-SPOUserInfo
      -LoginName <String>
      -Site <SpoSitePipeBind>
      -OutputFolder <String>
      [<CommonParameters>]

Description

Export user information from site user information list.

For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at Intro to SharePoint Online Management Shell.

Examples

------------ Example 1 --------------------

Export-SPOUserInfo -LoginName [email protected] -site https://contoso.sharepoint.com/sites/sc1 -OutputFolder "C:\users\admin\exportfolder"

Example 1 exports a user data who has the e-mail address [email protected] from the site collection https://contoso.sharepoint.com/sites/sc1 to folder C:\users\admin\exportfolder.

------------ Example 2 --------------------

$sites = Get-SPOSite -IncludePersonalSite $true
$user = "[email protected]"
foreach ($site in $sites)
{
Export-SPOUserInfo -LoginName $user -site $site.Url -OutputFolder
"C:\users\admin\exportfolder"
}

Example 2 exports user data who has email address [email protected] from all site collections to folder C:\users\admin\exportfolder.

Parameters

-LoginName

Specifies the login name of the user to export.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online

-OutputFolder

Target folder where the CSV file is generated.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online

-Site

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

Type:SpoSitePipeBind
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online