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

Get-AzureStorageServiceProperty

获取Azure 存储服务的属性。

警告

截至 2024 年 2 月 29 日,AzureRM PowerShell 模块已正式弃用。 为了确保持续获得支持和更新,建议用户从 AzureRM 迁移到 Az PowerShell 模块。

尽管 AzureRM 模块仍可能正常运行,但它不再维护或受支持,但会根据用户的自由裁量权和风险继续使用任何继续使用模块。 有关过渡到 Az 模块的指导,请参阅我们的迁移资源

语法

Get-AzureStorageServiceProperty
   [-ServiceType] <StorageServiceType>
   [-Context <IStorageContext>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

说明

Get-Azure存储ServiceProperty cmdlet 获取Azure 存储服务的属性。

示例

示例 1:获取 Blob 服务的 Azure 存储 服务属性

C:\PS>Get-AzureStorageServiceProperty -ServiceType Blob

Logging.Version                     : 1.0
Logging.LoggingOperations           : None
Logging.RetentionDays               : 
HourMetrics.Version                 : 1.0
HourMetrics.MetricsLevel            : ServiceAndApi
HourMetrics.RetentionDays           : 7
MinuteMetrics.Version               : 1.0
MinuteMetrics.MetricsLevel          : None
MinuteMetrics.RetentionDays         : 
DeleteRetentionPolicy.Enabled       : True
DeleteRetentionPolicy.RetentionDays : 70
Cors                                : 
DefaultServiceVersion               : 2017-07-29

此命令获取 Blob 服务的 DefaultServiceVersion 属性。

参数

-Context

指定 Azure 存储上下文。 若要获取存储上下文,请使用 New-Azure存储Context cmdlet。

类型:IStorageContext
Position:Named
默认值:None
必需:False
接受管道输入:True
接受通配符:False

-DefaultProfile

用于与 Azure 通信的凭据、帐户、租户和订阅。

类型:IAzureContextContainer
别名:AzureRmContext, AzureCredential
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-ServiceType

指定存储服务类型。 此 cmdlet 获取此参数指定的服务类型的日志记录属性。 此参数的可接受值为:

  • Blob
  • Table
  • 队列
  • 文件
类型:StorageServiceType
接受的值:Blob, Table, Queue, File
Position:0
默认值:None
必需:True
接受管道输入:False
接受通配符:False

输入

IStorageContext

输出

PSSeriviceProperties