azcmagent show

Displays the current state of the Azure Connected Machine agent, including whether or not it's connected to Azure, the Azure resource information, and the status of dependent services.

Note

azcmagent show does not require administrator privileges

Usage

azcmagent show [property1] [property2] ... [propertyN] [flags]

Examples

Check the status of the agent.

azcmagent show

Check the status of the agent and save it in a JSON file in the current directory.

azcmagent show -j > "agent-status.json"

Show only the agent status and last heartbeat time (using display names)

azcmagent show "Agent Status" "Agent Last Heartbeat"

Show only the agent status and last heartbeat time (using JSON keys)

azcmagent show status lastHeartbeat

Flags

[property]

The name of a property to include in the output. If you want to show more than one property, separate them by spaces. You can use either the display name or the JSON key name to specify a property. For display names with spaces, enclose the property in quotes.

--os

Outputs additional information about the operating system.

Common flags available for all commands

--config

Takes in a path to a JSON or YAML file containing inputs to the command. The configuration file should contain a series of key-value pairs where the key matches an available command line option. For example, to pass in the --verbose flag, the configuration file would look like:

{
    "verbose": true
}

If a command line option is found in both the command invocation and a configuration file, the value specified on the command line will take precedence.

-h, --help

Get help for the current command, including its syntax and command line options.

-j, --json

Output the command result in the JSON format.

--log-stderr

Redirect error and verbose messages to the standard error (stderr) stream. By default, all output is sent to the standard output (stdout) stream.

--no-color

Disable color output for terminals that do not support ANSI colors.

-v, --verbose

Show more detailed logging information while the command executes. Useful for troubleshooting issues when running a command.