external help file | ms.assetid | online version | schema |
---|---|---|---|
Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.xml |
2A8BE3EB-4929-4B40-82EA-5434C09A5251 |
2.0.0 |
Gets Azure data disks.
[!INCLUDE rdfe-banner]
Get-AzureDataDisk [[-Lun] <Int32>] -VM <IPersistentVM> [-Profile <AzureSMProfile>]
[-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
The Get-AzureDataDisk cmdlet gets an object that represents the data disks on an Azure virtual machine. To get a specific data disk object, specify the logical unit number (LUN) of the disk.
PS C:\> Get-AzureVM "ContosoService" -Name "VirtualMachine07" | Get-AzureDataDisk
This command gets the virtual machine named VirtualMachine07 in the service named ContosoService by using the Get-AzureVM cmdlet. The command passes the virtual machine to the current cmdlet by using the pipeline operator. The current cmdlet gets all the data disks for this virtual machine.
PS C:\> Get-AzureVM "ContosoService" -Name "VirtualMachine07" | Get-AzureDataDisk -LUN 2
This command gets the virtual machine named VirtualMachine07 in the service named ContosoService. The command passes the virtual machine to the current cmdlet. The current cmdlet gets the data disk that has the LUN 2.
Specifies how this cmdlet responds to an information event.
The acceptable values for this parameter are:
- Continue
- Ignore
- Inquire
- SilentlyContinue
- Stop
- Suspend
Type: ActionPreference
Parameter Sets: (All)
Aliases: infa
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies an information variable.
Type: String
Parameter Sets: (All)
Aliases: iv
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the LUN for the data drive in the virtual machine. Valid values are: 0 through 15.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Type: AzureSMProfile
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the virtual machine object for which this cmdlet gets data disks. To obtain a virtual machine object, use the Get-AzureVM cmdlet.
Type: IPersistentVM
Parameter Sets: (All)
Aliases: InputObject
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).