你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az storage account file-service-properties

管理存储帐户中文件服务的属性。

命令

名称 说明 类型 状态
az storage account file-service-properties show

在存储帐户中显示文件服务的属性。

核心 GA
az storage account file-service-properties update

更新存储帐户中文件服务的属性。

核心 GA

az storage account file-service-properties show

在存储帐户中显示文件服务的属性。

az storage account file-service-properties show --account-name
                                                [--resource-group]

示例

在存储帐户中显示文件服务的属性。

az storage account file-service-properties show -n mystorageaccount -g MyResourceGroup

必需参数

--account-name -n

存储帐户名称。

可选参数

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az storage account file-service-properties update

更新存储帐户中文件服务的属性。

az storage account file-service-properties update --account-name
                                                  [--add]
                                                  [--auth-methods]
                                                  [--channel-encryption]
                                                  [--delete-retention-days]
                                                  [--enable-delete-retention {false, true}]
                                                  [--enable-smb-multichannel {false, true}]
                                                  [--force-string]
                                                  [--kerb-ticket-encryption]
                                                  [--remove]
                                                  [--resource-group]
                                                  [--set]
                                                  [--versions]

示例

启用软删除策略,并将存储帐户中的文件服务的删除保留天数设置为 100。

az storage account file-service-properties update --enable-delete-retention true --delete-retention-days 100 -n mystorageaccount -g MyResourceGroup

禁用文件服务的软删除策略。

az storage account file-service-properties update --enable-delete-retention false -n mystorageaccount -g MyResourceGroup

为文件服务启用 SMB 多通道设置。

az storage account file-service-properties update --enable-smb-multichannel -n mystorageaccount -g MyResourceGroup

为文件服务禁用 SMB 多通道设置。

az storage account file-service-properties update --enable-smb-multichannel false -n mystorageaccount -g MyResourceGroup

为文件服务设置安全的 SMB 设置。

az storage account file-service-properties update --versions SMB2.1;SMB3.0;SMB3.1.1 --auth-methods NTLMv2;Kerberos --kerb-ticket-encryption RC4-HMAC;AES-256 --channel-encryption AES-128-CCM;AES-128-GCM;AES-256-GCM -n mystorageaccount -g MyResourceGroup

必需参数

--account-name -n

存储帐户名称。

可选参数

--add

通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>

默认值: []
--auth-methods

服务器支持的 SMB 身份验证方法。 有效值为 NTLMv2、Kerberos。 应作为带分隔符“;”的字符串传递。

--channel-encryption

服务器支持的 SMB 通道加密。 有效值为 AES-128-CCM、AES-128-GCM、AES-256-GCM。 应作为带分隔符“;”的字符串传递。

--delete-retention-days

指示应保留已删除项的天数。 最小指定值可以是 1,最大值可以为 365。

--enable-delete-retention

为共享软删除启用文件服务属性。

接受的值: false, true
--enable-smb-multichannel --mc

设置文件服务的 SMB 多通道设置。 仅适用于高级版文件存储。

接受的值: false, true
--force-string

使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。

默认值: False
--kerb-ticket-encryption -k

服务器支持的 Kerberos 票证加密。 有效值为 RC4-HMAC、AES-256。 应作为带分隔符“;”的字符串传递。

--remove

从列表中删除属性或元素。 示例: --remove property.list <indexToRemove> OR --remove propertyToRemove.

默认值: []
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--set

通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>

默认值: []
--versions

服务器支持的 SMB 协议版本。 有效值为 SMB2.1、SMB3.0、SMB3.1.1。 应作为带分隔符“;”的字符串传递。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。