Skip to main content

Disconnect-ZrStore

Closes the current session's Zaris store connection, clearing the stored context and stopping any background token-renewal loop. The operation is idempotent.

Syntax

Disconnect-ZrStore

Description

Disconnect-ZrStore releases the ambient connection previously opened with Connect-ZrStore. It takes no parameters. When no store is connected, the command still succeeds and reports WasConnected = false rather than raising an error.

After disconnecting, session-based cmdlets have no connection to reuse until you connect again with Connect-ZrStore (or pass independent -StoreName/-Endpoints to a one-shot capable cmdlet).

The command returns an object with StoreName, WasConnected, DisconnectedAt, Success, and Error.

Parameters

This cmdlet has no parameters (beyond the PowerShell common parameters).

Examples

Close the active store connection for the current session:

Disconnect-ZrStore

Connect, perform an operation, then disconnect:

Connect-ZrStore -ConnectionString "zaris://10.0.0.11:7861/OrdersStore"
Set-ZrItem -Key "order:1001" -Value "created"
Disconnect-ZrStore