Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Add-AzureDisk

Add-AzureDisk

microsoft.windowsazure.commands.servicemanagement.dll

Synopsis

Adds a new disk to the Microsoft Azure disk repository.

Syntax

Add-AzureDisk [-DiskName] [-MediaLocation] [-Label] [-OS] [<CommonParameters>]

Detailed Description

The Add-AzureDisk cmdlet adds a new disk to the Microsoft Azure disk repository in the current subscription. This disk is bootable if the optional –OS parameter is specified. If not specified, the disk is a data disk. The required parameters are DiskName and MediaLocation.

Parameters

-DiskName <String>

Specifies the name of the disk.

Aliases

None

Required?

true

Position

0

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-MediaLocation <String>

Specifies the physical location of the disk in Microsoft Azure storage. This link refers to a blob page in the current subscription and storage account.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Label <String>

Specifies a disk label.

Aliases

None

Required?

false

Position

named

Default value

Disk name

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-OS <String>

If specified, the disk is bootable. The OS parameter accepts either "Windows" or "Linux" values.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type

DiskContext

Notes

Examples

-------------------------- Example 1 --------------------------

This example adds a new, bootable Windows disk.

PS C:\> C:\PS>Add-AzureDisk -DiskName "MyWinDisk" -MediaLocation "http://yourstorageaccount.blob.core.azure.com/vhds/winserver-system.vhd" -Label "BootDisk" -OS "Windows"

-------------------------- Example 2 --------------------------

This example adds a new data disk.

PS C:\> C:\PS>Add-AzureDisk -DiskName "MyDataDisk" -MediaLocation "http://yourstorageaccount.blob.core.azure.com/vhds/winserver-data.vhd" -Label "DataDisk"

-------------------------- Example 3 --------------------------

This example adds a new Linux boot disk. The disk name and label are the same.

PS C:\> C:\PS>Add-AzureDisk -DiskName "MyLinuxDisk" -MediaLocation "http://yourstorageaccount.blob.core.azure.com/vhds/linuxsys.vhd" -OS "Linux"

Get-AzureDisk
Remove-AzureDisk
Update-AzureDisk