Share via


Add-AzureDisk

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Add-AzureDisk

Adds a new disk to the Windows Azure disk repository.

Parameter Set: Default
Add-AzureDisk [-DiskName] <String> [-MediaLocation] <String> [-Label <String> ] [-OS <String> ] [ <CommonParameters>]

This topic describes the cmdlet in the .6.19 version of the Windows Azure PowerShell module. To find out the version of the module you're using, from the Windows Azure PowerShell console, type (get-module azure).version.

The Add-AzureDisk cmdlet adds a new disk to the Windows Azure disk repository in the current subscription. Creates a bootable disk if the OS parameter is specified. If not specified, the disk is a data disk.

-DiskName<String>

Specifies the name of the disk.

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

-MediaLocation<String>

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

Aliases

none

Required?

true

Position?

2

Default Value

none

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

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see  about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • DiskContext

Example

This example adds a new, bootable Windows disk.

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

Example 2

This example adds a new data disk.

C:\PS>Add-AzureDisk -DiskName "MyDataDisk" -MediaLocation "https://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.

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

Get-AzureDisk

Remove-AzureDisk

Update-AzureDisk