Set-PnPUserOneDriveQuota

Tip

We encourage you to make improvements to this documentation. Please navigate to https://github.com/pnp/powershell/blob/dev/documentation/Set-PnPUserOneDriveQuota.md to change this file.

Required Permissions

  • SharePoint: Access to the SharePoint Tenant Administration site

Sets the quota on the OneDrive for Business site for a specific user

Syntax

Set-PnPUserOneDriveQuota
   [-Account] <String>
   [-Quota] <Int64>
   [-QuotaWarning] <Int64>
   [-Connection <PnPConnection>]
   [<CommonParameters>]

Description

This command allows you to set the quota on the OneDrive for Business site of a specific user. You must connect to the tenant admin website (https://:-admin.sharepoint.com) with Connect-PnPOnline in order to use this cmdlet.

Examples

EXAMPLE 1

Set-PnPUserOneDriveQuota -Account 'user@domain.com' -Quota 5368709120 -QuotaWarning 4831838208

Sets the quota on the OneDrive for Business site for the specified user to 5GB (5368709120 bytes) and sets a warning to be shown at 4.5 GB (4831838208)

Parameters

-Account

The account of the user, formatted either as a login name, or as a claims identity, e.g. i:0#.f|membership|user@domain.com

Type:String
Position:0
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Quota

The quota to set on the OneDrive for Business site of the user, in bytes

Type:Int64
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-QuotaWarning

The quota to set on the OneDrive for Business site of the user when to start showing warnings about the drive nearing being full, in bytes

Type:Int64
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False