Skip to main content

Use-ZrWorkspace

Makes a Zaris workspace the active target for admin cmdlets — activating a locally-saved one, or joining an existing one from a seed manager address.

Syntax

Use-ZrWorkspace
-Name <string>
[-Managers <string[]>]
[-Token <string>]
[-WhatIf] [-Confirm]

Description

Use-ZrWorkspace activates a workspace and points the session's admin cmdlets at its managers. If the workspace is already saved locally and no seed is supplied, it activates it with no network call. If it is not saved — or you pass -Managers with any one of its manager addresses as a seed — it joins the existing workspace: it reads that manager's binding, validates the name matches, discovers the full manager roster, saves it, then activates.

It never creates or claims managers — use New-ZrWorkspace to create a workspace from unclaimed managers. Joining a name that the seed manager does not belong to, or a locally-saved workspace with no managers, is rejected with guidance.

Parameters

ParameterTypeRequiredDescription
-NamestringYesName of the workspace to connect to. Position 0.
-Managersstring[]NoSeed manager endpoint(s) of the workspace. Supply these to JOIN a workspace this machine has not saved yet (or to re-discover the roster) — the full manager set is discovered from any one of them. Omit to just activate a locally-saved workspace. Position 1.
-TokenstringNoAdmin bearer token for a secured workspace (used with -Managers).

Supports -WhatIf and -Confirm.

Examples

Activate a workspace that is already saved locally (no network).

Use-ZrWorkspace prod

Join an existing prod workspace via one of its managers, discovering the rest of the roster, then activate it.

Use-ZrWorkspace prod @('10.0.0.11:7801')

Join a secured workspace with an admin token.

Use-ZrWorkspace prod @('10.0.0.11:7801') -Token $env:ZR_ADMIN_TOKEN