Skip to content

Add Set-PnPGeoStorageQuota cmdlet#5370

Merged
gautamdsheth merged 1 commit into
devfrom
gautamdsheth-implement-spo-geo-storage-quota
Jun 28, 2026
Merged

Add Set-PnPGeoStorageQuota cmdlet#5370
gautamdsheth merged 1 commit into
devfrom
gautamdsheth-implement-spo-geo-storage-quota

Conversation

@gautamdsheth

Copy link
Copy Markdown
Collaborator

Before creating a pull request, make sure that you have read the contribution file located at

https://github.com/pnp/powerShell/blob/dev/CONTRIBUTING.md

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

N/A

What is in this Pull Request ?

Adds Set-PnPGeoStorageQuota to set SharePoint Online multi-geo storage quotas using the same request shape as the SharePoint Online Management Shell cmdlet.

The cmdlet reuses the existing multi-geo REST client, sends a POST request with X-HTTP-Method: PATCH to StorageQuotas(geoLocation='{0}'), requires MultiGeo API version 1.3.1 or newer, and returns no output on success. Documentation and the current nightly changelog were also updated.

Validation completed:

  • Built src\Commands\PnP.PowerShell.csproj
  • Confirmed exported syntax for Set-PnPGeoStorageQuota
  • Compared the serialized quota payload against the SPO shell payload

Guidance

N/A

Copilot AI review requested due to automatic review settings June 28, 2026 19:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new SharePoint Online admin cmdlet, Set-PnPGeoStorageQuota, to update multi-geo storage quotas via the existing MultiGeo REST client using a POST request with an X-HTTP-Method: PATCH override, plus accompanying documentation and changelog entry.

Changes:

  • Added Set-PnPGeoStorageQuota cmdlet to partially update a geo location’s allocated storage quota.
  • Extended MultiGeoRestApiClient with a storage-quota PATCH (via POST method override) operation gated by a minimum MultiGeo API version.
  • Added cmdlet documentation and updated the current nightly changelog.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Commands/Utilities/MultiGeo/MultiGeoRestApiClient.cs Adds storage quota PATCH support using POST + X-HTTP-Method override and a minimum API version gate.
src/Commands/Model/StorageQuotaEntityData.cs Introduces the request payload model for storage quota updates.
src/Commands/Admin/SetGeoStorageQuota.cs Implements the Set-PnPGeoStorageQuota cmdlet that calls the MultiGeo REST client.
documentation/Set-PnPGeoStorageQuota.md Adds user-facing documentation for the new cmdlet.
CHANGELOG.md Adds an entry for the new cmdlet under “Current nightly”.

Comment thread src/Commands/Utilities/MultiGeo/MultiGeoRestApiClient.cs Outdated
Comment thread src/Commands/Admin/SetGeoStorageQuota.cs
Comment thread src/Commands/Admin/SetGeoStorageQuota.cs Outdated
Comment thread CHANGELOG.md Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@gautamdsheth gautamdsheth force-pushed the gautamdsheth-implement-spo-geo-storage-quota branch from 28b4c80 to 7e0b9bb Compare June 28, 2026 19:31
@gautamdsheth gautamdsheth merged commit 4e03eaf into dev Jun 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants