你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzDiskAccess
获取磁盘访问的属性
语法
Get-AzDiskAccess
[[-ResourceGroupName] <String>]
[[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzDiskAccess
[-ResourceId] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzDiskAccess cmdlet 获取磁盘访问的属性
示例
示例 1:使用默认参数集
Get-AzDiskAccess -ResourceGroupName 'ResourceGroup01' -Name 'DiskAccess01'
PrivateEndpointConnections : {}
ProvisioningState : Succeeded
TimeCreated : 8/13/2020 7:02:50 PM
Location : northcentralus
Id : /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Compute/diskAccesses/DiskAccess01
Name : DiskAccess01
Type : Microsoft.Compute/diskAccesses
Tags : {}
此命令获取资源组“ResourceGroup01”中名为“DiskAccess01”的磁盘访问资源的属性。
示例 2:按资源组获取 AzDiskAccess
Get-AzDiskAccess -ResourceGroupName 'ResourceGroup01'
PrivateEndpointConnections : {}
ProvisioningState : Succeeded
TimeCreated : 8/13/2020 7:02:50 PM
Location : northcentralus
Id : /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Compute/diskAccesses/DiskAccess01
Name : DiskAccess01
Type : Microsoft.Compute/diskAccesses
Tags : {}
PrivateEndpointConnections : {}
ProvisioningState : Succeeded
TimeCreated : 8/13/2020 7:05:19 PM
Location : northcentralus
Id : /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Compute/diskAccesses/DiskAccess02
Name : DiskAccess02
Type : Microsoft.Compute/diskAccesses
Tags : {}
此命令获取资源组“ResourceGroup01”中所有磁盘访问的属性。
示例 3:获取所有磁盘访问
Get-AzDiskAccess
PrivateEndpointConnections : {}
ProvisioningState : Succeeded
TimeCreated : 8/13/2020 7:02:50 PM
Location : northcentralus
Id : /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Compute/diskAccesses/DiskAccess01
Name : DiskAccess01
Type : Microsoft.Compute/diskAccesses
Tags : {}
PrivateEndpointConnections : {}
ProvisioningState : Succeeded
TimeCreated : 8/13/2020 7:05:19 PM
Location : northcentralus
Id : /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/ResourceGroup21/providers/Microsoft.Compute/diskAccesses/DiskAccess02
Name : DiskAccess02
Type : Microsoft.Compute/diskAccesses
Tags : {}
PrivateEndpointConnections : {}
ProvisioningState : Succeeded
TimeCreated : 8/13/2020 7:05:19 PM
Location : northcentralus
Id : /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/ResourceGroup08/providers/Microsoft.Compute/diskAccesses/DiskAccess03
Name : DiskAccess03
Type : Microsoft.Compute/diskAccesses
Tags : {}
此命令获取订阅下所有磁盘访问的属性。
示例 4:使用通配符获取所有磁盘访问
Get-AzDiskAccess -Name DiskAccessMicrosoft*
PrivateEndpointConnections : {}
ProvisioningState : Succeeded
TimeCreated : 8/13/2020 7:02:50 PM
Location : northcentralus
Id : /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Compute/diskAccesses/DiskAccessMicrosoftAzure
Name : DiskAccessMicrosoftAzure
Type : Microsoft.Compute/diskAccesses
Tags : {}
PrivateEndpointConnections : {}
ProvisioningState : Succeeded
TimeCreated : 8/13/2020 7:05:19 PM
Location : northcentralus
Id : /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Compute/diskAccesses/DiskAccessMicrosoftTeams
Name : DiskAccessMicrosoftTeams
Type : Microsoft.Compute/diskAccesses
Tags : {}
此命令获取以“DiskAccessMicrosoft”开头的订阅名称下的所有磁盘访问的属性。
示例 5:使用 ResourceId 获取磁盘访问。
Get-AzDiskAccess -ResourceId '/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Compute/diskAccesses/DiskAccess01'
PrivateEndpointConnections : {}
ProvisioningState : Succeeded
TimeCreated : 8/13/2020 7:02:50 PM
Location : northcentralus
Id : /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Compute/diskAccesses/DiskAccess01
Name : DiskAccess01
Type : Microsoft.Compute/diskAccesses
Tags : {}
此命令获取具有给定 ResourceId 的磁盘访问的属性。
参数
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Name
指定磁盘访问的名称。
类型: | String |
别名: | diskAccessName |
Position: | 1 |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | True |
-ResourceGroupName
指定资源组的名称。
类型: | String |
Position: | 0 |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | True |
-ResourceId
磁盘访问的资源 ID。
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |