Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Add-AzureDisk
Collapse the table of content
Expand the table of content

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 Azure disk repository.

Syntax

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




Detailed Description

This topic describes the cmdlet in the 0.8.10 version of the Microsoft Azure PowerShell module. To get the version of the module you're using, in the Azure PowerShell console, type (Get-Module -Name Azure).Version.

The Add-AzureDisk cmdlet adds a new disk to the 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.

Parameters

-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 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 (http://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

Examples

Example

This example adds a new, bootable Windows disk.


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.


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.


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

Related topics

Show:
© 2015 Microsoft