Add Set-PnPGeoStorageQuota cmdlet#5370
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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-PnPGeoStorageQuotacmdlet to partially update a geo location’s allocated storage quota. - Extended
MultiGeoRestApiClientwith 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”. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
28b4c80 to
7e0b9bb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Related Issues?
N/A
What is in this Pull Request ?
Adds
Set-PnPGeoStorageQuotato 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: PATCHtoStorageQuotas(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:
src\Commands\PnP.PowerShell.csprojSet-PnPGeoStorageQuotaGuidance
N/A