Diagnoses the local environment for running Avm.Authoring.
Runs a fixed set of probes (PowerShell version, OS detection, AVM cache folder writability) and emits a structured result. The verb is fail-fast but does not throw: a failing check is reported in the Checks collection and reflected in the overall Status. Use the exit-code via the dispatcher when scripting.
With -Install, additionally walks every entry in avm.pins and installs any missing tool into the per-user cache (atomic stage->verify->rename through Install-AvmToolFromPins). Tools that do not ship a release for the current platform are reported as 'Skip', not 'Fail'.
avm doctor
Invoke-AvmDoctor [[-PinsPath] <string>] [[-Path] <string>] [-Json] [-Install] [-Force] [-AllowFileUrls] [-SkipModuleVersionCheck] [-WhatIf] [-Confirm] [<CommonParameters>]Test-only escape hatch (see Test-AvmPins). Hidden from help and tab-completion so it does not appear in the production surface.
| Property | Value |
|---|---|
| Type | Switch |
| Required | false |
| Position | named |
| Default value | False |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Combined with -Install, reinstall every tool even if a verified copy is already in the cache.
| Property | Value |
|---|---|
| Type | Switch |
| Required | false |
| Position | named |
| Default value | False |
| Accept pipeline input | false |
| Accept wildcard characters | false |
After running diagnostics, install every tool in avm.pins that is not already cache-verified. Cache hits are reported as OK; per-platform unsupported tools are reported as Skip; any other install failure becomes a Fail without aborting the remaining tools.
| Property | Value |
|---|---|
| Type | Switch |
| Required | false |
| Position | named |
| Default value | False |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Emit the result as a single JSON document on stdout instead of as a pscustomobject. Matches the global '--json' contract from the spec.
| Property | Value |
|---|---|
| Type | Switch |
| Required | false |
| Position | named |
| Default value | False |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Module root whose tool-version-overrides.json applies. Bicep monorepos use their recognized repository root. Defaults to the current directory.
| Property | Value |
|---|---|
| Type | String |
| Required | false |
| Position | 2 |
| Default value | $PWD.Path |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Override the bundled Resources/avm.pins.jsonc. Intended for tests.
| Property | Value |
|---|---|
| Type | String |
| Required | false |
| Position | 1 |
| Default value | |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Skip the PowerShell Gallery check that otherwise stops the command when a newer Avm.Authoring version is available. Writes a warning once.
| Property | Value |
|---|---|
| Type | Switch |
| Required | false |
| Position | named |
| Default value | False |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Invoke-AvmDoctoravm doctor --jsonavm doctor --installSystem.Management.Automation.PSObject