Table of Contents

Request-PnPPersonalSite

SYNOPSIS

Required Permissions

Access to SharePoint admin site

  • SharePoint: AllSites.FullControl and User.ReadWrite.All when using delegated permissions
  • SharePoint: Sites.FullControl.All and User.ReadWrite.All when using application permissions

Requests that one or more users be enqueued for a OneDrive for Business site to be created for them.

SYNTAX

Request-PnPPersonalSite -UserEmails <String[]> [-NoWait] [-Connection <PnPConnection>] [-Verbose]

DESCRIPTION

The Request-PnPPersonalSite cmdlet requests that the users specified be enqueued so that a Personal Site be created for each. The actual OneDrive for Business site is created by a Timer Job later. If a user already has a Personal Site, the request for that user is silently ignored.

Note

• A maximum of 200 users can be specified and none of the entries may be empty. The cmdlet stops if it encounters an empty string in the array.

• The account or application running this cmdlet must be assigned at least the SharePoint Administrator role and must have a SharePoint Online license. The users the sites are provisioned for must also have a SharePoint license assigned.

• This only works for users who are allowed to sign in. Requests for users whose sign in is blocked do not result in a Personal Site being created.

• This cmdlet is NOT OneDrive Multi-Geo aware. On Multi-Geo enabled tenants you must run it for users in the region their data is to be hosted in. To retrieve users with a specific PDL, use: Get-PnPEntraIDUser | Where {$_.PreferredDataLocation -eq "EUR"}

EXAMPLES

EXAMPLE 1

Request-PnPPersonalSite -UserEmails @("user1@contoso.com", "user2@contoso.com")

This example requests that two users to be enqueued for the creation of a OneDrive for Business Site

EXAMPLE 2

Request-PnPPersonalSite -UserEmails "user1@contoso.com"

This example requests that for the provided user a OneDrive for Business site will be created

PARAMETERS

-UserEmails

Specifies one or more user logins to be enqueued for the creation of a Personal Site. The Personal site is created by a Timer Job later. You can specify between 1 and 200 users.

Note

If you are pre-provisioning OneDrive for a large number of users, it might take multiple days for the OneDrive locations to be created.

Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NoWait

Continues without the status being polled. Polling the action can slow its progress if lots of user emails are specified.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: PnPConnection
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Verbose

When provided, additional debug statements will be shown while executing the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Microsoft 365 Patterns and Practices