Skip to content

Latest commit

 

History

History
195 lines (145 loc) · 4.25 KB

Add-AzureDisk.md

File metadata and controls

195 lines (145 loc) · 4.25 KB
external help file ms.assetid online version schema
Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.xml
16A34F31-1C61-4911-8C1F-9F82683524A1
2.0.0

Add-AzureDisk

SYNOPSIS

Adds a disk to the Azure disk repository.

[!INCLUDE rdfe-banner]

SYNTAX

Add-AzureDisk [-DiskName] <String> [-MediaLocation] <String> [-Label <String>] [-OS <String>]
 [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>] [-InformationVariable <String>]
 [<CommonParameters>]

DESCRIPTION

The Add-AzureDisk cmdlet adds a disk to the Azure disk repository in the current subscription. This cmdlet can add a system disk or a data disk. To add a system disk, specify an operating system type by using the OS parameter.

EXAMPLES

Example 1: Add a startup disk that uses the Windows operating system

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

This command adds a system disk to your disk repository. The system disk uses the Windows operating system.

Example 2: Add a data disk

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

This command adds a data disk.

Example 3: Add a Linux system disk

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

This command adds a Linux system disk.

PARAMETERS

-DiskName

Specifies the name of the disk that this cmdlet adds.

Type: String
Parameter Sets: (All)
Aliases: 

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InformationAction

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

-InformationVariable

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

-Label

Specifies a disk label for the disk that this cmdlet adds.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MediaLocation

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

Type: String
Parameter Sets: (All)
Aliases: 

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OS

Specifies the operating system type for a system disk. Valid values are:

  • Windows
  • Linux

If you do not specify this parameter, the cmdlet adds the disk as a data disk.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Profile

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

CommonParameters

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).

INPUTS

OUTPUTS

DiskContext

NOTES

RELATED LINKS

Get-AzureDisk

Remove-AzureDisk

Update-AzureDisk