Get-AzDiskAccess
取得磁碟存取的屬性
語法
Get-AzDiskAccess
[[-ResourceGroupName] <String>]
[[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzDiskAccess
[-ResourceId] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
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
磁碟存取的資源標識碼。
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |