Get-AzsDisk

Returns the disk.

Syntax

Get-AzsDisk
   [-Location <String>]
   [-SubscriptionId <String[]>]
   [-Count \<Int32>]
   [-ScaleUnit <String>]
   [-SharePath <String>]
   [-Start \<Int32>]
   [-Status <String>]
   [-UserSubscriptionId <String>]
   [-VolumeLabel <String>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzsDisk
   -Name <String>
   [-Location <String>]
   [-SubscriptionId <String[]>]
   [-ShowSizeDetail]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzsDisk
   -INPUTOBJECT \<IComputeAdminIdentity>
   [-ShowSizeDetail]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Description

Returns the disk.

Examples

-------------------------- EXAMPLE 1 --------------------------

Get-AzsDisk

-------------------------- EXAMPLE 2 --------------------------

Get-AzsDisk -Name "426b8945-8a24-42ad-acdc-c26f16202489"

ActualSizeGb : 24 DiskId : 426b8945-8a24-42ad-acdc-c26f16202489 DiskSku : Premium_LRS DiskType : Disk Id : /subscriptions/74c72bdc-d917-431c-a377-8ca80f4238a0/providers/Microsoft.Compute.Admin/locations/north west/disks/426b8945-8a24-42ad-acdc-c26f16202489 Location : northwest ManagedBy : Name : northwest/426b8945-8a24-42ad-acdc-c26f16202489 ProvisionSizeGb : 127 SharePath : \SU1FileServer.azs-long02-int.selfhost.corp.microsoft.com\SU1_ObjStore_3 Status : Unattached Type : Microsoft.Compute.Admin/locations/disks UserResourceId : /subscriptions/74c72bdc-d917-431c-a377-8ca80f4238a0/resourceGroups/LADTEST/providers/Microsoft.Comput e/Disks/TEST_OsDisk_1_426b89458a2442adacdcc26f16202489

-------------------------- EXAMPLE 3 --------------------------

Get-AzsDisk -Count 3

ActualSizeGb : 24 DiskId : 20f1619e-4210-47f6-81e6-b89e3028df06 DiskSku : Premium_LRS DiskType : Disk Id : /subscriptions/74c72bdc-d917-431c-a377-8ca80f4238a0/providers/Microsoft.Compute.Admin/locations/north west/disks/20f1619e-4210-47f6-81e6-b89e3028df06 Location : northwest ManagedBy : Name : northwest/20f1619e-4210-47f6-81e6-b89e3028df06 ProvisionSizeGb : 127 SharePath : \SU1FileServer.azs-long02-int.selfhost.corp.microsoft.com\SU1_ObjStore_4 Status : Unattached Type : Microsoft.Compute.Admin/locations/disks UserResourceId : /subscriptions/74c72bdc-d917-431c-a377-8ca80f4238a0/resourceGroups/RG1/providers/Microsoft.Compute/Di sks/TEST_OsDisk_1_20f1619e421047f681e6b89e3028df06

ActualSizeGb : 24 DiskId : 38a767e4-4ceb-49fb-a53c-48de9b08aaae DiskSku : Standard_LRS DiskType : Disk Id : /subscriptions/74c72bdc-d917-431c-a377-8ca80f4238a0/providers/Microsoft.Compute.Admin/locations/north west/disks/38a767e4-4ceb-49fb-a53c-48de9b08aaae Location : northwest ManagedBy : Name : northwest/38a767e4-4ceb-49fb-a53c-48de9b08aaae ProvisionSizeGb : 127 SharePath : \SU1FileServer.azs-long02-int.selfhost.corp.microsoft.com\SU1_ObjStore_4 Status : Unattached Type : Microsoft.Compute.Admin/locations/disks UserResourceId : /subscriptions/74c72bdc-d917-431c-a377-8ca80f4238a0/resourceGroups/SCTE/providers/Microsoft.Compute/D isks/SCTETest_OsDisk_1_38a767e44ceb49fba53c48de9b08aaae

ActualSizeGb : 24 DiskId : 426b8945-8a24-42ad-acdc-c26f16202489 DiskSku : Premium_LRS DiskType : Disk Id : /subscriptions/74c72bdc-d917-431c-a377-8ca80f4238a0/providers/Microsoft.Compute.Admin/locations/north west/disks/426b8945-8a24-42ad-acdc-c26f16202489 Location : northwest ManagedBy : Name : northwest/426b8945-8a24-42ad-acdc-c26f16202489 ProvisionSizeGb : 127 SharePath : \SU1FileServer.azs-long02-int.selfhost.corp.microsoft.com\SU1_ObjStore_3 Status : Unattached Type : Microsoft.Compute.Admin/locations/disks UserResourceId : /subscriptions/74c72bdc-d917-431c-a377-8ca80f4238a0/resourceGroups/LADTEST/providers/Microsoft.Comput e/Disks/TEST_OsDisk_1_426b89458a2442adacdcc26f16202489

-------------------------- EXAMPLE 4 --------------------------

Get-AzsDisk -Status All -ScaleUnit s-cluster -VolumeLabel Objstore_4

ActualSizeGb : 2 DiskId : e4732f76-0753-40ec-80f5-8effdd0b437d DiskSku : Premium_LRS DiskType : Disk Id : /subscriptions/7829c784-cd3f-464a-b195-3be83c964c9c/providers/Microsoft.Compute.Admin/locations/redmond/disks/e4732f76-0753-40ec-80f5-8effdd0b437d Location : redmond ManagedBy : /subscriptions/7829c784-cd3f-464a-b195-3be83c964c9c/resourceGroups/rbactest/providers/Microsoft.Compute/virtualMachines/test1 Name : redmond/e4732f76-0753-40ec-80f5-8effdd0b437d ProvisionSizeGb : 30 SharePath : \SU1FileServer.s11r0401.masd.stbtest.microsoft.com\SU1_ObjStore_4 Status : Reserved Type : Microsoft.Compute.Admin/locations/disks UserResourceId : /subscriptions/7829c784-cd3f-464a-b195-3be83c964c9c/resourceGroups/RBACTEST/providers/Microsoft.Compute/Disks/test1_OsDisk_1_e4732f76075340ec80f58effdd0b437d

ActualSizeGb : 1 DiskId : 0485cbc9-1efa-43bd-86c2-0e201d79c528 DiskSku : Premium_LRS DiskType : Disk Id : /subscriptions/7829c784-cd3f-464a-b195-3be83c964c9c/providers/Microsoft.Compute.Admin/locations/redmond/disks/0485cbc9-1efa-43bd-86c2-0e201d79c528 Location : redmond ManagedBy : /subscriptions/7829c784-cd3f-464a-b195-3be83c964c9c/resourceGroups/rbactest/providers/Microsoft.Compute/virtualMachines/test1 Name : redmond/0485cbc9-1efa-43bd-86c2-0e201d79c528 ProvisionSizeGb : 64 SharePath : \SU1FileServer.s11r0401.masd.stbtest.microsoft.com\SU1_ObjStore_4 Status : Reserved Type : Microsoft.Compute.Admin/locations/disks UserResourceId : /subscriptions/7829c784-cd3f-464a-b195-3be83c964c9c/resourceGroups/TESTRG1/providers/Microsoft.Compute/Disks/gpsdisk

ActualSizeGb : 1 DiskId : 137893db-e7ce-4907-a488-b35c5e928614 DiskSku : Premium_LRS DiskType : Disk Id : /subscriptions/7829c784-cd3f-464a-b195-3be83c964c9c/providers/Microsoft.Compute.Admin/locations/redmond/disks/137893db-e7ce-4907-a488-b35c5e928614 Location : redmond ManagedBy : /subscriptions/7829c784-cd3f-464a-b195-3be83c964c9c/resourceGroups/rbactest/providers/Microsoft.Compute/virtualMachines/test1 Name : redmond/137893db-e7ce-4907-a488-b35c5e928614 ProvisionSizeGb : 55 SharePath : \SU1FileServer.s11r0401.masd.stbtest.microsoft.com\SU1_ObjStore_4 Status : Reserved Type : Microsoft.Compute.Admin/locations/disks UserResourceId : /subscriptions/7829c784-cd3f-464a-b195-3be83c964c9c/resourceGroups/RBACTEST/providers/Microsoft.Compute/Disks/testdd

Parameters

-Count

The maximum number of disks to return.

Type:System.Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:System.Management.Automation.PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.IComputeAdminIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Location

Location of the resource.

Type:System.String
Position:Named
Default value:(Get-AzLocation)[0].Location
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

The disk guid as identity.

Type:System.String
Aliases:DiskId
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ScaleUnit

The scale unit which the resource belongs to.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SharePath

The share which the resource belongs to.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ShowSizeDetail

Switch for whether summary or detailed disk size information is returned.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Start

The start index of disks in query.

Type:System.Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Status

The parameters of disk state.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

Type:System.String[]
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UserSubscriptionId

User Subscription Id which the resource belongs to.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VolumeLabel

The volume label of the volume which the resource belongs to.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.IComputeAdminIdentity

Outputs

Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.Api20210401.IDisk

Notes

ALIASES

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

INPUTOBJECT <IComputeAdminIdentity>: Identity Parameter

  • [DiskId <String>]: The disk guid as identity.
  • [FeatureName <String>]: Name of the feature.
  • [Id <String>]: Resource identity path
  • [Location <String>]: Location of the resource.
  • [MigrationId <String>]: The migration job guid name.
  • [Offer <String>]: Name of the offer.
  • [Publisher <String>]: Name of the publisher.
  • [QuotaName <String>]: Name of the quota.
  • [ScaleUnitName <String>]: Name of the scale unit.
  • [Sku <String>]: Name of the SKU.
  • [SubscriptionId <String>]: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • [Type <String>]: Type of extension.
  • [Version <String>]: The version of the resource.