Add Remove-PnPMultiGeoCompanyAllowedDataLocation#5379
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new SharePoint Online Multi-Geo admin cmdlet to remove an allowed data location, backed by a MultiGeo REST API call that uses a POST + X-HTTP-Method: DELETE override. The PR also updates localized resource strings and cmdlet documentation to match the intended UX.
Changes:
- Added
Remove-PnPMultiGeoCompanyAllowedDataLocationcmdlet (high confirm impact, two prompts, cancel message, success warning). - Extended
MultiGeoRestApiClientwith a delete-style request for allowed data locations (method override with empty POST body). - Updated resources and documentation to include the new cmdlet.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Commands/Utilities/MultiGeo/MultiGeoRestApiClient.cs | Adds REST client support for removing an allowed data location via POST method override. |
| src/Commands/Properties/Resources.resx | Adds new localized strings for remove-location warnings, prompts, cancel, and success messaging. |
| src/Commands/Properties/Resources.Designer.cs | Regenerates strongly-typed accessors for the new resource strings. |
| src/Commands/Admin/RemoveMultiGeoCompanyAllowedDataLocation.cs | Introduces the new admin cmdlet implementation. |
| documentation/Set-PnPMultiGeoCompanyAllowedDataLocation.md | Adds related link to the new Remove cmdlet documentation. |
| documentation/Remove-PnPMultiGeoCompanyAllowedDataLocation.md | Adds new documentation page for the cmdlet. |
| documentation/Get-PnPMultiGeoCompanyAllowedDataLocation.md | Adds related link to the new Remove cmdlet documentation. |
| CHANGELOG.md | Adds a “Current nightly” entry for the new cmdlet. |
Files not reviewed (1)
- src/Commands/Properties/Resources.Designer.cs: Generated file
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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
Remove-PnPMultiGeoCompanyAllowedDataLocationso PnP PowerShell can delete a SharePoint Online multi-geo allowed data location using the same behavior as the SPO Management Shell cmdlet.The cmdlet mirrors the SPO command shape and UX, including the mandatory
-Locationparameter,SupportsShouldProcess, high confirm impact, two confirmation prompts, the cancel output, and the success warning. The MultiGeo REST client reuses the existing API version negotiation and sends the same request pattern: POST with an empty body andX-HTTP-Method: DELETEtoAllowedDataLocations(location='{escapedLocation}').Documentation, related links, resource strings, and the Current nightly changelog were updated for the new cmdlet.
Guidance
N/A