Remove-ZrSiteLink
Removes a WAN site link, clearing the site configuration on both the local store and its peer.
Syntax
Remove-ZrSiteLink
[-Store] <string>
-PeerStore <string>
[-PeerWorkspace <string>] [-PeerManagers <string[]>] [-PeerToken <string>]
[-Restart]
[-Managers <string[]>] [-Port <int>] [-Token <string>] [-TimeoutSec <int>]
[-WhatIf] [-Confirm]
Description
Remove-ZrSiteLink unlinks the local store and its peer, disabling site replication on each. Name the peer by -PeerWorkspace (a registered workspace, resolved locally and not activated) or inline with -PeerManagers/-PeerToken, exactly as with New-ZrSiteLink. If the peer is not addressable from here, the local side is still unlinked and the peer is left untouched.
The change feed is left enabled — it is a standalone CDC capability other consumers may use, so unlinking the sites does not turn it off. The cmdlet applies to each resolved local manager, then each peer manager, and supports -WhatIf/-Confirm.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
-Store | string | Yes | The local store to unlink. Position 0. |
-PeerStore | string | Yes | The peer store to unlink. |
-PeerWorkspace | string | No | A registered workspace naming the peer's manager; resolved locally, not activated. Alternative to -PeerManagers. |
-PeerManagers | string[] | No | Inline peer manager endpoint(s), when the peer workspace is not registered here. |
-PeerToken | string | No | Admin token for the peer manager (when inline, or to override a stale saved token). |
-Restart | switch | No | Rolling-restart each running node so it drops the link immediately. |
-Managers | string[] | No | Local Management Service endpoints to target. When omitted, the active workspace's managers are used. |
-Port | int | No | Management Service port for bare-host managers. Default 7801. |
-Token | string | No | Admin bearer token for the local managers. |
-TimeoutSec | int | No | Per-request timeout in seconds. Default 30. |
Supports -WhatIf and -Confirm.
Examples
Unlink local orders from its peer in the registered dr workspace.
Remove-ZrSiteLink -Store orders -PeerStore orders -PeerWorkspace dr -Restart