Skip to content

Add Remove-PnPMultiGeoCompanyAllowedDataLocation#5379

Merged
gautamdsheth merged 3 commits into
devfrom
gautamdsheth-remove-spo-multigeo
Jul 3, 2026
Merged

Add Remove-PnPMultiGeoCompanyAllowedDataLocation#5379
gautamdsheth merged 3 commits into
devfrom
gautamdsheth-remove-spo-multigeo

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 Remove-PnPMultiGeoCompanyAllowedDataLocation so 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 -Location parameter, 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 and X-HTTP-Method: DELETE to AllowedDataLocations(location='{escapedLocation}').

Documentation, related links, resource strings, and the Current nightly changelog were updated for the new cmdlet.

Guidance

N/A

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 3, 2026 20:41

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 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-PnPMultiGeoCompanyAllowedDataLocation cmdlet (high confirm impact, two prompts, cancel message, success warning).
  • Extended MultiGeoRestApiClient with 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

Comment thread src/Commands/Admin/RemoveMultiGeoCompanyAllowedDataLocation.cs
Comment thread src/Commands/Admin/RemoveMultiGeoCompanyAllowedDataLocation.cs
Comment thread CHANGELOG.md Outdated
gautamdsheth and others added 2 commits July 3, 2026 23:57
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@gautamdsheth gautamdsheth merged commit 472c2d4 into dev Jul 3, 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