azcmagent config

配置 Azure 连接计算机代理的设置。 配置存储在本地,对每台计算机是唯一的。 可用的配置属性因代理版本而异。 使用 azcmagent 配置信息 查看当前安装的代理的所有可用配置属性和支持的值。

命令

命令 目的
azcmagent config clear 清除配置属性的值
azcmagent config get 获取配置属性的值
azcmagent config info 介绍所有可用的配置属性和支持的值
azcmagent config list 列出所有配置属性和值
azcmagent config set 设置配置属性的值

azcmagent config clear

清除配置属性的值并将其重置为其默认状态。

用法

azcmagent config clear [property] [flags]

例子

清除代理服务器 URL 属性:

azcmagent config clear proxy.url

标志

此命令支持 通用标志中所述的标志

azcmagent config get

获取配置属性的值。

用法

azcmagent config get [property] [flags]

例子

获取代理模式:

azcmagent config get config.mode

标志

此命令支持 通用标志中所述的标志

azcmagent config info

介绍可用的配置属性和支持的值。 在没有指定特定属性的情况下运行时,该命令描述其支持的所有可用属性。

用法

azcmagent config info [property] [flags]

例子

描述所有可用的配置属性和支持的值:

azcmagent config info

详细了解扩展 allowlist 属性及其支持的值:

azcmagent config info extensions.allowlist

标志

此命令支持 通用标志中所述的标志

azcmagent config list

列出所有配置属性及其当前值

用法

azcmagent config list [flags]

例子

列出当前代理配置:

azcmagent config list

标志

此命令支持 通用标志中所述的标志

azcmagent config set

设置配置属性的值。

用法

azcmagent config set [property] [value] [flags]

例子

将代理配置为使用代理服务器:

azcmagent config set proxy.url "http://proxy.contoso.corp:8080"

将扩展追加到扩展允许列表:

azcmagent config set extensions.allowlist "Microsoft.Azure.Monitor/AzureMonitorWindowsAgent" --add

禁用对计算机的所有远程访问:

azcmagent config set incomingconnections.enabled false

标志

此命令支持 通用标志中所述的标志以及本节中列出的标志。

-a--add

将值追加到现有值列表中。 如果未指定,则默认行为是替换现有值的列表。 仅支持多个值的配置属性支持此标志。 不能与 --remove 标志一起使用。

-r--remove

从列表中删除指定的值,保留所有其他值。 如果未指定,则默认行为是替换现有值的列表。 仅支持多个值的配置属性支持此标志。 不能与 --add 标志结合使用。