Skip to main content

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​

ParameterTypeRequiredDescription
-StorestringYesThe local store to unlink. Position 0.
-PeerStorestringYesThe peer store to unlink.
-PeerWorkspacestringNoA registered workspace naming the peer's manager; resolved locally, not activated. Alternative to -PeerManagers.
-PeerManagersstring[]NoInline peer manager endpoint(s), when the peer workspace is not registered here.
-PeerTokenstringNoAdmin token for the peer manager (when inline, or to override a stale saved token).
-RestartswitchNoRolling-restart each running node so it drops the link immediately.
-Managersstring[]NoLocal Management Service endpoints to target. When omitted, the active workspace's managers are used.
-PortintNoManagement Service port for bare-host managers. Default 7801.
-TokenstringNoAdmin bearer token for the local managers.
-TimeoutSecintNoPer-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